1 #! /usr/bin/perl -w -I ..
3 # Process Tests via check_procs
13 BEGIN {$tests = 12; plan tests => $tests}
17 $t += checkCmd( "./check_procs -w 100000 -c 100000", 0, '/^PROCS OK: [0-9]+ process(es)?$/' );
18 $t += checkCmd( "./check_procs -w 100000 -c 100000 -s Z", 0, '/^PROCS OK: [0-9]+ process(es)? with /' );
19 $t += checkCmd( "./check_procs -w 0 -c 10000000", 1, '/^PROCS WARNING: [0-9]+ process(es)?$/' );
20 $t += checkCmd( "./check_procs -w 0 -c 0", 2, '/^PROCS CRITICAL: [0-9]+ process(es)?$/' );
21 $t += checkCmd( "./check_procs -w 0 -c 0 -s S", 2, '/^PROCS CRITICAL: [0-9]+ process(es)? with /' );
22 $t += checkCmd( "./check_procs -w 0 -c 10000000 -p 1", 1, '/^PROCS WARNING: [0-9]+ process(es)? with PPID = 1/' );
24 exit(0) if defined($Test::Harness::VERSION);