ps-watcher/samples/root-procs.ini

20 lines
497 B
INI

# $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