Hello!
Our check procedure on TRU64 UNIX is:
checkmasterdaemon
if [ $? -eq 1 ]; then
# Try to connect to postgres by selecting tables
TABELLEN=`/pg/postgresql-7.4.3/bin/psql -h postgres -c 'select datname from
pg_database' postgres postgres 2/dev/null`
if [[
-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!
|
| [EMAIL PROTECTED]:~$ ps aux | grep
Am Montag, 20. September 2004 12:05 schrieb Gaetano Mendola:
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
Or
Funny... I set up a little program on my development
machine that queries for the rendezvous name. This way
I know my development machine is running before I try
to connect.
I think zeroconf could be used for this quite
easily...
JMHO
Ted
--- Arne Stoelck [EMAIL PROTECTED] wrote:
How
Worik wrote:
Assuming it is unix The command
ps xau|grep post
You might want to change that to:
ps aux|grep postgres
As your suggestion will pick up extraneous data if one is running
postfix on the same box.
--
Until later, Geoffrey Registered Linux User #108567
Geoffrey [EMAIL PROTECTED] writes:
Worik wrote:
Assuming it is unix The command
ps xau|grep post
You might want to change that to:
ps aux|grep postgres
As your suggestion will pick up extraneous data if one is running
postfix on the same box.
Actually I'd recommend grepping for
On Sun, Sep 19, 2004 at 12:25:00PM -0400, Tom Lane wrote:
ps aux | grep postmaster | grep -v grep
(or use ps -ef if using a SysV-ish ps).
Except that on Solaris, ps -ef _always_ shows postmaster, even for
the individual back ends.
A
--
Andrew Sullivan | [EMAIL PROTECTED]
In the future
Andrew Sullivan [EMAIL PROTECTED] writes:
On Sun, Sep 19, 2004 at 12:25:00PM -0400, Tom Lane wrote:
ps aux | grep postmaster | grep -v grep
(or use ps -ef if using a SysV-ish ps).
Except that on Solaris, ps -ef _always_ shows postmaster, even for
the individual back ends.
Right, but if you
Jeff Eckermann wrote:
--- Christopher Browne [EMAIL PROTECTED] wrote:
In an attempt to throw the authorities off his
trail, [EMAIL PROTECTED] (Sandeep Gaikwad)
transmitted:
Hello Sir,
I want to know how to check
whether postgres database
is running or not ? when I give command
Tom Lane wrote:
Geoffrey [EMAIL PROTECTED] writes:
Worik wrote:
Assuming it is unix The command
ps xau|grep post
You might want to change that to:
ps aux|grep postgres
As your suggestion will pick up extraneous data if one is running
postfix on the same box.
Actually I'd recommend grepping
On Sun, Sep 19, 2004 at 01:12:07PM -0400, Tom Lane wrote:
Except that on Solaris, ps -ef _always_ shows postmaster, even for
the individual back ends.
Right, but if you see a backend then you can figure the system is up.
Oops, good point. (And in any case, on Solaris you also have the ucb
[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!
[EMAIL PROTECTED]:~$ ps aux | grep /usr/bin/postmaster | grep -v grep
[EMAIL PROTECTED]:~$ ps aux | grep postmaster | grep -v grep
Perhaps I have a bug in pg_ctrl?
This is what I get...
[EMAIL PROTECTED]:~$ ps aux | grep postmaster | grep -v grep
;/usr/lib/postgresql/bin/pg_ctl status
postgres 670 0.0 0.6 8544 1688 pts/1S12:33 0:00
/usr/lib/postgresql/bin/postmaster
pg_ctl: postmaster or postgres is not
Worik [EMAIL PROTECTED] writes:
Perhaps I have a bug in pg_ctrl?
More likely you have the wrong value of PGDATA in your environment
(where wrong means not what that postmaster is using).
regards, tom lane
---(end of
How about a simple
telnet localhost 5432 ?
assuming postmaster is listening on that host and port
On Fri, 17 Sep 2004, Sandeep Gaikwad wrote:
Hello Sir,
I want to know how to check whether postgres database is
running or not ? when I give command like ./postmaster -i , whether
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 ?
Thanks and regards,
Sandeep.
In an attempt to throw the authorities off his trail, [EMAIL PROTECTED] (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
Sandeep Gaikwad wrote:
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, in
Assuming it is unix The command
ps xau|grep post
If it is running it will produce output like...
[EMAIL PROTECTED]:~$ ps xau|grep post
postgres 880 0.0 0.2 8580 740 ?SSep07 0:31
/usr/lib/postgresql/bin/postmaster
postgres 887 0.0 0.2 9536 612 ?SSep07
19 matches
Mail list logo