You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tmux: kludge a fix to erroneous cpu numbers in statusbar
previously we invoked vmstat and parsed its output to report on
supposedly 'recent' CPU consumption. however, as invoked, vmstat
outputs cumulative-since-boot CPU numbers, as that's all the kernel
interface supplies. having vmstat wait a few seconds to report
last-few-seconds numbers is possible, but is not recommended
(see tmux/tmux#797 (comment) )
and results in status line updates at rapid and irregular intervals
(see tmux-plugins/tmux-cpu#15 ). this is
distracting, and also makes tmux create high load on an ancient raspi.
so instead, we kludge using tmux as a sort of background job manager,
launching vmstat on a high-numbered window and parsing its output
into a file underneath our systemd-created session tmpfs, from which
the tmux status line reads it.
vmstat is used over iostat/mpstat/etc as it should be always available
(at least on Debian systems where procps is Priority: important).
0 commit comments