%perl> if($ARGS{is_admin}){ use Proc::ProcessTable; use Proc::Killfam; if($ARGS{o} && $ARGS{pid}){ killfam 'SIGTERM', $ARGS{pid}; print ""; } my $t = new Proc::ProcessTable; print "
| PID | STAT | START TIME | COMMAND"; foreach my $p ( @{$t->table} ){ my $cmd = $p->cmndline; if( $cmd =~ /(get_streams\.pl|streamripper)/o){ $cmd =~ s,^.+perl ,,o; $cmd =~ s,\b(rin|daemon)\b,$1,g; %perl> | |
| KILL | <% $p->pid %> | <% $p->state %> | <% scalar(localtime($p->start)) %> | <% $cmd %> | <%perl> } } print "