打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Show usage statistics for hosts and instances

Show usage statistics for hosts and instances

显示主机和实例的使用统计

You can show basic statistics on resource usage for hosts and instances.

你可以显示主机和实例的资源使用情况的基础统计。

Note

For more sophisticated monitoring, see the Ceilometer project, which is under development. You can also use tools, such as Ganglia or Graphite, to gather more detailed data.

注:对于复杂的监控,参看正在开发中的Ceilometer项目。您还可以使用工具,如Ganglia或Graphite,收集更详细的数据。

 

To show host usage statistics

显示主机使用情况统计

  1. List the hosts and the nova-related services that run on them:

    列出主机,及其运行在主机上面的nova-related服务:

    $ nova host-list
    +------------------+-------------+----------+| host_name        | service     | zone     |+------------------+-------------+----------+| devstack-grizzly | conductor   | internal || devstack-grizzly | compute     | nova     || devstack-grizzly | cert        | internal || devstack-grizzly | network     | internal || devstack-grizzly | scheduler   | internal || devstack-grizzly | consoleauth | internal |+------------------+-------------+----------+
  2. Get a summary of resource usage of all of the instances running on the host.

    主机上运行的所有实例的资源使用情况的汇总:

    $ nova host-describe devstack-grizzly
    +------------------+----------------------------------+-----+-----------+---------+| HOST             | PROJECT                          | cpu | memory_mb | disk_gb |+------------------+----------------------------------+-----+-----------+---------+| devstack-grizzly | (total)                          | 2   | 4003      | 157     || devstack-grizzly | (used_now)                       | 3   | 5120      | 40      || devstack-grizzly | (used_max)                       | 3   | 4608      | 40      || devstack-grizzly | b70d90d65e464582b6b2161cf3603ced | 1   | 512       | 0       || devstack-grizzly | 66265572db174a7aa66eba661f58eb9e | 2   | 4096      | 40      |+------------------+----------------------------------+-----+-----------+---------+

    The cpu column shows the sum of the virtual CPUs for instances running on the host.

    The memory_mb column shows the sum of the memory (in MB) allocated to the instances that run on the hosts.

    The disk_gb column shows the sum of the root and ephemeral disk sizes (in GB) of the instances that run on the hosts.

    cpu这一列,显示了运行在主机上的实例所拥有的虚拟CPU个数。

    memory_mb这一列,显示了分配给主机上运行实例的内存大小,单位:MB。

    disk_gb这一列,显示了分配给主机上运行实例的瞬时磁盘空间大小,单位:GB。

    Note

    These values are computed by using only information about the flavors of the instances that run on the hosts. This command does not query the CPU usage, memory usage, or hard disk usage of the physical host.

                             注:上表这些数据,仅仅只是根据运行在主机上的实例的配置信息计算出来的大概数据。这个指令并没有查询实际物理主机的CPU、内存、磁盘的使用情况。

To show instance usage statistics

显示实例的使用统计

  1. Get CPU, memory, I/O, and network statistics for an instance.

    First, list instances:

    取得实例的CPU、内存、I/O和网络的统计。首先,列出所有实例:

    $ nova list
    +--------------------------------------+----------------------+--------+------------+-------------+------------------+| ID                                   | Name                 | Status | Task State | Power State | Networks         |+--------------------------------------+----------------------+--------+------------+-------------+------------------+| 84c6e57d-a6b1-44b6-81eb-fcb36afd31b5 | myCirrosServer       | ACTIVE | None       | Running     | private=10.0.0.3 || 8a99547e-7385-4ad1-ae50-4ecfaaad5f42 | myInstanceFromVolume | ACTIVE | None       | Running     | private=10.0.0.4 |+--------------------------------------+----------------------+--------+------------+-------------+------------------+

    Then, get diagnostic statistics:

    接着,取得诊断的统计结果:

    $ nova diagnostics myCirrosServer
    +------------------+----------------+| Property         | Value          |+------------------+----------------+| vnet1_rx         | 1210744        || cpu0_time        | 19624610000000 || vda_read         | 0              || vda_write        | 0              || vda_write_req    | 0              || vnet1_tx         | 863734         || vnet1_tx_errors  | 0              || vnet1_rx_drop    | 0              || vnet1_tx_packets | 3855           || vnet1_tx_drop    | 0              || vnet1_rx_errors  | 0              || memory           | 2097152        || vnet1_rx_packets | 5485           || vda_read_req     | 0              || vda_errors       | -1             |+------------------+----------------+
  2. Get summary statistics for each tenant:

    取得每个租户的统计汇总:

    $ nova usage-list
    Usage from 2013-06-25 to 2013-07-24:+----------------------------------+-----------+--------------+-----------+---------------+| Tenant ID                        | Instances | RAM MB-Hours | CPU Hours | Disk GB-Hours |+----------------------------------+-----------+--------------+-----------+---------------+| b70d90d65e464582b6b2161cf3603ced | 1         | 344064.44    | 672.00    | 0.00          || 66265572db174a7aa66eba661f58eb9e | 3         | 671626.76    | 327.94    | 6558.86       |+----------------------------------+-----------+--------------+-----------+---------------+
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
七种WebSocket框架的性能比较 | 鸟窝
Cacti高级应用--打造自己的Cacti模板
亚马逊云计算主机产品介绍,免费一年的云资源价值几何? | Blog by Fiofer
linux virbr0是什么
OpenStack简介和相关资料
skyeye 配置
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服