0

我昨天安装了 Openstack Ceilometer。并且有一个名为 的资源 id c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4。我ceilometer meter-list -q resource_id=c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4用来显示仪表。这是详细数据:

 [root@localhost ~(keystone_admin)]# ceilometer meter-list -q resource_id=c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4
+---------------------+------------+----------+--------------------------------------+--   --------------------------------+----------------------------------+
| Name                | Type       | Unit     | Resource ID                          |  User ID                          | Project ID                       |
+---------------------+------------+----------+--------------------------------------+--  --------------------------------+----------------------------------+
| cpu                 | cumulative | ns       | c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 |    c9d2099dd6e14a669454e810fc77e6bc | 85db606ad26d45eb80a98aadffa5fd7a |
| cpu_util            | gauge      | %        | c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 |  c9d2099dd6e14a669454e810fc77e6bc | 85db606ad26d45eb80a98aadffa5fd7a |
| disk.ephemeral.size | gauge      | GB       | c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | c9d2099dd6e14a669454e810fc77e6bc | 85db606ad26d45eb80a98aadffa5fd7a |
| disk.read.bytes     | cumulative | B        | c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | c9d2099dd6e14a669454e810fc77e6bc | 85db606ad26d45eb80a98aadffa5fd7a |
| disk.read.requests  | cumulative | request  | c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | c9d2099dd6e14a669454e810fc77e6bc | 85db606ad26d45eb80a98aadffa5fd7a |
| disk.root.size      | gauge      | GB       | c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | c9d2099dd6e14a669454e810fc77e6bc | 85db606ad26d45eb80a98aadffa5fd7a |
| disk.write.bytes    | cumulative | B        | c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | c9d2099dd6e14a669454e810fc77e6bc | 85db606ad26d45eb80a98aadffa5fd7a |
| disk.write.requests | cumulative | request  | c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | c9d2099dd6e14a669454e810fc77e6bc | 85db606ad26d45eb80a98aadffa5fd7a |
| instance            | gauge      | instance | c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | c9d2099dd6e14a669454e810fc77e6bc | 85db606ad26d45eb80a98aadffa5fd7a |
| instance.scheduled  | delta      | instance | c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | c9d2099dd6e14a669454e810fc77e6bc | 85db606ad26d45eb80a98aadffa5fd7a |
| instance:m1.tiny    | gauge      | instance | c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | c9d2099dd6e14a669454e810fc77e6bc | 85db606ad26d45eb80a98aadffa5fd7a |
| memory              | gauge      | MB       | c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | c9d2099dd6e14a669454e810fc77e6bc | 85db606ad26d45eb80a98aadffa5fd7a |
| vcpus               | gauge      | vcpu     | c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | c9d2099dd6e14a669454e810fc77e6bc | 85db606ad26d45eb80a98aadffa5fd7a |
+---------------------+------------+----------+--------------------------------------+----------------------------------+----------------------------------+

我用ceilometer sample-list -q resource_id=c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 -m disk.write.bytes来看disk.write.bytes。这是显示:

+--------------------------------------+------------------+------------+------------+------+---------------------+
| Resource ID                          | Name             | Type       | Volume     |  Unit | Timestamp           |
+--------------------------------------+------------------+------------+------------+------+---------------------+
| c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | disk.write.bytes | cumulative | 32139264.0 | B      | 2014-04-28T11:23:08 |
| c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | disk.write.bytes | cumulative | 32139264.0 | B    | 2014-04-28T11:13:08 |
| c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | disk.write.bytes | cumulative | 32139264.0 | B    | 2014-04-28T11:03:08 |
| c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | disk.write.bytes | cumulative | 32139264.0 | B    | 2014-04-28T10:53:08 | 
| c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | disk.write.bytes | cumulative | 32139264.0 | B    | 2014-04-28T10:43:08 |
| c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | disk.write.bytes | cumulative | 32139264.0 | B        | 2014-04-28T10:33:08 |
| c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | disk.write.bytes | cumulative | 32139264.0 | B    | 2014-04-28T10:23:08 |
| c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | disk.write.bytes | cumulative | 32139264.0 | B    | 2014-04-28T10:13:08 |
| c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | disk.write.bytes | cumulative | 32139264.0 | B    | 2014-04-28T10:05:22 |
| c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | disk.write.bytes | cumulative | 32134144.0 | B    | 2014-04-28T09:49:19 |
| c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | disk.write.bytes | cumulative | 32134144.0 | B    | 2014-04-28T09:39:19 |
| c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | disk.write.bytes | cumulative | 32134144.0 | B    | 2014-04-28T09:29:20 |
| c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 | disk.write.bytes | cumulative | 162816.0   | B    | 2014-04-28T09:19:19 |
+--------------------------------------+------------------+------------+------------+------+---------------------+

现在,问题来了。我想看one of the disk.write.bytes数据。这个shell是怎么写的?有人帮助我吗?非常感谢!

4

1 回答 1

0
ceilometer sample-list -q resource_id=c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 -m disk.write.bytes -l 1

-l 1--limit 1只会返回一个结果

同时,您可以使用ceilometer --debug sample-list -q resource_id=c4371f8f-6e4b-41b0-8c2f-3857fe8e38a4 -m disk.write.bytes -l 1查看详细信息

于 2014-10-31T10:33:07.937 回答