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 3AE92329E69 for ; Mon, 20 Sep 2004 02:44:03 +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 42923-08 for ; Mon, 20 Sep 2004 01:43:55 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 148D1329E67 for ; Mon, 20 Sep 2004 02:43:58 +0100 (BST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i8K1hsfg046801 for ; Mon, 20 Sep 2004 01:43:54 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i8K1g9A6046527 for pgsql-sql@postgresql.org; Mon, 20 Sep 2004 01:42:09 GMT From: Christopher Browne X-Newsgroups: comp.databases.postgresql.sql Subject: Re: How to check postgres running or not ? Date: Sun, 19 Sep 2004 21:33:00 -0400 Organization: cbbrowne Computing Inc Lines: 31 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org X-message-flag: Outlook is rather hackable, isn't it? X-Home-Page: http://www.cbbrowne.com/info/ X-Affero: http://svcs.affero.net/rm.php?r=cbbrowne User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux) Cancel-Lock: sha1:qbXQwwDosLGyoVMhvCfecMSs/Po= To: pgsql-sql@postgresql.org 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/150 X-Sequence-Number: 18996 Clinging to sanity, worik@noggon.com (Worik) mumbled into her beard: > [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(?) There's a very slightly clever modification that gets rid of the extra grep... Try.. [appropriate ps command for your platform] | egrep '[p]ostmaster' That egrep _won't_ match its own command line. -- let name="cbbrowne" and tld="ntlug.org" in String.concat "@" [name;tld];; http://www3.sympatico.ca/cbbrowne/multiplexor.html He doesn't have much of a reputation, or so I've heard.