openstack 命令行管理十七 - 宿主主机管理 (备忘)

帮助信息

[root@station140 ~(keystone_admin)]# nova help | grep hyper
    hypervisor-list     List hypervisors.
    hypervisor-servers  List instances belonging to specific hypervisors.
    hypervisor-show     Display the details of the specified hypervisor.
    hypervisor-stats    Get hypervisor statistics over all compute nodes.
    hypervisor-uptime   Display the uptime of the specified hypervisor.



查询物理服务器

nova hypervisor-list
+----+----------------------+
| ID | Hypervisor hostname  |
+----+----------------------+
| 1  | station140.cloud.com |
+----+----------------------+



显示某个物理主机详细信息方法

nova hypervisor-show station140.cloud.com
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property             | Value                                                                                                                                                                                                                   |
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| hypervisor_hostname  | station140.cloud.com                                                                                                                                                                                                    |
| cpu_info             | {"vendor": "Intel", "model": "Westmere", "arch": "x86_64", "features": ["rdtscp", "hypervisor", "avx", "osxsave", "xsave", "vmx", "pclmuldq", "ss", "ds", "vme"], "topology": {"cores": 1, "threads": 1, "sockets": 2}} |
| free_disk_gb         | -5                                                                                                                                                                                                                      |
| hypervisor_version   | 12001                                                                                                                                                                                                                   |
| disk_available_least | -18                                                                                                                                                                                                                     |
| local_gb             | 15                                                                                                                                                                                                                      |
| free_ram_mb          | 5312                                                                                                                                                                                                                    |
| id                   | 1                                                                                                                                                                                                                       |
| vcpus_used           | 1                                                                                                                                                                                                                       |
| hypervisor_type      | QEMU                                                                                                                                                                                                                    |
| local_gb_used        | 20                                                                                                                                                                                                                      |
| memory_mb_used       | 2560                                                                                                                                                                                                                    |
| memory_mb            | 7872                                                                                                                                                                                                                    |
| current_workload     | 0                                                                                                                                                                                                                       |
| vcpus                | 2                                                                                                                                                                                                                       |
| running_vms          | 1                                                                                                                                                                                                                       |
| service_id           | 4                                                                                                                                                                                                                       |
| service_host         | station140.cloud.com                                                                                                                                                                                                    |
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+


 


显示某个主机当前使用的资源方法

[root@station140 ~(keystone_admin)]# nova hypervisor-stats
+----------------------+-------+
| Property             | Value |
+----------------------+-------+
| count                | 1     |
| vcpus_used           | 0     |
| local_gb_used        | 0     |
| memory_mb            | 7872  |
| current_workload     | 0     |
| vcpus                | 2     |
| running_vms          | 0     |
| free_disk_gb         | 15    |
| disk_available_least | 7     |
| local_gb             | 15    |
| free_ram_mb          | 7360  |
| memory_mb_used       | 512   |
+----------------------+-------+



 

你可能感兴趣的:(openstack)