11-15-2002, 01:42 PM
Newby help please.
I am trying to get a script to check whether a unix process exists and then to display a red or green image depending on the result.
I have tried searching this site and would be grateful if anyone could give point me to an example.
11-15-2002, 03:25 PM
11-15-2002, 04:09 PM
Sorry should have made myself clearer.
I want to check the unix process with a script and send the output to a file or to any other output that could be checcked
11-15-2002, 04:16 PM
Yep, still think js ain't gonna help you here. You'll probably need to use perl or some other server side language to pull this off.
11-15-2002, 09:01 PM
11-27-2002, 04:00 AM
This may be possible with PHP... Beyond getting the ps info into a flat file, though, I dunno.
exec('ps option | grep pid > ps.txt');
Easiest thing then would be test if ps.txt has something in it, and if so, you have a process. But I guess you'd need to know the exact pid in that case. hm... Not sure where to go from there, but maybe it will foster an idea.