mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-11 05:17:41 +03:00
Getting more accurate free memory from physical hosts. Fixed ticket #62
git-svn-id: http://svn.opennebula.org/one/trunk@300 3034c82b-c49b-4eb3-8279-a7acafdc01c0
This commit is contained in:
parent
8044615406
commit
78bdb978bb
@ -32,8 +32,6 @@ top_text.split(/\n/).each{|line|
|
||||
temp = elemento.strip.split("k ")
|
||||
if temp[1] == "used"
|
||||
$used_memory = temp[0]
|
||||
elsif temp[1] == "free"
|
||||
$free_memory = temp[0]
|
||||
end
|
||||
}
|
||||
|
||||
@ -50,6 +48,8 @@ top_text.split(/\n/).each{|line|
|
||||
}
|
||||
end
|
||||
}
|
||||
|
||||
$free_memory=`free -k|grep "buffers\/cache"|awk '{print $4}'`
|
||||
|
||||
net_text=`cat /proc/net/dev`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user