#!/usr/bin/perl -w my $load = `uptime`; $load =~ /load\ average\:\ (\d+)\./; $load = $1; if($load >= 10){ print "Restarting apache\n"; system("/usr/bin/apachectl stop"); sleep(20); system("/usr/bin/apachectl start"); }