[Nagiosplug-devel] [ nagiosplug-Bugs-1540327 ] check_disk C_IDFP/W_IDFP inputerror, affects 1.4.3 not 1.4.2
SourceForge.net
noreply at sourceforge.net
Fri Nov 3 04:20:07 CET 2006
Bugs item #1540327, was opened at 2006-08-14 18:25
Message generated for change (Comment added) made by sf-robot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1540327&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: None
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Karl Kornel (akkornel)
Assigned to: Ton Voon (tonvoon)
Summary: check_disk C_IDFP/W_IDFP inputerror, affects 1.4.3 not 1.4.2
Initial Comment:
The check_disk plugin that comes in nagios-plugins-
1.4.3 does not work for me:
$ ./check_disk -w 25% -c 10% -p /home
INPUT ERROR: C_IDFP (0.000000) should be less than
W_IDFP (0.0) and both should be between zero and 100
percent, inclusive for /home
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]
When I configured nagios-plugins-1.4.3, I ran
`./configure --prefix=/usr/local/nagios-stage --
disable-nls --disable-rpath --with-cgiurl=/cgi-bin --
with-nagios-user=nagios --with-nagios-group=nagios --
with-trusted-
path=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr
/local/sbin --with-mysql=/usr`, and got the following
results:
--with-ping6-command: /bin/ping6 -n -U -w %d -c %d %s
--with-ping-command: /bin/ping -n -U -w %d -c %d %s
--with-lwres: no
--with-ipv6: yes
--with-mysql: /usr/bin/mysql_config
--with-openssl: yes
--with-gnutls: no
--enable-emulate-getaddrinfo: no
--with-perl: /usr/bin/perl
--with-cgiurl: /cgi-bin
--with-nagios-user: nagios
--with-nagios-group: nagios
--with-trusted-
path: /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/us
r/local/sbin
Building check_disk on 1.4.3 resulted in the
following commands (and errors):
if gcc -DLOCALEDIR=\"/usr/local/nagios-
stage/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -
I.. -I../lib -I../intl -I/usr/include/ldap -
I/usr/include/postgresql -I/usr/include -Wall -g -
O2 -MT check_disk.o -MD -MP -
MF ".deps/check_disk.Tpo" -c -o check_disk.o
check_disk.c; \
then mv -
f ".deps/check_disk.Tpo" ".deps/check_disk.Po"; else
rm -f ".deps/check_disk.Tpo"; exit 1; fi
check_disk.c: In function 'main':
check_disk.c:171: warning: statement with no effect
check_disk.c:172: warning: statement with no effect
check_disk.c: At top level:
check_disk.c:47: warning: 'inode_format' defined but
not used
/bin/sh ../libtool --mode=link --tag=CC gcc -Wall -g -
O2 -L. -o check_disk check_disk.o
utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a
popen.o -lssl -lcrypto
gcc -Wall -g -O2 -o check_disk check_disk.o utils.o
popen.o -L/home/nagios/nagios-plugins-
1.4.3/plugins ../lib/libnagiosplug.a ../lib/libcoreuti
ls.a -lssl -lcrypto
NOTE: The check_disk that came with 1.4.2 was fine!
When I compiled nagios-plugins-1.4.2, I ran
`./configure`, and got the following results:
--with-perl: /usr/bin/perl
--with-cgiurl: /nagios/cgi-bin
--with-nagios-user: nagios
--with-nagios-group: nagios
--with-trusted-path: /bin:/sbin:/usr/bin:/usr/sbin
--with-ping-command: /bin/ping -n -U -w %d -c %d %s
--with-ping6-command: /bin/ping6 -n -U -w %d -c %d %s
--with-lwres: no
--with-ipv6: yes
--with-openssl: yes
--enable-emulate-getaddrinfo: no
Building check_disk on 1.4.2 resulted in the
following commands being executed:
if gcc -
DLOCALEDIR=\"/usr/local/nagios/share/locale\" -
DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl -
I/usr/include/ldap -I/usr/include/postgresql -
I/include -g -O2 -MT check_disk.o -MD -MP -
MF ".deps/check_disk.Tpo" -c -o check_disk.o
check_disk.c; \
then mv -
f ".deps/check_disk.Tpo" ".deps/check_disk.Po"; else
rm -f ".deps/check_disk.Tpo"; exit 1; fi
gcc -g -O2 -L. -L/usr/lib -o check_disk
check_disk.o
utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a
popen.o -I/usr/include
Finally, running v1.4.2 of check_disk gives me:
$ ./check_disk -w 25% -c 10% -p /home
DISK OK - free space: /home 46355 MB
(92%);| /home=4042MB;37797;45356;0;50396
----------------------------------------------------------------------
>Comment By: SourceForge Robot (sf-robot)
Date: 2006-11-02 19:20
Message:
Logged In: YES
user_id=1312539
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
----------------------------------------------------------------------
Comment By: Ton Voon (tonvoon)
Date: 2006-10-19 12:41
Message:
Logged In: YES
user_id=664364
Hi all,
Can you please try the check_disk in the snapshot. There have been major
changes, including initialising variables correctly.
http://nagiosplug.sf.net/snapshot.
I'll mark this call in pending - please update if it still a problem.
Ton
----------------------------------------------------------------------
Comment By: Hector Lasso (hectorlasso)
Date: 2006-09-04 15:19
Message:
Logged In: YES
user_id=1590688
I also had this problem on a server with SUSE (kernel
recompiled). After checking and checking I found out that on
the arguments processing function, when the option is -p
(line 457) the values are copied to a structure (a node of
a linked list), however the values of w_idfp and c_idfp are
not copied to the structure.
I addded the following two lines:
se->w_idfp = w_idfp;
se->c_idfp = c_idfp;
before the line "se->found = 0;"
recompiled and it worked fine.
I didn't have time to check all the code so the problem
might be somewhere else.
----------------------------------------------------------------------
Comment By: Augustine (augustine_ab)
Date: 2006-08-24 09:04
Message:
Logged In: YES
user_id=1583130
I experienced this problem when building plugins for AIX
(code works fine on linux). It appears the issue is
uninitialized name_list structure. My quick fix was to add
memset after each malloc:
se = (struct name_list *) malloc (sizeof (struct name_list));
memset(se,0,sizeof(struct name_list));
hope this helps.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1540327&group_id=29880
More information about the Devel
mailing list