PS function for scripts

Jorge Almeida jalmeida
Thu Sep 14 01:53:15 PDT 2006


On Thu, 14 Sep 2006, Machiel Richards wrote:

>
>   Need some help on something we can't seem to get right.... we have a
> script that calls a couple of programs one after another and after
> completion sleeps for 1 hour then starts running again.
>
daemontools would seem the proper tool to keep it running.
>
> 	However when we do a ps to see if the script is still running it
> does not return any results as if it is not running...we then need to ps
Perhaps it's sleeping?
> for every single program to see which one of these are busy running.
>
>
>
> How can we monitor the scripts to see if it is still running and perhaps
> what program it is running at the moment?
>
 	Something like this?
 	(...)
 	echo "Executing program 1..."
 	/path/to/program1
 	echo "Executing program 2..."
 	(...)
With a standard daemontools setup, STDOUT and STDERR would go to a log
file. Browsing it would tell you what the current execution phase is.

-- 
Jorge Almeida



More information about the Linux-users mailing list