[Nagiosplug-devel] [ nagiosplug-Bugs-1476457 ] check_disk from 1.4.3 broken on Solaris

SourceForge.net noreply at sourceforge.net
Tue May 2 01:33:03 CEST 2006


Bugs item #1476457, was opened at 2006-04-26 00:05
Message generated for change (Comment added) made by tonvoon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1476457&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: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Jason Kau (bubbafat)
>Assigned to: Ton Voon (tonvoon)
Summary: check_disk from 1.4.3 broken on Solaris

Initial Comment:
1.4.2 generally worked fine:

darlene:/home/gtri/nagios/nagios-plugins-
1.4.2/plugins> ./check_disk -c 10% -w 20% -p /
DISK OK - free space: / 148 MB 
(62%);| /=92MB;192;216;0;240

But 1.4.3 is totally broken:

darlene:/home/gtri/nagios/nagios-plugins-
1.4.3/plugins> ./check_disk -c 10% -w 20% -p /
INPUT ERROR: C_IDFP 
(576757562146984196887840714641773148777678636223636702
2532588820893046978288185192879572621223612389130957129
0848500887014776227174023686652499354620705377775907971
98162364903456768.000000) should be less than W_IDFP 
(536865219293231826318811839788020090938367133084499836
1682498849996091152805464249751663763505429901150414412
5179723248934633655425911613390532121950804833986559378
194432.0) and both should be between zero and 100 
percent, inclusive for /
check_disk: Could not parse arguments
Usage: check_disk -w limit -c limit [-p path | -x 
device] [-t timeout][-m] [-e] [-W limit] [-K limit] [-
v] [-q]

I will look into the code when I get time but would 
appreciate someone else looking into it too and I'm 
not a great programmer (I'm the router/firewall guy).

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

>Comment By: Ton Voon (tonvoon)
Date: 2006-05-02 09:32

Message:
Logged In: YES 
user_id=664364

Jason, James,

Thanks for the report and the fix. This was on my list, but hadn't got round to 
it yet...

Applied to CVS now. Please try the snapshot at http://nagiosplug.sf.net/
snapshot.

BTW, pending means a call will be automatically closed, so that's not the right 
state to place the call into :)

Ton

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

Comment By: Jason Kau (bubbafat)
Date: 2006-05-01 20:08

Message:
Logged In: YES 
user_id=1495257

jfidell, your patch fixes the problem on Solaris it would 
appear:

darlene:/home/gtri/nagios/nagios-plugins-
1.4.3/plugins> ./check_disk -c 10% -w 20% -p /
DISK OK - free space: / 148 MB (62% 
inode=96%);| /=92MB;192;216;96;240

Someone please committ this to CVS

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

Comment By: James (jfidell)
Date: 2006-04-26 14:17

Message:
Logged In: YES 
user_id=1510516

I posted some details on this to the devel list a week or
so back:

On a quick inspection of the code it looks like the c_idfp
and w_idfp
elements of struct namelist aren't always being initialised
when they
should be.  The following patch fixes my particular problem:

--- check_disk.c~       2006-04-19 13:56:39.000000000 +0100
+++ check_disk.c        2006-04-19 15:23:11.000000000 +0100
@@ -462,6 +462,8 @@
       se->c_df = c_df;
       se->w_dfp = w_dfp;
       se->c_dfp = c_dfp;
+      se->w_idfp = w_idfp;
+      se->c_idfp = c_idfp;
       se->found = 0;
       se->found_len = 0;
       *pathtail = se;
@@ -547,6 +549,8 @@
     se->c_df = c_df;
     se->w_dfp = w_dfp;
     se->c_dfp = c_dfp;
+    se->w_idfp = w_idfp;
+    se->c_idfp = c_idfp;
     se->found =0;
     se->found_len = 0;
     *pathtail = se;

but it isn't clear to me whether a similar change is
required for the
options -x and -X

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

Comment By: Andreas Hoppe (ahoppe)
Date: 2006-04-26 09:39

Message:
Logged In: YES 
user_id=1510323

same here:
Solaris 9 SPARC, gcc 2.95.3, GNU-make 3.80

Version 1.4.2 works fine,
Version 1.4.3 wont accept the -p / -x parameter



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

Comment By: Jason Kau (bubbafat)
Date: 2006-04-26 00:09

Message:
Logged In: YES 
user_id=1495257

This is Solaris 8/SPARC system and gcc 3.3.2.  The same 
problem occurs when compiled on Solaris 7/SPARC system with 
egcs-1.1.2 so I don't think it's Solaris or compiler 
specific.

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

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




More information about the Devel mailing list