pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christopher Browne <cbbrowne@acm.org>
To: pgsql-sql@postgresql.org
Subject: Re: How to check postgres running or not ?
Date: Sun, 19 Sep 2004 21:33:00 -0400
Message-ID: <m3llf5pvw3.fsf@wolfe.cbbrowne.com> (raw)
References: <414A7395.8070503@vertex.co.in>
	<414CE76E.2050405@noggon.com>
	<414D7533.10708@3times25.net>
	<19430.1095611100@sss.pgh.pa.us>
	<414DF2D5.5040509@bigfoot.com>
	<414E25B3.9070309@noggon.com>

Clinging to sanity, worik@noggon.com (Worik) mumbled into her beard:
> [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@stolberg:~$ ps aux | grep /usr/bin/postmaster | grep -v grep
> worik@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@stolberg:~$
>
> So...
> " ps aux | grep postmaster | grep -v grep "
> is more reliable(?)

There's a very slightly clever modification that gets rid of the extra
grep...

Try.. 

 [appropriate ps command for your platform] | egrep '[p]ostmaster'

That egrep _won't_ match its own command line.
-- 
let name="cbbrowne" and tld="ntlug.org" in String.concat "@" [name;tld];;
http://www3.sympatico.ca/cbbrowne/multiplexor.html
He doesn't have much of a reputation, or so I've heard. 



view thread (22+ messages)  latest in thread

Message-ID: <m3llf5pvw3.fsf@wolfe.cbbrowne.com>
Permalink:  ../m3llf5pvw3.fsf@wolfe.cbbrowne.com/
Also on:    postgresql.org/message-id/m3llf5pvw3.fsf@wolfe.cbbrowne.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: cbbrowne@acm.org
  Subject: Re: How to check postgres running or not ?
  In-Reply-To: <m3llf5pvw3.fsf@wolfe.cbbrowne.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox