From: Eyal Lebedinsky <eyal@eyal.emu.id.au>
To: "list, linux-kernel" <linux-kernel@vger.kernel.org>
Subject: 2.4.20: problem with "ps -olstart"
Date: Sat, 29 Mar 2003 13:08:58 +1100 [thread overview]
Message-ID: <3E85003A.3DE4DDE7@eyal.emu.id.au> (raw)
I have a program that needs to check if a process is still running.
It issues a ps and saves the pid and start time. It then uses this
info to compare against a later "ps --pid".
The monitored process is long-running and unlikely to restart at the
same second and with the same pid. I am trying to go better than
just using a pid sentry (I also compare the cmd to be really sure).
I see a different start time returned on different calls. An example
is attached below. This is a show stopper for me. Is this a known
problem? Does it have a solution?
This is vanilla (my build) 2.4.20 on i386.
$ ps
PID TTY TIME CMD
906 pts/0 00:00:01 bash
3026 pts/0 00:00:00 sh
8254 pts/0 00:00:00 ps
$ while true ; do ps --pid "3026" -olstart,cmd --no-headers ; done
Thu Mar 27 22:03:11 2003 sh
Thu Mar 27 22:03:11 2003 sh
Thu Mar 27 22:03:11 2003 sh
Thu Mar 27 22:03:11 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:11 2003 sh
Thu Mar 27 22:03:11 2003 sh
Thu Mar 27 22:03:11 2003 sh
Thu Mar 27 22:03:11 2003 sh
Thu Mar 27 22:03:11 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:12 2003 sh
Thu Mar 27 22:03:11 2003 sh
--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>
next reply other threads:[~2003-03-29 1:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-29 2:08 Eyal Lebedinsky [this message]
2003-03-29 12:09 ` Andries Brouwer
2003-03-29 13:38 ` Eyal Lebedinsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E85003A.3DE4DDE7@eyal.emu.id.au \
--to=eyal@eyal.emu.id.au \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®