Re: How to check postgres running or not ? - Mailing list pgsql-sql

From Christopher Browne
Subject Re: How to check postgres running or not ?
Date
Msg-id m3r7ozqysw.fsf@wolfe.cbbrowne.com
Whole thread Raw
In response to How to check postgres running or not ?  ("Sandeep Gaikwad" <sgaikwad@vertex.co.in>)
Responses Re: How to check postgres running or not ?  (Jeff Eckermann <jeff_eckermann@yahoo.com>)
List pgsql-sql
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 haveits fascination.  When it is looked upon as vulgar,it will
ceaseto be popular."   --Oscar Wilde
 


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Sequence of SQL command execution involving triggers and stored procedures.
Next
From: Gaetano Mendola
Date:
Subject: Re: How to check postgres running or not ?