mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
Fix for ticket #68.
git-svn-id: http://svn.opennebula.org/one/trunk@408 3034c82b-c49b-4eb3-8279-a7acafdc01c0
This commit is contained in:
parent
16d827024d
commit
28d3886f6a
@ -56,9 +56,9 @@ top_text.split(/\n/).each{|line|
|
||||
line[7..-1].split(",").each{|elemento|
|
||||
temp = elemento.strip.split("%")
|
||||
if temp[1]=="id"
|
||||
$free_cpu = temp[0]
|
||||
used = temp[0].to_f
|
||||
$used_cpu = (((100 - used)*100).round / 100).to_f.to_s
|
||||
idle = temp[0]
|
||||
$free_cpu = idle.to_f * $total_cpu.to_f / 100
|
||||
$used_cpu = $total_cpu.to_f - $free_cpu
|
||||
break
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user