Re: How to check postgres running or not ?

From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to check postgres running or not ?
Date: 2004-09-18 17:20:15
Message-ID: m3r7ozqysw.fsf@wolfe.cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

In an attempt to throw the authorities off his trail, sgaikwad(at)vertex(dot)co(dot)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(at)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gaetano Mendola 2004-09-18 18:36:47 Re: How to check postgres running or not ?
Previous Message Tom Lane 2004-09-18 16:39:21 Re: Sequence of SQL command execution involving triggers and stored procedures.