[one-users] $total_memory in kvm.rb

Javier Fontan jfontan at fdi.ucm.es
Tue Mar 15 11:07:47 PDT 2011


You are right, thanks for the tip

On Tue, Mar 15, 2011 at 4:59 PM,  <knawnd at gmail.com> wrote:
> 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.
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>



-- 
Javier Fontan, Grid & Virtualization Technology Engineer/Researcher
DSA Research Group: http://dsa-research.org
Globus GridWay Metascheduler: http://www.GridWay.org
OpenNebula Virtual Infrastructure Engine: http://www.OpenNebula.org



More information about the Users mailing list