1 | Verify that virt plugin dispatches CMT metrics. | - Start collectd with virt plugin and write plugin enabled(Interval is set to 1 second):
Interval 1 - Get cmt metric from VM.
root@silpixa00390838:~/orest/dpdk_xstats-collectd# virsh domstats demo --perf Domain: 'demo' perf.cmt=196608 perf.cpu_cycles=711466301 perf.instructions=682427381 - Wait 10 seconds(this is done in order to catch value written by collectd)
- Stop collectd
- Get collectd data:
root@silpixa00390838:~/orest/csv# tail -f demo/virt/perf-perf_cmt-2016-12-27 1482836073.410,229376.000000 1482836074.408,327680.000000 1482836075.408,425984.000000 Verify that value perf.cmt=196608 is present in collectd data.
| Since cmt performance metric is continuously changing it is complicated to catch equal values in virsh and collectd data. Therefore we are verifying that perf.cmt=196608 is present in collectd data. | Pass |
2 | Verify that virt plugin does not dispatch CMT metrics when CMT has been disabled in VM | - Make sure that CMT metrics are dispatched by collectd:
tail -f demo/virt/perf-perf_cmt-2016-12-29 1483023819.786,1376256.000000 1483023821.786,1376256.000000 1483023823.786,1376256.000000 Disable CMT metric in VM: virsh perf demo --disable cmt --live - Verify that plugin stops dispatching cmt metrics:
tail -f demo/virt/perf-perf_cmt-2016-12-29 1483023819.786,1376256.000000 1483023821.786,1376256.000000 1483023823.786,1376256.000000
| Virt plugin should stop dispatching CMT metric when CMT is dynamically disabled for VM. | PASS |
3 | Verify that virt plugin dispatches CPU pinning info metrics. | - Get CPU pinnning info using virsh tool:
root@silpixa00390838:~# virsh vcpupin demo VCPU: CPU Affinity ---------------------------------- 0: 0-15 - Make sure that CPU pinning info metric is dispatched for all CPUs by collectd:
root@silpixa00390838:~/orest/csv# ls demo/virt/cpu_affinity-vcpu_0-cpu_ cpu_affinity-vcpu_0-cpu_0-2017-01-03 cpu_affinity-vcpu_0-cpu_12-2017-01-03 cpu_affinity-vcpu_0-cpu_2-2017-01-03 cpu_affinity-vcpu_0-cpu_6-2017-01-03 cpu_affinity-vcpu_0-cpu_10-2017-01-03 cpu_affinity-vcpu_0-cpu_13-2017-01-03 cpu_affinity-vcpu_0-cpu_3-2017-01-03 cpu_affinity-vcpu_0-cpu_7-2017-01-03 cpu_affinity-vcpu_0-cpu_11-2017-01-03 cpu_affinity-vcpu_0-cpu_14-2017-01-03 cpu_affinity-vcpu_0-cpu_4-2017-01-03 cpu_affinity-vcpu_0-cpu_8-2017-01-03 cpu_affinity-vcpu_0-cpu_1-2017-01-03 cpu_affinity-vcpu_0-cpu_15-2017-01-03 cpu_affinity-vcpu_0-cpu_5-2017-01-03 cpu_affinity-vcpu_0-cpu_9-2017-01-03 root@silpixa00390838:~/orest/csv# tail -f demo/virt/cpu_affinity-vcpu_0-cpu_0-2017-01-03 1483439612.731,1.000000 1483439614.729,1.000000
| VCPU pinning info is dispatched for all CPUs: root@silpixa00390838:~/orest/csv# tail -f demo/virt/cpu_affinity-vcpu_0-cpu_0-2017-01-03 1483439612.731,1.000000 1483439614.729,1.000000 VCPU-0 is pinned to all 16 CPUs as it shown by virsh tool. | PASS |
4 | Verify that virt plugin change CPU pinning info metric when its value is changed. | Get CPU pinning info using virsh tool: root@silpixa00390838:~# virsh vcpupin demo VCPU: CPU Affinity ---------------------------------- 0: 0-15 Make sure that pinning value for CPU-15 is equal to 1 in write collectd data: root@silpixa00390838:~/orest/csv# tail -f demo/virt/cpu_affinity-vcpu_0-cpu_15-2017-01-03 1483440114.729,1.000000 1483440116.729,1.000000 1483440118.729,1.000000 1483440120.729,1.000000 Change CPU pinning using virsh tool: root@silpixa00390838:~# virsh vcpupin demo --vcpu 0 --cpulist 0-14 Verify that CPU pinning info is changed to 0 in write collectd data: root@silpixa00390838:~/orest/csv# tail -f demo/virt/cpu_affinity-vcpu_0-cpu_15-2017-01-03 1483440132.730,1.000000 1483440134.729,1.000000 1483440136.729,0.000000 1483440138.729,0.000000
| CPU pinning info is changed to 0 in collectd data when its value was changed using virsh tool. | PASS |
5 | Verify that virt plugin dispatches CPU utilization per VCPU in nanosecond format | - Start collectd with virt plugin and write plugin enabled.
- Get vcpu metric from VM.
- Wait collectd interval time for value update.
- Stop collectd and get collectd data.
- Compare utilizations for all vcpu in VM.
| - Collectd, libvirt are running.
- virsh vcpuinfo U2
VCPU: 0 CPU time: 668.8s - -
- tail -n2 U2/virt/virt_vcpu-0-2017-02-14
1487092445.317,668860000000 1487092450.319,668860000000 - Values are equal (in seconds).
| PASS |
6 | Verify that notification raised when changed Virtual Machine state . | - Start VM: virsh start vm_name
- Using exec plugin get notification message.
- Reset VM: virsh reset vm_name
- Using exec plugin get notification message.
Suspend VM: virsh suspend vm_name - Using exec plugin get notification message.
Resume VM: virsh resume vm_name - Using exec plugin get notification message.
| Notification message with reason: "normal startup from boot" appears Notification message with reason: "normal startup from boot" appears Notification message with reason: "paused on user request" appears Notification message with reason: "returned from paused state" appears | PASS |
7 | Verify that virt plugin starts dispatching data for newly created VM within RefreshInterval. | - One VM is in running state:
root@silpixa00390838:~# virsh list --all Id Name State ---------------------------------------------------- 4 demo running - demo1 shut off Set RefreshInterval to 10 seconds in collectd.conf: RefreshInterval 10 Start collectd and immediately start second VM. root@silpixa00390838:~# virsh start demo1 - Make sure that data occurs after Refresh Interval.
| Collectd dispatches VM metrics after RefreshInterval for newly created VM. | PASS |
8 | Verify that virt plugin stops dispatching data for deleted VM. | - Two VMs are running:
root@silpixa00390838:~# virsh list Id Name State ---------------------------------------------------- 4 demo running 5 demo1 running Set RefreshInterval to 10 seconds in collectd.conf: RefreshInterval 10 - Start collectd, immediately stop second VM and remove collectd data.
- Make sure that some collectd metrics are still dispatched(State metrics)
root@silpixa00390838:~/orest/csv# ls; virsh destroy demo1; rm -rf ./*; sleep 2; tail -f demo1/virt/domain_state-2017-01-03; demo demo1 Domain demo1 destroyed epoch,state,reason 1483443087.341,5.000000,2.000000 1483443089.340,5.000000,2.000000 1483443091.341,5.000000,2.000000 1483443093.340,5.000000,2.000000 - Verify that collectd metrics stops dispatching after RefreshInterval
| Virt plugin stops dispatching data after VM is deleted within RefreshInterval. | PASS |
9 | Verify that virt plugin resumes dispatching data after libvirtd has been restarted | - Restart libvirtd service.
root@silpixa00390838:~# systemctl restart libvirtd - Wait until service is restarted.
root@silpixa00390838:~# systemctl status libvirtd ? libvirt-bin.service - Virtualization daemon Loaded: loaded (/lib/systemd/system/libvirt-bin.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2017-01-03 11:36:04 GMT; 1min 49s ago - Verify that virt plugin resumes collecting metrics.
| Virt plugin resumes collecting metrics after libvirtd service has been restarted. | PASS |
10 | Verify that virt plugin resumes dispatching data after VM has been restarted | - Restart VM:
root@silpixa00390838:~# virsh destroy demo Domain demo destroyed root@silpixa00390838:~# virsh start demo Domain demo started - Tail one of VM metrics(CPU total utilization):
root@silpixa00390838:~/orest/csv# tail -f demo/virt/percent-virt_cpu_total-2017-01-03 1483443552.844,0.000000 1483443554.844,0.031250 - Verify that virt plugin resumes collecting metrics.
| Virt plugin resumes collecting metrics after VM has been destroyed and started. | PASS |
11 | Verify that libvirt plugin correctly displays CPU utilization in percent in regular mode | - Start virt-top on server where VM is started
- Open libvirt plugin file where CPU utilization is stored
tail -f percent-virt_cpu_total-2017-01-03 - Compare values
NOTE: virt-top cuts output to 1 tenth symbol, and speed of values increment is different
| Values are pretty similar except 0 value every 10 sec Note: In case of CPU is not loaded around zero values will be retrieved. | PASS |
12 | Verify that libvirt plugin correctly displays CPU utilization in CPU load mode | - Start virt-top on server where VM is started
- Open libvirt plugin file where CPU utilization is stored
tail -f percent-virt_cpu_total-2017-01-03 - Start stress tool on VM
stress --cpu 2 --io 1 --vm 1 --vm-bytes 128M --timeout 20s - Compare values
NOTE: virt-top cuts output to 1 tenth symbol, and speed of values increment is different
| Values are pretty similar except 0 value every 10 sec | PASS Note: except speed-up period values are +- correct |
13 | Verify that libvirt plugin correctly displays CPU utilization in percent upon VM restart | - Start virt-top on server where VM is started
- Open libvirt plugin file where CPU utilization is stored:
tail -f percent-virt_cpu_total-2017-01-03 - Start stress tool on VM:
stress --cpu 2 --io 1 --vm 1 --vm-bytes 128M --timeout 60s - Start/Stop a VM within 60 seconds:
virsh destroy <VM_name>; sleep 1; virsh start <VM_name> - Compare values
NOTE: virt-top cuts output to 1 tenth symbol, and speed of values increment is different
| Values are pretty similar except 0 value every 10 sec | PASS |
14 | Verify that libvirt plugin doesn't update CPU utilization if collectd is disabled | - Start virt-top on server where VM is started
- Open libvirt plugin file where CPU utilization is stored
tail -f percent-virt_cpu_total-2017-01-03 - Compare values
NOTE: virt-top cuts output to 1 tenth symbol, and speed of values increment is different - Stop collectd
- Compare values
| Update of percent-virt.. file has stopped | PASS |
15 | Verify that libvirt plugin starts update CPU utilization if collectd is started | - Start virt-top on server where VM is started
- Open libvirt plugin file where CPU utilization is stored
tail -f percent-virt_cpu_total-2017-01-03 - Stop collectd
- Compare values
NOTE: virt-top cuts output to 1 tenth symbol, and speed of values increment is different - Start collectd
- Compare values
| Update of percent-virt.. file has started NOTE: up to 10 sec before 1-st value appeared | PASS |
16 | Verify that CPU utilization values are correct through at least 30-40 sec3 | - Start virt-top on server where VM is started
- Open libvirt plugin file where CPU utilization is stored
tail -f percent-virt_cpu_total-2017-01-03 - Start stress tool on VM
stress --cpu 2 --io 1 --vm 1 --vm-bytes 128M --timeout 40s - Compare values
NOTE: virt-top cuts output to 1 tenth symbol, and speed of values increment is different
| Values are pretty similar except 0 value every 10 sec | PASS |
17 | Verify libvirt collectd plugin MBM metric behavior upon enable/disable mbmt/mbml | - Start collectd with virt and csv (or other write) plugin enabled, libvirt.
- Start vm and enable mbmt metric. Run some activity in VM:
stress --cpu 2 --io 1 --vm 1 --vm-bytes 128M --timeout 20s - Disable mbmt and enable mbml metric.
- Disable mbml metric.
- Enable both mbmt and mbml metric.
| - Collectd, libvirt are running.
- mbmt changes observed by write plugin and similar to perf MBM statistic.
- mbml changes observed by write plugin and similar to perf MBM statistic.
- Neither mbmt nor mbml metric changes observed in MBM statistic.
- Both mbmt and mbml metric changes observed by write plugin and similar to perf MBM statistic.
| PASS |
18 | Verify libvirt collectd plugin MBM metric updates every interval time set in collectd.conf. | - Start collectd with virt and csv (or other write) plugin enabled, libvirt.
- Start vm and enable mbmt metric. Run some activity in VM: stress --cpu 2 --io 1 --vm 1 --vm-bytes 128M --timeout 20s
- Change interval in collectd.conf. Restart collectd.
- Repeat step#3 for different time intervals.
| - Collectd, libvirt are running.
- mbmt changes observed by write plugin and similar to perf MBM statistic.
- MBM metrics updated every new interval and similar to perf MBM statistic.
- MBM metrics updated every new interval and similar to perf MBM statistic.
| PASS |
19 | Verify MBM metric upon collectd stop/start | - Start collectd with virt and csv (or other write) plugin enabled, libvirt.
- Start VM with enabled mbmt/mbml metric (run some activity in VM).
- Stop collectd.
- Start collectd.
| - Collectd, libvirt are running.
- MBM changes observed by write plugin and similar to perf MBM statistic.
- MBM metric observed by write plugin not updated, perf MBM statistic is changed.
- MBM changes observed by write plugin and similar to perf MBM statistic.
| PASS |
20 | Verify libvirt collectd plugin MBM metric by un-/comment 'virt' in collectd.conf | - Start collectd with virt and csv (or other write) plugin enabled, libvirt.
- Start VM with enabled mbmt/mbml metric (run some activity in VM).
- Comment 'Loadplugin virt' line in collectd.conf. Restart collectd.
- Uncomment 'Loadplugin virt' line in collectd.conf. Restart collectd.
- Comment out '<Plugin virt>'.
- Uncomment out '<Plugin virt>'.
| - Collectd, libvirt are running.
- MBM changes observed by write plugin and similar to perf MBM statistic.
- MBM metric observed by write plugin not updated, perf MBM statistic is changed.
- MBM changes observed by write plugin and similar to perf MBM statistic.
- MBM changes observed by write plugin and similar to perf MBM statistic (default values are taken?).
- MBM changes observed by write plugin and similar to perf MBM statistic.
| PASS |
21 | Verify MBM metric after libvirt service restart | - Start collectd with virt and csv (or other write) plugin enabled, libvirt.
- Start VM with enabled mbmt/mbml metric (run some activity in VM).
- Stop libvirtd.
- Start libvirtd.
| - Collectd, libvirt are running.
- MBM changes observed by write plugin and similar to perf MBM statistic.
- MBM metric observed by write plugin not updated, perf MBM statistic is changed.
- MBM changes observed by write plugin and similar to perf MBM statistic.
| PASS |
22 | Verify MBM metric after VM start/destroy | - Start collectd with virt and csv (or other write) plugin enabled, libvirt.
- Start VM with enabled mbmt/mbml metric (run some activity in VM).
- Destroy (stop) VM.
- Start VM.
| - Collectd, libvirt are running.
- MBM metric changes observed by write plugin and similar to perf MBM statistic.
- MBM metric observed by write plugin not updated.
- MBM metric changes observed by write plugin and similar to perf MBM statistic.
| PASS |
23 | Verify libvirt collectd plugin MBM metric from two VMs | - Start collectd with virt and csv (or other write) plugin enabled, libvirt.
- Start two VMs with enabled mbmt/mbml metric (run some activity in VM).
- Run stress test on both VM's.
| - Collectd, libvirt are running.
- MBM changes observed by write plugin and similar to perf MBM statistic for both VM's.
- MBM changes observed by write plugin and similar to perf MBM statistic for both VM's.
| PASS |
24 | Verify MBM metric after VM reboot, suspend, resume | - Start collectd with virt and csv (or other write) plugin enabled, libvirt.
- Start VM with enabled mbmt/mbml metric (run some activity in VM).
- Reboot VM (virsh reboot <domain name>).
- Suspend/resume VM (virsh suspend/resume <domain name>).
| - Collectd, libvirt are running.
- MBM metric changes observed by write plugin and similar to perf MBM statistic.
- MBM metric observed by write plugin not updated.
- MBM metric changes observed by write plugin and similar to perf MBM statistic.
| PASS |
25 | Verify zero disk errors are collected by virt plugin | - Start collectd with virt and wirte plugin enabled in collectd.conf.
ExtraStats "disk_err" - Start VM
- Get disk errors information using virsh tool and make sure no errors are present:
virsh domblkerror silvixa00398939a - Start parsing syslog and make sure that plugin reportd zero disk errors.
- Verify that plugin does not collectd any errors.
| Plugin does not collectd any errors and syslog shows that zero disk errors are reported by collectd. | PASS |
26 | Verify file system information reported by collectd corresponds to actual values of VM. | - Start collectd with virt and write plugin enabled in collectd.conf.
ExtraStats "fs_info" - Make sure that exec plugin is enabled for capturing collectd notifications.
exec_script:
#!/bin/bash rm -f /home/test/notifications while read x y do echo $x$y >> /home/test/notifications done collectd.conf for exec:
<Plugin exec> Exec "test:test" "/home/test/exec_notification" NotificationExec "test:test" "/home/test/exec_notification" </Plugin> - Get file system information using virsh utility:
virsh domfsinfo silvixa00398939a Mountpoint Name Type Target ------------------------------------------------------------------- / sda1 ext4 hda Get Notification data reported by collectd: Severity:OKAY Time:1490705042.261 Host:silvixa00398939a Plugin:virt Type:file_system mountpoint:/ name:sda1 fstype:ext4 ndevAlias:1 devAlias:hda Filesystem information - Verify that notification data corresponds to data retrieved by virsh utility.
| Notification data corresponds to data retrieved by virsh utility. | PASS |
27 | Verify job statistic is reported by virt plugin. | - Start collectd with virt and write plugin enabled in collectd.conf.
- Set collectd read interval to 0.5 second in order to catch job statistics before VM exits.
- Make sure that VM is in running state.
- Perform virsh managedsave command and get job stat information using virsh in parallel.
virsh managedsave silvixa00398939a --bypass-cache&
for x in range{1..20}; do virsh domjobinfo silvixa00398939a; sleep 0.5; done Make sure that job information reported by collectd corresponds to values retrieved by virsh utility.
| Job information reported by collectd corresponds to values retrieved by virsh utility. | PASS |