xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Steven Noonan <snoonan@amazon.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Matt Wilson <msw@linux.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Matt Wilson <msw@amazon.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	zhigang.x.wang@oracle.com
Subject: Re: [PATCH] xl: print runtime info in "xl list -l"
Date: Wed, 25 Sep 2013 14:25:39 -0400	[thread overview]
Message-ID: <20130925182539.GA7473@phenom.dumpdata.com> (raw)
In-Reply-To: <1380131796.30708.64.camel@dagon.hellion.org.uk>

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@citrix.com>
> > > 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.
> 

  reply	other threads:[~2013-09-25 18:25 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-30 23:40 [PATCH] xend: handle extended PCI configuration space when saving state Matt Wilson
2013-09-02  9:53 ` George Dunlap
2013-09-02 20:32   ` xend deprecation [Was: Re: [PATCH] xend: handle extended PCI configuration space when saving state] Matt Wilson
2013-09-03  8:03     ` Ian Campbell
2013-09-04  6:06       ` xend deprecation Matt Wilson
2013-09-04  7:29         ` Ian Campbell
2013-09-04 14:04           ` Konrad Rzeszutek Wilk
2013-09-04 15:18             ` George Dunlap
2013-09-04 15:34               ` Ian Campbell
2013-09-04 15:43                 ` Ian Jackson
2013-09-12 10:02                   ` Ian Campbell
2013-09-12 10:15                     ` Processed: " xen
2013-09-12 11:10                     ` Ian Jackson
2013-09-04 15:49                 ` Tim Deegan
2013-09-04 16:17                   ` Ian Jackson
2013-09-04 16:24                     ` Ian Campbell
2013-09-04 16:33                 ` Konrad Rzeszutek Wilk
2013-09-05  9:12                   ` George Dunlap
2013-09-06 13:36                     ` Konrad Rzeszutek Wilk
2013-09-06 13:49                       ` Ian Campbell
2013-09-06 14:01                         ` Jan Beulich
2013-09-06 14:15                           ` Ian Campbell
2013-09-05 10:18                   ` Fabio Fantoni
2013-09-05 10:27                     ` George Dunlap
2013-09-05 10:46                 ` George Dunlap
2013-09-04 16:29               ` Konrad Rzeszutek Wilk
2013-09-12 12:52             ` [PATCH] xl: print runtime info in "xl list -l" Ian Campbell
2013-09-25 17:41               ` Konrad Rzeszutek Wilk
2013-09-25 17:56                 ` Ian Campbell
2013-09-25 18:25                   ` Konrad Rzeszutek Wilk [this message]
2013-09-25 17:59                 ` Ian Campbell
2013-09-25 18:27                   ` Konrad Rzeszutek Wilk
2013-10-28 15:51                     ` Wei Liu
2013-09-12 14:02             ` xend deprecation Ian Campbell
2013-10-21 14:09             ` Wei Liu
2013-10-21 15:13               ` Zhigang Wang
2013-10-21 15:33               ` Ian Campbell
2013-10-21 15:35               ` Ian Campbell
2013-09-04 12:57         ` Stefano Stabellini
2013-09-12  9:50     ` Support for xm create -F (sxp configuration files) Ian Campbell
2013-09-12 10:00       ` Processed: " xen
2013-09-16 16:49       ` Matt Wilson
2013-11-05 14:39         ` Ian Campbell
2013-11-05 14:45           ` Processed: " xen
2013-09-03 16:33 ` [PATCH] xend: handle extended PCI configuration space when saving state Ian Campbell
2013-09-04  6:12   ` Matt Wilson
2013-09-04  6:47     ` Noonan, Steven
2013-09-04  7:30       ` Ian Campbell
2013-09-04 10:14   ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130925182539.GA7473@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=msw@amazon.com \
    --cc=msw@linux.com \
    --cc=snoonan@amazon.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    --cc=zhigang.x.wang@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).