他人にWeb鯖貸すときの監視はこれでいいですか?
#!/usr/bin/perl

use strict;
use warnings;

my $num = 0;
while( $num <= 9 ){

foreach(`ps -Af`){
$_ =~ s/ +/ /g;
my($user, $pid, undef, undef, undef, undef, $time) = split(/ /, $_);
$user =~ /[\.\+]/ or next;
my(undef, $min, $sec) = split(/:/, $time);
$min =~ s/0(\d)/$1/;
$sec =~ s/0(\d)/$1/;
($min > 0 || $sec > 20) and `kill -9 $pid`;
}
sleep 180;

}