ps-watcher/tests/paction.cnf

18 lines
526 B
Plaintext
Raw Normal View History

2006-11-03 21:35:23 +00:00
# $Id: paction.cnf,v 1.1 2004/01/15 03:00:32 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 = $my_count++; $root_procs++ if $uid == 0
occurs = every
[$EPILOG]
trigger = <<EOT
$my_count > 0 && $my_count < $count &&
$root_procs > 0 && $my_count > $root_procs
EOT
action = echo "ok 1"