Put this in crontab & schedule it to run every 1 hour or so. This will take to keep your ever running processes alive.
The script:
#!/usr/bin/perl
my $process_to_check = $ARGV[0] or die "Usage: $0
open(PS,"/bin/ps -aef|") || die "Can't Open PS: $!\n";
while(
chomp;
if (/\Q$process_to_check\E/) { close PS; exit;}
}
close PS;
system("$process_to_check");
0 comments:
Post a Comment