* Tom Lane <tgl@sss.pgh.pa.us> [280208, 23:24]:
> Ennio-Sr <nasr.laili@tin.it> 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) ]