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] Retrieving XEN Server available and XEN memory

To: "Caruso, Joseph" <Joseph.Caruso@xxxxxxxxxxx>
Subject: Re: [Xen-API] Retrieving XEN Server available and XEN memory
From: "Roger R. Smith" <rogsmith@xxxxxxxxx>
Date: Fri, 30 May 2008 14:33:19 -0400
Cc: xen-api@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 30 May 2008 12:00:02 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=qK110tJkxl/3NztALF2IyArIH8kxp9xvlh8LuqqjslM=; b=lD0uKr35Ix6MZWqGD87LgL4XbvoJOP8+K5rTXfWzyYNgl9/lA7hqB5C5aiBxOV3KFcVc29JZoXrAD5UwY5LfwqfrvqBFVHhHbIYRDAZFN5gDJ/aYoVuKJP15gh5IfiHcf1otSX0xmzJElQisgCk6zwRH5a+kGbn3CI3qOLSx16w=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Pa5gIB16ttP1PlCUVd6Hz9GNYNfDIpfFRLYfb6nx4sPa71V1Wz0eUSg79doMm8x8dOrPcTZqxQtobC7pgSd17ct0E3RqXwdxTlaclslEhO1FBKV1h3FjHoDyzCKY+M3DBkKiXGsq/QO01jxDBx8xQX2TTGtu0NVzPKZapvZM/os=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4821D5B6CD3C1B4880E6E94C6E70913E02DA8AD2@xxxxxxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <4821D5B6CD3C1B4880E6E94C6E70913E02DA8AD2@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Hi Joseph you can do something like this:

$guestRef = VM.get_guest_metrics($vmRef);
$getMet = VM_guest_metrics.get_record($guestRef);

$getMet['memory']['free']
$getMet['memory']['total']

Hope that helps.
-Rog

On Fri, May 30, 2008 at 1:32 PM, Caruso, Joseph
<Joseph.Caruso@xxxxxxxxxxx> wrote:
> Hello,
>
>
>
> Does anyone know how to retrieve either the amount of available server
> memory (not the total) or the amount of memory used by Xen?     Using the
> host metrics object I able to retrieve both the total and free server
> memory.   The Xen Center (see General tab)  memory section displays:
>
>
>
>      Server:        Sun-STZENS1:   1.7 GB free of 3.7 GB available (4.0GB
> total)
>
>
>
>      VMs:
>
>
>
>
>
>      Xen:            336.1 MB
>
>
>
>
>
> I want to retrieve the underlined values via the API.
>
>
>
> Thanks,
> Joe
>
>
>
> _______________________________________________
> xen-api mailing list
> xen-api@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api
>
>

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api

<Prev in Thread] Current Thread [Next in Thread>