#!/usr/bin/perl # # process-mon-new # Keep track of Zaza's processes, zazaconsole side # 0.32 9/20/2002 # Quick update for mod_perl support. # # 0.31 5/9/2002 # Added obstacleServer monitoring # # 0.30 1/18/2001 # Total re-write for management from zazaconsole using Perl 5.6 # # 0.20 7/16/2001 # Added battery voltage monitoring, minor improvements. # # 0.10 # First working version # Requires Proc::ProcessTable use Proc::ProcessTable; use Apache::Constants ':common'; # Process monitoring stuff $plan_running = "clear"; $localize_running = "clear"; $set_robot_running = "clear"; $poslibtcx_running = "clear"; $obstacleServer_running = "clear"; $t = new Proc::ProcessTable; my $p; foreach $p ( @{$t->table} ){ if ($p->cmndline =~ m/plan/) { $plan_running = "green"; } if ($p->exec =~ m/LOCALIZE/) { $localize_running = "green"; } if ($p->exec =~ m/SET_ROBOT/) { $set_robot_running = "green"; } if ($p->exec =~ m/poslibtcx/) { $poslibtcx_running = "green"; } if ($p->exec =~ m/obstacleServer/) { $obstacleServer_running = "green"; } } #print "Content-Type: text/html\n\n"; print <

Zazaconsole

plan

localize

set_robot

poslibtcx

obstacleServer

EOL