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-users

[Xen-users] python: how do I know if domainU was rebooted.

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] python: how do I know if domainU was rebooted.
From: Wensheng Wang <wenshengwang@xxxxxxxxx>
Date: Thu, 27 Oct 2005 13:33:53 -0500
Delivery-date: Thu, 27 Oct 2005 18:31:21 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=oS6zAkk48TX6E+9E98mydaJ+1jrSbLB0Lo4yASZjaiUNeiqHO47Br8n2HouGfpa7W64oPsPxPAfLAuFZQtZ5WT9cepYqo89WmquNV5gX9r3QZRWlXsqsPealyLJtGK1RfUnb/jQVaQ/e510266Mu+/3Y1xuEi/m8txbMg0g07s0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hi,
I want to write a script to monitor domain U's,  and take note if a domain was rebooted.
I noticed if a domain is shutdown (halt) and then started again I have a record. However if a domain was just rebooted(either by type 'reboot' from inside domain or type 'xm shutdown -R' from outside), I have no record.

I found out what caused it. If a domain was rebooted, its uptime, start_time will not be reset.
for example, xen.sv.util.getDomInfoHash('sarge1') will give up_time, start_time etc. for domain "sarge1"
now after I rebooted sarge1,
xen.sv.util.getDomInfoHash('sarge1')['up_time'] will continue grow, and start_time doesn't change!

same thing if I use xen.xend.XendClient.server.xend_domain('sarge1')

So how can I determine if a domain was rebooted or rnot?

I use xen-devel 3.0 from fedora core 4.

Thanks

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>