XM vcpu-pin/vcpu-list

Source: Internet
Author: User

Vcpu-list [domain-id]
Lists vcpu information for a specific domain. If no domain is
Specified, vcpu information for all domains will be provided.

 

Vcpu-pin domain-ID vcpu CPUs
Pins the vcpu to only run on the specific CPUs. The keyword
All can be used to apply the CPUs list to all vcpus in the domain.

Normally vcpus can float between available CPUs whenever xen deems
A different run state is appropriate. Pinning can be used
Restrict this, by ensuring certain vcpus can only run on certain
Physical CPUs. [expired after restart]


[Root @ localhost ~] # XM list
Name ID mem vcpus state time (s)
Domain-0 0 486 2 R ----- 341.0
Centosa 1 512 1-B ---- 36.1
[Root @ localhost ~] # XM vcpu-list
Name ID vcpu CPU state time (s) CPU affinity
Domain-0 0 0 r -- 121.2 any CPU
Domain-0 0 1 1-B-137.4 any CPU
Centosa 1 0 1-B-35.7 any CPU
[Root @ localhost ~] # XM vcpu-pin 0 0 0
[Root @ localhost ~] # XM vcpu-Pin 1 0 1
[Root @ localhost ~] # XM vcpu-list
Name ID vcpu CPU state time (s) CPU affinity
Domain-0 0 0 0 r -- 129.7 0
Domain-0 0 1 1-B-147.4 any CPU
Centosa 1 1 0 1-B-35.8 1
[Root @ localhost ~] # XM vcpu-pin 0 1 0
[Root @ localhost ~] # XM vcpu-list
Name ID vcpu CPU state time (s) CPU affinity
Domain-0 0 0 0 r -- 135.8 0
Domain-0 0 1 0-B-152.5 0
Centosa 1 1 0 1-B-35.9 1

1. Name:Guest (domain) Name
2. ID:Domain ID
3. vcpus:Number of virtual vcpus. 0 indicates the first percentile, and so on.
4. CPU:What is the physical CPU corresponding to the current vcpu.
5. State:
R-running
Currently, there are CPU-supported guest instances.
B-blocked
Maybe the guest is in sleep status or waiting for the I/O device.
P-paused
We can use XM pause domainid to bring the system into the pause mode. It is a bit like entering the S1-"Sleep" status.
6. Time (s ):So far, the CPU usage of domain is measured in seconds.
7. CPU affinity: The physical CPU corresponding to the vcpu of the guest instance. If any CPU is used, the system dynamically configures the vcpu,

 

Set (dom-CPUs = 1) in/etc/xen/xend-config.sxp.

Domain0 vcpu cannot be set through XM vcpu-pin. It can only be used for the above processing. to restart it, you can see that one of the statuses is pause.

XM vcpu-list
[Root @ localhost ~] # XM vcpu-list
Name ID vcpu CPU state time (s) CPU affinity
Domain-0 0 0 0 r -- 8266.6 0
Domain-0 0 1--- p 14.6 any CPU
Centosa 1 1 0 1-B-1405.0 1

The following command shows the CPU and memory usage of the tested Host:

Xentop-BN 1-I 61-D 1 | awk '{if ($1 =/^. * centos/) Print $4, $6 }'
 

 

More references: http://benjr.tw /? Q = node/374

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.