1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-20 10:50:08 +03:00

feature #4083: Remove hidden chars and report exception(cherry picked from commit 34a5d7d124082758946ecd2974ed19703de78972)

This commit is contained in:
Daniel Molina 2015-11-06 10:30:04 +01:00 committed by Tino Vazquez
parent 0452f9068c
commit 46f5423dca

View File

@ -624,8 +624,9 @@ private
["Average"],
"Percent",
id)[:datapoints][-1][:average]
rescue # 
cpu = 0
rescue => e
STDERR.puts(e.message)
exit(-1)
end
@ -640,7 +641,9 @@ private
nettx_dp.each{|dp|
nettx += dp[:sum].to_i
}
rescue  
rescue => e
STDERR.puts(e.message)
exit(-1)
end
# NETRX
@ -654,7 +657,9 @@ private
netrx_dp.each{|dp|
netrx += dp[:sum].to_i
}
rescue  
rescue => e
STDERR.puts(e.message)
exit(-1)
end
"CPU=#{cpu.to_s} NETTX=#{nettx.to_s} NETRX=#{netrx.to_s} "