Wensheng Wang
2005-Oct-27 18:33 UTC
[Xen-users] python: how do I know if domainU was rebooted.
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@lists.xensource.com
http://lists.xensource.com/xen-users
Wensheng Wang
2005-Oct-28 18:16 UTC
[Xen-users] Re: python: how do I know if domainU was rebooted.
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@gmail.com> 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@lists.xensource.com http://lists.xensource.com/xen-users