[TriLUG] process monitoring
Joseph Tate
jtate at dragonstrider.com
Mon Jan 20 10:57:48 EST 2003
man pidof
Mike M wrote:
>I want to monitor the existance of a process. All I ever know is the name of
>the process. I came up with the following:
>
>$ ps -C process_cmd_name > temp
>$ ls -l temp
>
>if temp size is 0 then process does not exist else it does exist
>
>I was going to use the getsize function in the os.path module in Python for
>the ls function above.
>
>Anybody think of another way to accomplish this?
>
>Thanks
>
>
More information about the TriLUG
mailing list