[Nagiosplug-devel] [ nagiosplug-Bugs-1433114 ] check_procs does not work with german locale

SourceForge.net noreply at sourceforge.net
Thu Feb 16 12:01:02 CET 2006


Bugs item #1433114, was opened at 2006-02-16 20:00
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1433114&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: Parsing problem
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Hadmut Danisch (hadmut)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_procs does not work with german locale

Initial Comment:
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.

regards
Hadmut


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

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




More information about the Devel mailing list