[Nagiosplug-devel] [ nagiosplug-Bugs-1093522 ] 1.4beta1 check_swap doesn't work on AIX

SourceForge.net noreply at sourceforge.net
Thu Jan 6 15:17:26 UTC 2005


Bugs item #1093522, was opened at 2004-12-30 23:20
Message generated for change (Comment added) made by tonvoon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1093522&group_id=29880

Category: None
Group: Release (specify)
Status: Open
Resolution: None
Priority: 5
Submitted By: mister_patient (mister_patient)
>Assigned to: Ton Voon (tonvoon)
Summary: 1.4beta1 check_swap doesn't work on AIX

Initial Comment:
The 1.4beta1 check_swap module doesn't work on AIX 5.2:

$ lsps -s
Total Paging Space   Percent Used
      4096MB              42%

$  ./check_swap -w 20% -c 10% -v -v -v
Command: /usr/sbin/lsps -s
Format: %d%*s %d
total=4096, used=0, free=0
SWAP OK: 100% free (17592186044416 MB out of
17592186044416 MB) |swap=0MB;2147483647;2147483647;0;0



----------------------------------------------------------------------

>Comment By: Ton Voon (tonvoon)
Date: 2005-01-06 23:16

Message:
Logged In: YES 
user_id=664364

My preferred solution would be to remove the use of unsigned long long 
and just use float variables, but I'm a bit reticent about this. Sent email 
to nagiosplug-devel to gather some opinions first.

----------------------------------------------------------------------

Comment By: mister_patient (mister_patient)
Date: 2005-01-06 21:55

Message:
Logged In: YES 
user_id=1187596

I am not a developer, so please take this with a grain of
salt, but the issue appears to be that AIX doesn't like the
fact that a bunch of variables are declared as unsigned long
longs.  If I change this:

unsigned long long total_swap = 0, used_swap = 0, free_swap = 0;
unsigned long long dsktotal = 0, dskused = 0, dskfree = 0,
tmp = 0;

to this:

unsigned long total_swap = 0, used_swap = 0, free_swap = 0;
unsigned long dsktotal = 0, dskused = 0, dskfree = 0, tmp = 0;

it seems to work OK (although you also have to clean up some
of the printfs to use %lu instead of %llu).

As I say, I am not a programmer, so I do not know if there
is an elegant way to fix this.



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1093522&group_id=29880




More information about the Nagiosplugin-devel mailing list