From: Kazuro FURUKAWA <kazuro.furukawa () kek ! jp>
To: tru64-unix-managers
Subject: Finding Process ID
Date: Mon, 22 Oct 2001 20:56:39 +0000 [thread overview]
Message-ID: <102653641821954.tru64-unix-managers.marc@archive.invalid> (raw)
Hi managers,
If I want to find a process whose command is "/xxx/abc"
distinguishing from "/yyy/abc", I may type
ps -o pid,command | grep "/xxx/abc"
However, sometimes it fails because
ps -o pid,command | grep abc
returns "[abc]" instead of "/xxx/abc".
What are better ways to deal with it?
Do I have to keep pid somewhere when a process starts as many
daemons do? Maybe it's the answer. But we already have many programs
which should be monitored, and I'd like to find some work-around.
I've looked in /sbin/init.d/bin/getpid, but it uses above method.
I think scripts in /sbin/init.d which use getpid with full paths
may fail easily.
-----
Kazuro FURUKAWA <kazuro.furukawa@kek.jp>
Linac, High Energy Accelerator Research Organization (KEK), Japan
reply other threads:[~2001-10-22 20:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox