root/misc/proccheck

Revision 1915 (checked in by miyagawa, 13 years ago)

add proccheck

  • Property svn:executable set to *
Line 
1 #!/usr/bin/perl
2 use strict;
3 my $proc = shift;
4 my $num  = shift || 1;
5 my $command = shift;
6 my @lines = qx(ps auxww | grep $proc | grep -v grep | grep -v proccheck);
7 if (@lines < $num) {
8     if ($command) {
9         system $command;
10     } else {
11         exit(1);
12     }
13 }
14
Note: See TracBrowser for help on using the browser.