From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH] xl: print runtime info in "xl list -l" Date: Wed, 25 Sep 2013 14:25:39 -0400 Message-ID: <20130925182539.GA7473@phenom.dumpdata.com> References: <1377906042-12816-1-git-send-email-msw@linux.com> <20130902203256.GA23391@u109add4315675089e695.ant.amazon.com> <1378195426.7651.57.camel@kazak.uk.xensource.com> <20130904060642.GB25227@u109add4315675089e695.ant.amazon.com> <1378279747.6935.22.camel@dagon.hellion.org.uk> <20130904140414.GA3188@phenom.dumpdata.com> <1378990329.10076.54.camel@kazak.uk.xensource.com> <20130925174157.GA7253@phenom.dumpdata.com> <1380131796.30708.64.camel@dagon.hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VOtmc-0001iY-Ax for xen-devel@lists.xenproject.org; Wed, 25 Sep 2013 18:25:54 +0000 Content-Disposition: inline In-Reply-To: <1380131796.30708.64.camel@dagon.hellion.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Steven Noonan , Stefano Stabellini , George Dunlap , Matt Wilson , Ian Jackson , Matt Wilson , xen-devel , zhigang.x.wang@oracle.com List-Id: xen-devel@lists.xenproject.org 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 > > > 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. >