[one-users] $total_memory in kvm.rb
knawnd at gmail.com
knawnd at gmail.com
Tue Mar 15 08:59:33 PDT 2011
Hi!
The value for $total_memory variable in
$ONE_LOCATION/var/remotes/im/kvm.d/kvm.rb is defined twice:
1) in line 38 as
nodeinfo_text.split(/\n/).each{|line|
if line.match('^CPU\(s\)')
$total_cpu = line.split(":")[1].strip.to_i * 100
elsif line.match('^CPU frequency')
$cpu_speed = line.split(":")[1].strip.split(" ")[0]
elsif line.match('^Memory size')
$total_memory = line.split(":")[1].strip.split(" ")[0]
end
}
and
2) in line 68
$total_memory = `free -k|grep "Mem:" | awk '{print $2}'`
I guess first one is useless since it is overwritten by second one.
I mean the development version of OpenNebula.
Nikolay.
More information about the Users
mailing list