17.3. Monitoring and Diagnostics

17.3. Monitoring and Diagnostics

17.3. Monitoring and Diagnostics

17.3.1. Performing a Core Dump

You can use xm to perform a memory dump of an existing virtual machine.

 
xm dump-core [-C] [domain-id] 

This command dumps the virtual machine's memory to the xendump file located in the /var/xen/dump/ directory. You can terminate the virtual machine by including the -C option.

17.3.2. Monitoring Domains in Real Time

You can use xm to monitor domains and hosts in real time:

 
xm top [domain-id] 

17.3.3. Displaying Domain States

You can use xm to display the domain activity states of one or more domains:

 
xm list [domain-id] [ ——long  |  ——label] 

You can specify a specific domain(s) by name (s). The [——long] option provides a more detailed breakdown of the domain you specified. The [——label] domain adds an additional column that displays label status. The outputs displays:

Name                ID           Mem(MiB)       VCPUs       State      Time      Label
————————————————
Domain0            0                  927                8              r——————   204.9   INACTIVE                                             
Domain202        1                  927                8    	 s——————     205.0/command ACTIVE                                                                       
DomainQ/A       2                  927	         8              b——————      INACTIVE
Domain9600      3                  927                8              c——————      205.1 ACTIVE 

Here are the six domain states per VCPU:

State Description

running

lists domains currently active on a CPU

blocked

lists domains that are blocked (a domain becomes blocked when the vcpu is awaiting for an external event to happen)

paused

lists domains that are suspended

shutdown

lists domains that are in process of shutting down

shutoff

lists domains that are completely down.

crashed

lists domains that are crashed

inactive

lists domains that are inactive instances

——all

lists domains that are both active and inactive vcpu instances

Table 17.3. The Domain States