X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 46ADD329C63 for ; Mon, 20 Sep 2004 11:06:16 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 76672-06 for ; Mon, 20 Sep 2004 10:06:09 +0000 (GMT) Received: from pns.mm.eutelsat.org (pns.mm.eutelsat.org [194.214.173.227]) by svr1.postgresql.org (Postfix) with ESMTP id 2FBBF329E59 for ; Mon, 20 Sep 2004 11:06:09 +0100 (BST) Received: from nts-03.mm.eutelsat.org (localhost [127.0.0.1]) by pns.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id i8KA4ix15270; Mon, 20 Sep 2004 12:04:45 +0200 Received: from [127.0.0.1] (accesspoint.mm.eutelsat.org [194.214.173.4]) by nts-03.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id i8KA66V22560; Mon, 20 Sep 2004 12:06:06 +0200 Message-ID: <414EAB83.3060600@bigfoot.com> Date: Mon, 20 Sep 2004 12:05:55 +0200 From: Gaetano Mendola User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Worik Cc: Tom Lane , pgsql-sql@postgresql.org Subject: Re: How to check postgres running or not ? References: <414A7395.8070503@vertex.co.in> <414CE76E.2050405@noggon.com> <414D7533.10708@3times25.net> <19430.1095611100@sss.pgh.pa.us> <414DF2D5.5040509@bigfoot.com> <414E25B3.9070309@noggon.com> In-Reply-To: <414E25B3.9070309@noggon.com> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/154 X-Sequence-Number: 19000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Worik wrote: | | | [snip] | |> |> |> Just to enforce the test is better looking for the entire executable |> path: |> |> ps aux | grep /usr/bin/postmaster | grep -v grep |> | | Does not work for me! | | worik@stolberg:~$ ps aux | grep /usr/bin/postmaster | grep -v grep | worik@stolberg:~$ ps aux | grep postmaster | grep -v grep | postgres 670 0.1 0.6 8544 1688 pts/1 S 12:33 0:00 | /usr/lib/postgresql/bin/postmaster | worik@stolberg:~$ | | So... | " ps aux | grep postmaster | grep -v grep " | is more reliable(?) It only depends on your distribution, in your case: ps aux | grep /usr/lib/postgresql/bin/postmaster | grep -v grep consider also the if you run different postmaster version in different location this is the only way I believe Regards Gaetano Mendola -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBTquC7UpzwH2SGd4RAiouAKCpvuLSspsTVXCjSLgDZ2ZKQ3gfywCg7rzl gXkPlq9UanBNjIWpBvPXNwo= =ZNAY -----END PGP SIGNATURE-----