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

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


  • To: xen-users@xxxxxxxxxxxxxxxxxxx
  • From: Wensheng Wang <wenshengwang@xxxxxxxxx>
  • Date: Fri, 28 Oct 2005 13:16:50 -0500
  • Delivery-date: Fri, 28 Oct 2005 18:14:03 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=WXSENSMmumIg4LwygSO2zD49fVhzru/Ukr6dqYb9nkKOXHU9RZgQGT2SRSwQ6VDTw/GX+NAOvneMuTIpcennGhw4YfUbFoYHZBaByb3oV13NOynYJV72nNOOWwvjcnMXcqvr9scLx2CWK76PQ+b8iS2+GdgsiKxOUvJjMXP36f4=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

Never mind, I found there is a restart_time in xen.xend.XendClient.server
.xend_domain()


Hope someone find this info useful



On 10/27/05, Wensheng Wang <wenshengwang@xxxxxxxxx> wrote:
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®.