Re: How to check postgres running or not ?

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Worik <worik(at)noggon(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-sql(at)postgresql(dot)org
Subject: Re: How to check postgres running or not ?
Date: 2004-09-20 10:05:55
Message-ID: 414EAB83.3060600@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

-----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(at)stolberg:~$ ps aux | grep /usr/bin/postmaster | grep -v grep
| worik(at)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(at)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-----

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2004-09-20 11:47:44 Re: How to check postgres running or not ?
Previous Message T E Schmitz 2004-09-20 08:04:26 Re: ORDER BY and NULLs