diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2007-04-25 22:10:13 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2007-04-25 22:10:13 +0000 |
commit | d47be7a9e48242a25e356e2509f6fb774ae0be10 (patch) | |
tree | 1ea8e0185eda27100a26f43a98523f63695f2dfa /plugins/t/check_load.t | |
parent | 27a624dd9f929af1330be508762057fa4fa8a0f5 (diff) | |
download | monitoring-plugins-d47be7a9e48242a25e356e2509f6fb774ae0be10.tar.gz |
check_load can optionally divide by number of cpus
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1700 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/t/check_load.t')
-rw-r--r-- | plugins/t/check_load.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/t/check_load.t b/plugins/t/check_load.t index 0804ac65..da87d168 100644 --- a/plugins/t/check_load.t +++ b/plugins/t/check_load.t | |||
@@ -14,7 +14,7 @@ my $res; | |||
14 | my $successOutput = '/^OK - load average: [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+/'; | 14 | my $successOutput = '/^OK - load average: [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+/'; |
15 | my $failureOutput = '/^CRITICAL - load average: [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+/'; | 15 | my $failureOutput = '/^CRITICAL - load average: [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+/'; |
16 | 16 | ||
17 | plan tests => 4; | 17 | plan tests => 6; |
18 | 18 | ||
19 | $res = NPTest->testCmd( "./check_load -w 100,100,100 -c 100,100,100" ); | 19 | $res = NPTest->testCmd( "./check_load -w 100,100,100 -c 100,100,100" ); |
20 | cmp_ok( $res->return_code, 'eq', 0, "load not over 100"); | 20 | cmp_ok( $res->return_code, 'eq', 0, "load not over 100"); |
@@ -24,3 +24,7 @@ $res = NPTest->testCmd( "./check_load -w 0,0,0 -c 0,0,0" ); | |||
24 | cmp_ok( $res->return_code, 'eq', 2, "Load over 0"); | 24 | cmp_ok( $res->return_code, 'eq', 2, "Load over 0"); |
25 | like( $res->output, $failureOutput, "Output OK"); | 25 | like( $res->output, $failureOutput, "Output OK"); |
26 | 26 | ||
27 | $res = NPTest->testCmd( "./check_load -r -w 0,0,0 -c 0,0,0" ); | ||
28 | cmp_ok( $res->return_code, 'eq', 2, "Load over 0 with per cpu division"); | ||
29 | like( $res->output, $failureOutput, "Output OK"); | ||
30 | |||