Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > Re: pidof not w...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 3019 of 3255
Post > Topic >>

Re: pidof not working for postgresql-8.3 ?

by nasr.laili@[EMAIL PROTECTED] (Ennio-Sr) Mar 1, 2008 at 01:43 AM

* Tom Lane <tgl@[EMAIL PROTECTED]
> [280208, 23:24]:
> Ennio-Sr <nasr.laili@[EMAIL PROTECTED]
> writes:
> > Besides that I just found out that 'pidof' doen't seem to work for the
> > ordinary user, as far as postgresql is concerned, whereas it works
> > regularly for other processes:
> [...] 
> > Is this a normal behaviour for the new pg_8.3?
> 
> I am not familiar with pidof (doesn't exist on any of my boxen)
> but maybe it is looking at real executable names rather than
> symlinks?  Try looking for "postgres" instead of "postmaster".
> 
> 			regards, tom lane

Hmm... I'm unlucky you don't use pidof. It's part of the Debian/PowerPC
GNU/Linux 'sysvinit-utils' package and I've been using it since I
learned the essentials of postgres. I call that command in a script just
to make sure postgresql is running before starting some other scripts
which use pg. And it still works nicely on my desktop PC (using PG_7.4).

Back to my iBook and PG_8.3 the results I get are quite intriguing (here
are a few examples, but full results are available on request):

user$ pidof  /usr/lib/postgresql/8.3/bin/postgres
2524 2523 2522 2521 2518

user$ pidof  /usr/lib/postgresql/8.3/bin/postmaster
[nihil]

but, doing the same as root, the result is positive for both (postgres
and postmaster)

On the other hand, this is what happens on my desktop PC, running pg_7.4
under Debian/Etch:

user$ pidof /usr/lib/postgresql/bin/postmaster
5652 5651

user$ pidof /usr/lib/postgresql/bin/postgres   # same as root
[nihil]

user$ pidof /usr/lib/postgresql/7,4/bin/postmaster
5652 5651                        =

user$ pidof /usr/lib/postgresql/7.4/bin/postmaster # same as root
5652 5651 5648

user$ pidof /usr/lib/postgresql/7.4/bin/postgres  # positive if root
[nihil]

-------

Perhaps it depends on the sysvinit-utils version being used with the
desktop (2.86.ds1-38) and iBook (2.86.ds1-53), which I couldn't check as
the downgrading threathened to remove some essential packages and I
didn't feel like running any risk at the moment; but I would
be grateful if anybody familiar with pidof could confirm.

Anyway, thank you Tom, for your time and could you suggest a different
command (to be put in a script) aiming at the same goal?

Regards,
	Ennio

-- 
[Perche' usare Win$ozz (dico io) se ..."anche uno sciocco sa farlo.  
\\?//
 Fa' qualche cosa di cui non sei capace!"  (diceva Henry Miller) ]   
(°|°)
[Why use Win$ozz (I say) if ... "even a fool can do that.              )=(
 Do something you aren't good at!" (as Henry Miller used to say) ]

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org
 




 4 Posts in Topic:
pidof not working for postgresql-8.3 ?
nasr.laili@[EMAIL PROTECT  2008-02-28 17:44:56 
Re: pidof not working for postgresql-8.3 ?
tgl@[EMAIL PROTECTED] (T  2008-02-28 23:24:28 
Re: pidof not working for postgresql-8.3 ?
nasr.laili@[EMAIL PROTECT  2008-03-01 01:43:47 
Re: pidof not working for postgresql-8.3 ?
nasr.laili@[EMAIL PROTECT  2008-03-02 19:38:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 9:20:05 CDT 2008.