[Nagiosplug-devel] check_swap mis-reporting values

Ton Voon tonvoon at mac.com
Thu Feb 19 17:19:21 CET 2004


On 20 Feb, 2004, at 00:23, Matt Pounsett wrote:

> On Thu, 19 Feb 2004, Ton Voon wrote:
>
>> Matt,
>>
>> Can you try with the latest Nagios plugins? There's been a lot of work
>> on check_swap in the 1.4 release. Also use the -v switch to see what
>> commands check_swap is actually running.
>
> check_swap has no -v switch (neither version)... if it does, it's not 
> in the
> help, and doesn't appear to do anything.  Also, check_swap is 
> compiled, not a
> script, so it's not 'running commands' per-se.  What output did you 
> expect to
> see from -v?

check_swap works by running the swap command. This is my output on a 
Solaris 9 server:

bash-2.05$ ./check_swap -v -v -v -w 10% -c 5%
Command: /usr/sbin/swap -s
Format: %*s %*dk %*s %*s + %*dk %*s = %dk %*s %dk %*s
SWAP OK: 80% free (893 MB out of 1129 MB) |swap=893MB;112;56;0;1129

>
> At any rate, the 1.4.0alpha check swap has a similar problem to the 
> 1.3.1
> version.. although it misrepresents the total available swap 
> differently.
>
> % ./check_swap -a -w 20% -c 10%
> SWAP CRITICAL: 0% free (0 MB out of 80 MB) |swap=0MB;16;8;0;80
>
My guess is that configure did not pick out your correct swap command. 
Can you send your config.log file?

>
> By the way, the check_swap in 1.4.0alpha has buggy help output:
>
>  check_swap [-a] -w <used_percentage>% -c <used_percentage>%
>
> I believe this should be changed to free_percentage.

Right you are. I've committed v1.26 with better help and usage output. 
Thanks.

Ton





More information about the Devel mailing list