Commit cad09510 authored by Stratos Psomadakis's avatar Stratos Psomadakis
Browse files

gtools: Fix a race in the cpustats collectd plugin

If the VM has just been started, the cpustats collectd plugin might try
to read /proc/<pid>/fd/ for VCPUs fds, before qemu has initialized /
created the VCPUs. This led to a ZeroDivision error in the collectd
plugin. Make sure to skip that particular VM until the VCPUs have been
parent 7b4b37aa
......@@ -28,6 +28,9 @@ def cpustats(data=None):
vcpus = get_vcpus(pid)
if vcpus == 0:
vl = collectd.Values(type="derive") = instance
vl.plugin = "cpu"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment