WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

Re: [Xen-API] question about check VM host cpu and ram

To: Olivier LAMBERT <lambert.olivier@xxxxxxxxx>
Subject: Re: [Xen-API] question about check VM host cpu and ram
From: Christopher Winslett <christopherwinslett@xxxxxxxxx>
Date: Fri, 18 Sep 2009 09:11:17 -0500
Cc: xen-api@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 18 Sep 2009 07:11:41 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=XApM151hC3n0y7GON/nqpynlZ8NkwXRFqNa1pFnIME4=; b=oV3qUk80CKikgL/5rqzky4XcaVA9d6necdcr9Xg/z6ZYp7KpfdFctXfOWYZpAYZYWJ manqe9jolcGgFpIXLv/odHhFJCRvl1OvW3KgDtTzcltyD1C7ejoY213V4+vL6urMd23I YWTbCFNIrB42tnO86owcLfShj/I0w2xKUVeik=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=Mtd55VHx7Jf/EmIYlzUvIUwvKTaMZIoIEjC701YcrsIkM4cs45CaHzIdNProIMJIIS PPIVhkAQxiMsAGfdowR+VGbg5YmUbcmP4jFdsrPyR7GgtPjGesAKRXheD+L/1i5/hv0R hvzHh7zDgXdwxGyJ5LSFlGUnhTLCQS2ApSsZI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <f769216c0909180558ye73dee0sd32bd0dd7d262955@xxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <f769216c0909180333s5c494a1aw7941034f06eb133e@xxxxxxxxxxxxxx> <96a7a7780909180501l5a679c9bhb7735d68248a9fa5@xxxxxxxxxxxxxx> <f769216c0909180558ye73dee0sd32bd0dd7d262955@xxxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
It is "normal" in that mine does the same thing.

We use Nagios for these metrics.

cw

On Fri, Sep 18, 2009 at 7:58 AM, Olivier LAMBERT <lambert.olivier@xxxxxxxxx> wrote:
Many thanks !

It's more clear for me now.
I've forgot the mid (what a shame :o )

But despite VM_metrics.get_record works, the current used memory is
"missing" (or not implemented). Damned :/
I've got :

VCPUs_params cpumap01,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
cap 0
weight 256
last_updated 20090918T12:46:32
uuid 6af1f0db-ee19-bf94-efa4-ca021080b1e3
VCPUs_flags 0 blocked online
start_time 20090918T09:58:38
memory_actual 268435456
state blocked
VCPUs_utilisation 0 0.00016007062223236292
VCPUs_number 1
VCPUs_CPU 0 2

Is it "normal" ?

Thanks.

On Fri, Sep 18, 2009 at 2:01 PM, Christopher Winslett
<christopherwinslett@xxxxxxxxx> wrote:
> Olivier,
> Use "VM_metrics" to see the the hardware reported metrics.
> Use "VM_guest_metrics" to see the VM reported metrics.  Probably need to
> install the XENSource kernel drivers on the guest OS to get these figures;
> all mine were null too.
> What type of figures are you looking for?
> The following RPC calls work for me:
>
> sid = Session ID
> mid = Metrics ID Associated with VM
>
> VM_metrics.get_record(sid, mid)
>
> It would return a value for memory_actual, VCPUs_number.
> In Ruby it would be the following RPC calls:
>
> require "XMLRPC/Client"
>
> s = XMLRPC::Client.new2("https://localhost")
> sid = s.call("session.login_with_password", "uname", "pass")["Value"]
>
> mid = "OpaqueRef:xxxxx"
>
> memory = s.call("VM_metrics.get_record", sid, mid)["Value"]["actual_memory"]
>
> That being said, to get utilization numbers, we use a network monitor system
> like Nagios.
> cw
>
> On Fri, Sep 18, 2009 at 5:33 AM, Olivier LAMBERT <lambert.olivier@xxxxxxxxx>
> wrote:
>>
>> I'm reading the Xen Management API pdf (Version: API Revision 1.0.6,
>> Date: 24th July 2008, Stable Release).
>> It talks about class "VM metrics" (§2.9) and  "VM guest metrics"
>> (§2.10). But all method call with these classes in RPC send me NULL
>> response.
>>
>> Despite it works fine for other classes, like VM, or network etc. All
>> classes with metrics seems to be not recognized by the API.
>>
>> Configuration : Dom0 on Debian Lenny, with xen-hypervisor-3.2-1-amd64.
>>
>> How can I do to gather informations about CPU, ram and network on
>> domU's with the API ?
>>
>>
>> Thank you,
>>
>>
>>
>> Olivier.
>>
>> _______________________________________________
>> xen-api mailing list
>> xen-api@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/mailman/listinfo/xen-api
>
>
>
> --
> Christopher Winslett
> christopherwinslett@xxxxxxxxx
>



--
Christopher Winslett
christopherwinslett@xxxxxxxxx
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>