tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Finding Process ID
@ 2001-10-22 20:56 Kazuro FURUKAWA
  0 siblings, 0 replies; only message in thread
From: Kazuro FURUKAWA @ 2001-10-22 20:56 UTC (permalink / raw)
  To: tru64-unix-managers

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-10-22 20:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-22 20:56 Finding Process ID Kazuro FURUKAWA

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox