ref: refs/heads/master
commit 28e11e51b8400f973f591b638859f94b0826d545
Author: Ladislav Slezak
Date: Thu Nov 5 11:09:33 2009 +0100
Revert "call rrdtool with C locale"
This reverts commit 47a4b097a518ea506c53c9b1657d7f0197adb953.
Oops, IO.popen doesn't start a shell, prepending "LC_ALL=C" doesn't work :-(
---
plugins/status/lib/status.rb | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/plugins/status/lib/status.rb b/plugins/status/lib/status.rb
index 8ea3c1c..81507f2 100644
--- a/plugins/status/lib/status.rb
+++ b/plugins/status/lib/status.rb
@@ -171,7 +171,7 @@ class Status
# fetch last 5 minutes
start = stop - 300 if start.nil?
- cmd = IO.popen("LC_ALL=C rrdtool fetch #{file} AVERAGE --start #{start.strftime("%H:%M,%m/%d/%Y")} --end #{stop.strftime("%H:%M,%m/%d/%Y")}")
+ cmd = IO.popen("rrdtool fetch #{file} AVERAGE --start #{start.strftime("%H:%M,%m/%d/%Y")} --end #{stop.strftime("%H:%M,%m/%d/%Y")}")
output = cmd.read
cmd.close
output
@@ -189,6 +189,7 @@ class Status
raise "Error running collectd rrdtool" if output =~ /ERROR/ or output.nil?
labels=""
+ output = output.gsub(",", ".") # translates eg. 1,234e+07 to 1.234e+07
lines = output.split "\n"
# set label names
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org