[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: xen-users@xxxxxxxxxxxxxxxxxxx
  • 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=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.