[Nagiosplug-devel] [ nagiosplug-Bugs-1420741 ] check_swap: incorrect totals for multiple partitions (BSD)

SourceForge.net noreply at sourceforge.net
Mon Mar 13 10:01:03 CET 2006


Bugs item #1420741, was opened at 2006-01-31 12:28
Message generated for change (Settings changed) made by seanius
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1420741&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: CVS
>Status: Pending
>Resolution: Fixed
Priority: 5
Submitted By: Scott Thompson (scottyt)
>Assigned to: M. Sean Finney (seanius)
Summary: check_swap: incorrect totals for multiple partitions (BSD)

Initial Comment:
The swapctl-based portion of check_swap does not
correctly handle multiple swap partitions.  It builds
incorrect totals for total space + usage by summing the
values from the first configured partition n times
where n is the number of configured partitions.

A loop to examine each swapent structure in the array
returned by swapctl exists, however the loop index is
never used to access each element.

A patch to revision 1.54 that fixes this behaviour
(tested & confirmed working) is attached.


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

Comment By: M. Sean Finney (seanius)
Date: 2006-03-13 13:00

Message:
Logged In: YES 
user_id=226838

this problem is now fixed in cvs.  thank you for your report.

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

Comment By: Scott Thompson (scottyt)
Date: 2006-01-31 12:32

Message:
Logged In: YES 
user_id=136362

Example:

# pstat -s
Device      1K-blocks     Used    Avail Capacity  Priority
/dev/sd0b      263578   230876    32702    88%    0
/dev/wd0b      262080    26244   235836    10%    1
Total          525658   257120   268538    49%

# ./check_swap.old -av -w 10% -c 5%
SWAP OK - 13% free (64 MB out of 515 MB)  [32 (13%)] [32
(13%)]|swap=63MB;51;25;0;514

# ./check_swap -av -w 10% -c 5%
SWAP OK - 52% free (262 MB out of 513 MB)  [32 (13%)] [230
(90%)]|swap=262MB;51;25;0;513


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

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




More information about the Devel mailing list