|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xl: print runtime info in "xl list -l"
On Wed, Sep 25, 2013 at 06:56:36PM +0100, Ian Campbell wrote:
> On Wed, 2013-09-25 at 13:41 -0400, Konrad Rzeszutek Wilk wrote:
> > On Thu, Sep 12, 2013 at 01:52:09PM +0100, Ian Campbell wrote:
> > > On Wed, 2013-09-04 at 10:04 -0400, Konrad Rzeszutek Wilk wrote:
> > > > - No status in xl list -l when only dom0 is present.
> > >
> > > Which bits of status are you interested in?
> >
> > The
> > (status 2)
>
> Oh, I thought you might mean the "(state r-----)" bit which I know and
> understand. I've no idea what this 2 status is -- any idea what it
> means/relates to?
It looks to be
(status 2)
(state -b----)
def _stateGet(self):
# Lets try and reconsitute the state from xc
# first lets try and get the domain info
# from xc - this will tell us if the domain
# exists
info = dom_get(self.getDomid())
if info is None or info['shutdown']:
# We are either HALTED or SUSPENDED
# check saved image exists
from xen.xend import XendDomain
managed_config_path = \
XendDomain.instance()._managed_check_point_path( \
self.get_uuid())
if os.path.exists(managed_config_path):
return XEN_API_VM_POWER_STATE_SUSPENDED
else:
return XEN_API_VM_POWER_STATE_HALTED
elif info['crashed']:
# Crashed
return XEN_API_VM_POWER_STATE_CRASHED
else:
# We are either RUNNING or PAUSED
if info['paused']:
return XEN_API_VM_POWER_STATE_PAUSED
else:
return XEN_API_VM_POWER_STATE_RUNNING
which is
XEN_API_VM_POWER_STATE_HALTED = 0
XEN_API_VM_POWER_STATE_PAUSED = 1
XEN_API_VM_POWER_STATE_RUNNING = 2
XEN_API_VM_POWER_STATE_SUSPENDED = 3
XEN_API_VM_POWER_STATE_SHUTTINGDOWN = 4
XEN_API_VM_POWER_STATE_CRASHED = 5
XEN_API_VM_POWER_STATE_UNKNOWN = 6
>
> > field.
> > >
> > > I'm thinking something like the following, which will include the
> > > content of libxl_dominfo for every domain.
> > >
> > > 8<----------------------------------
> > >
> > > >From ee9fb6c41cd53afd4983fd2e21ad0e39f178c066 Mon Sep 17 00:00:00 2001
> > > From: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > > Date: Thu, 12 Sep 2013 13:50:33 +0100
> > > Subject: [PATCH] xl: print runtime info in "xl list -l"
> > >
> > > Include dom0 runtime information, but not domain config.
> >
> > With that I get (with /etc/xen/xl.conf having output_mode=sxp)
>
> Actually, I probably didn't hook up the sxp case, oops!
Ah.
>
> Should be easy enough to add though.
>
> Ian.
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |