Nir Soffer has posted comments on this change. Change subject: host stats: Collect stats from online cpu cores only ......................................................................
Patch Set 6: (1 comment) https://gerrit.ovirt.org/#/c/46269/6/vdsm/virt/sampling.py File vdsm/virt/sampling.py: Line 693: for cpu_core in cpu_cores: Line 694: # Do not try to collect cpu core data when no samples are present Line 695: if (not last_sample.cpuCores.getCoreSample(cpu_core) or not Line 696: first_sample.cpuCores.getCoreSample(cpu_core)): Line 697: continue > Yes, but I'm under the impression that we are supposed to have samples for I don't think cpu becoming offline or online is exceptional. It is may be unusual, but it is an expected condition. However I think we should have info for all cpus always, to instead of "continue", we should use: _, cpu_map, _ = libvirt.getCPUMap() for cpu_core in cpu_cores: info = {'nodeIndex': int(node_index), 'online': cpu_map[int(cpu_core)]} if have samples: add samples stats... cpu_core_stats[cpu_core] = info Line 698: core_stat = { Line 699: 'nodeIndex': int(node_index), Line 700: 'cpuUser': compute_cpu_usage(cpu_core, 'user'), Line 701: 'cpuSys': compute_cpu_usage(cpu_core, 'sys'), -- To view, visit https://gerrit.ovirt.org/46269 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia9c247f9138e02a9230a0849a04cb2e1705e7fac Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Roman Mohr <rm...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roman Mohr <rm...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches