1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
# $Id: root-procs.ini,v 1.1 2008/12/25 17:01:50 rockyb Exp $
# Test perl-action, prolog and epilog
# Rather the name of the interpreter is listed (e.g. bash or perl)
# Here's how you can match against a script.
# Look for my processes: ps-watcher.
[$PROLOG]
perl-action = $my_count=0; $root_procs=0;
[.*]
perl-action = <<EOP
if ($uid == 0) {
$root_procs++;
}
EOP
occurs = every
[$EPILOG]
perl-action = <<EOP1
system("logger You have $root_procs root processes running");
EOP1
|