summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM. Sean Finney <seanius@users.sourceforge.net>2006-03-13 17:59:23 +0000
committerM. Sean Finney <seanius@users.sourceforge.net>2006-03-13 17:59:23 +0000
commitedf94c7d2a21142b0cf9613dbbc1ff7a48f456ef (patch)
treeecf748d87c77483178a36c3465c9ce4aef70c29e
parent5c0aa37260519e37feac734d52c1b9b63090d77f (diff)
downloadmonitoring-plugins-edf94c7d2a21142b0cf9613dbbc1ff7a48f456ef.tar.gz
fix for (tracker id 1420741)
"check_swap: incorrect totals for multiple partitions (BSD)" thanks to scott thompson git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1323 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--plugins/check_swap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_swap.c b/plugins/check_swap.c
index 21a3bc8b..fa989746 100644
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
@@ -290,8 +290,8 @@ main (int argc, char **argv)
290 } 290 }
291 291
292 for(i=0;i<nswaps;i++){ 292 for(i=0;i<nswaps;i++){
293 dsktotal_mb = (float) ent->se_nblks / conv_factor; 293 dsktotal_mb = (float) ent[i].se_nblks / conv_factor;
294 dskused_mb = (float) ent->se_inuse / conv_factor; 294 dskused_mb = (float) ent[i].se_inuse / conv_factor;
295 dskfree_mb = ( dsktotal_mb - dskused_mb ); 295 dskfree_mb = ( dsktotal_mb - dskused_mb );
296 296
297 if(allswaps && dsktotal_mb > 0){ 297 if(allswaps && dsktotal_mb > 0){