mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 11:22:55 +09: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:
1 parent
8044615406
commit
78bdb978bb
1 file changed
+2
-2
@@ -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`
|
||||
|
||||
|
||||
Reference in new issue
Block a user