]> git.ipfire.org Git - thirdparty/collectd.git/commit
processes: increase reading buffer for /proc/stat 3479/head
authorMichal Humpula <michal.humpula@heureka.cz>
Thu, 11 Jun 2020 14:37:09 +0000 (16:37 +0200)
committerMichal Humpula <michal.humpula@heureka.cz>
Fri, 19 Jun 2020 13:01:14 +0000 (15:01 +0200)
commit7cb240047385e21c6322c09944015dfa1d721573
tree986e0e94e1214217b12d2dd1c50b0e88fb49dc79
parent6b24c52ed436038a40cd029b59bfb20b7ca5b443
processes: increase reading buffer for /proc/stat

If machine has high number of CPUs or interrupts or both, the /proc/stat
can easily grow over current buffer size 4kB. On my current machine (64
cores, ~300 interrupts) the /proc/stat has 12kB of data. And since the
`procs_running` line is after the interrupts it is never read.

Increasing the size to 64KB so it will accommodate even heavier machines.
src/processes.c