[Pkg-nagios-devel] Bug#353201: nagios-plugins-basic: plugins can fail if locale is set

Hadmut Danisch hadmut at danisch.de
Thu Feb 16 20:01:33 UTC 2006


Package: nagios-plugins-basic
Version: 1.4.2-6
Severity: normal

Hi,

check_procs does not work properly if used in Germany. 

Reason:

In Germany/Europe floating numbers are written with a decimal comma
instead of a decimal point. When you set LC_NUMERIC to something like
de_DE, the function sscanf expects a decimal comma, not a decimal
point.


check_procs calls 

  /bin/ps axwo 'stat uid pid ppid vsz rss pcpu comm args'

and then parses the output. That's where trouble begins. 
The %CPU is written as 0.0, but sscanf now expects a comma. It
therefore scans only "0", and leaves ".0" for the next argument, thus
shifting all subsequent arguments one to the right. 

check_procs -C something
therefore does not work anymore.

(Upstream bug reportet as #1433114)

regards
Hadmut



-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-danisch-p4-intel
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)

Versions of packages nagios-plugins-basic depends on:
ii  iputils-ping                3:20020927-3 Tools to test the reachability of 
ii  libc6                       2.3.5-12.1   GNU C Library: Shared libraries an
ii  libssl0.9.8                 0.9.8a-6     SSL shared libraries
ii  procps                      1:3.2.6-2    /proc file system utilities

nagios-plugins-basic recommends no packages.

-- no debconf information




More information about the Pkg-nagios-devel mailing list