ovis
ovis copied to clipboard
procstat2 create_metric_set
The set create code in the new procstat2 sampler assumes that all cores are currently running when computing the maximum list size. As individual cores can be down temporarily (and hence disappear from /proc/stat, potentially leaving a hole in the cpu# sequence), the cpu count used to set the list bound may be incorrect. to demonstrate:
echo 0 > /sys/devices/system/cpu/cpu1/online
( start ldms with procstat2)
echo 1 > /sys/devices/system/cpu/cpu1/online
The linux utility 'lscpu' produces a correct number of cpus independent of cores being up/down. so whatever method is used to determine the output in the CPU(s) field of lscpu might be recycled for procstat2. Or the admin needs to be able to specify the upper bound to the sampler.
@ballaan The list size is dynamic, the initial size is just a hint to avoid realloc. Is there some other issue you're seeing?