Re: Recording OpenNTPd PID at daemon startup

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Darrin Chandler
Date: Tuesday, January 29, 2008 - 7:31 am

On Tue, Jan 29, 2008 at 02:54:14PM +0100, Helmut Schneider wrote:

If you really want to find the parent you can...

$ ps ax -O pgid | grep ntpd
 4887  4887 ??  Is      0:00.01 ntpd: [priv] (ntpd)
 7164  4887 ??  I       0:00.06 ntpd: ntp engine (ntpd)

The header that gets stripped by grep:
  PID  PGID TT  STAT       TIME COMMAND

So you can see that for one process PID==PGID. Bingo.

-- 
Darrin Chandler            |  Phoenix BSD User Group  |  MetaBUG
dwchandler@stilyagin.com   |  http://phxbug.org/      |  http://metabug.org/
http://www.stilyagin.com/  |  Daemons in the Desert   |  Global BUG Federation
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Recording OpenNTPd PID at daemon startup, Helmut Schneider, (Tue Jan 29, 6:54 am)
Re: Recording OpenNTPd PID at daemon startup, Darrin Chandler, (Tue Jan 29, 7:31 am)
Re: Recording OpenNTPd PID at daemon startup, Henning Brauer, (Tue Jan 29, 8:30 am)