Skip to content

Increase BUFFSIZE to handle very large /proc/stat files

Anton Blanchard requested to merge antonblanchard/procps:proc-stat-buffer into master

We read /proc/stat using a statically sized buffer. This was increased to 64kB in 2005 via commit 777fcd3c "/proc/stat for 1024 CPUs".

Unfortunately in 2020, 1024 CPUs is not enough for anyone. I have a large machine where /proc/stat is 74kB, and vmstat gives incorrect output.

Double the buffer to 128kB in the confidence that 2048 CPUs is actually enough for anyone.

Signed-off-by: Anton Blanchard anton@ozlabs.org

Merge request reports