Is it a general purpose process, or a custom
process, e.g. will any of us here have heard of it.
Does this process write log files?
Does it generate SNMP trap messages, Does the
process try to communicate with anything else?
At the end of the day, if the process in question
doesn't have any method of passing on information you will simply be
limited to checking that the process exists and is running (under linux this
would be ensuring the process isn't a zombie, and is alive.)
I'm not sure if you can get the parent pid of the
process in question, without resorting to using a system command to 'ps' and
grepping the parent pid out, maybe someone has written some better methods by
now......
To check if a process is alive you can use the perl
'kill' command
you will first need to capture the pid of the
process in question, then :-
if (kill 0=> $pid)
{
#die "process with PID $pid
already has a lock on this file $LOCKFILE\n";
}
else
{ #process is dead
}
|
Title: RE: [Perl-unix-users] Help: Daemon Status
- [Perl-unix-users] Help: Daemon Status Mundell, R. \(Ronald\)
- Re: [Perl-unix-users] Help: Daemon Status $Bill Luebkert
- [Perl-unix-users] Re: Daemon Status Martin Moss
- RE: [Perl-unix-users] Help: Daemon Status Mundell, R. \(Ronald\)
- Re: [Perl-unix-users] Help: Daemon Status Martin Moss
- Re: [Perl-unix-users] Help: Daemon Sta... Martin Moss