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 AC415329E65 for ; Sat, 18 Sep 2004 18:37:51 +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 78304-01 for ; Sat, 18 Sep 2004 17:37:46 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 60A04329DFC for ; Sat, 18 Sep 2004 18:37:46 +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 i8IHbiCn078954 for ; Sat, 18 Sep 2004 17:37:44 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i8IHZCAl078311 for pgsql-sql@postgresql.org; Sat, 18 Sep 2004 17:35:12 GMT From: Christopher Browne X-Newsgroups: comp.databases.postgresql.sql Subject: Re: How to check postgres running or not ? Date: Sat, 18 Sep 2004 13:20:15 -0400 Organization: cbbrowne Computing Inc Lines: 21 Message-ID: References: <414A7395.8070503@vertex.co.in> 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:f23fUfuRxqi4ki5UkLIFirgAW3o= 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/123 X-Sequence-Number: 18969 In an attempt to throw the authorities off his trail, sgaikwad@vertex.co.in ("Sandeep Gaikwad") transmitted: > Hello Sir, > I want to know how to check whether postgres database > is running or not ? when I give command like ./postmaster -i &, > whether all databases in that postgres will run or any one [default] ? > If any one, then how to detect that database ? Well, the way I usually check on what databases are running is thus: cbbrowne@wolfe:/tmp/mm5/doc> netstat -an | grep PG Saturday 13:18:30 unix 2 [ ACC ] STREAM LISTENING 2793 /var/run/postgresql/.s.PGSQL.5432 One could presumably script things further to get more out of that; it doesn't normally seem worthwhile to do so... -- output = ("cbbrowne" "@" "ntlug.org") http://www.ntlug.org/~cbbrowne/postgresql.html "As long as war is regarded as wicked, it will always have its fascination. When it is looked upon as vulgar, it will cease to be popular." --Oscar Wilde