From Fedora Project Wiki

No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 12: Line 12:


   ceilometer meter-list | head -3 ; ceilometer meter-list | grep -E 'cpu|disk|instance'
   ceilometer meter-list | head -3 ; ceilometer meter-list | grep -E 'cpu|disk|instance'
Pick an active instance:
  INSTANCE_ID=$(nova list | awk '/ACTIVE/ {print $2}' | head -1)
then view the CPU utilization (%) samples for that instance:
  ceilometer sample-list -c cpu_util -r $INSTANCE_ID
Hammer that instance with spurious CPU load, for example using the simple script described here:
  http://unixfoo.blogspot.ie/2008/11/linux-cpu-hammer-script.html
then observe subsequent CPU util samples:
  ceilometer sample-list -c cpu_util -r $INSTANCE_ID
(noting that the ceilometer client output is not timestamp-sorted).

Latest revision as of 15:13, 2 April 2013

The ceilometer compute agent interacts with both the public nova API and the hypervisor layer.

The former requires that the appropriate credentials are configured:

 sudo openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT os_auth_url http://127.0.0.1:35357/v2.0
 sudo openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT os_tenant_name demo
 sudo openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT os_username admin
 sudo openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT os_password secrete
 sudo service openstack-ceilometer-compute restart

Use the ceilometer CLI to see the instance-related meters:

  ceilometer meter-list | head -3 ; ceilometer meter-list | grep -E 'cpu|disk|instance'

Pick an active instance:

 INSTANCE_ID=$(nova list | awk '/ACTIVE/ {print $2}' | head -1)

then view the CPU utilization (%) samples for that instance:

 ceilometer sample-list -c cpu_util -r $INSTANCE_ID

Hammer that instance with spurious CPU load, for example using the simple script described here:

 http://unixfoo.blogspot.ie/2008/11/linux-cpu-hammer-script.html

then observe subsequent CPU util samples:

 ceilometer sample-list -c cpu_util -r $INSTANCE_ID

(noting that the ceilometer client output is not timestamp-sorted).