tmux-plugins / tmux-cpu

Plug and play cpu percentage and icon indicator for Tmux.
MIT License
426 stars 65 forks source link

CPU percentage seems to be aggregated rather than current percentage #19

Closed qikaigu closed 5 years ago

qikaigu commented 6 years ago

I found that the CPU percentage for Linux seems to be the average CPU percentage since boot. As a result, it can hardly reflect current percentage if the machine has been up for long time.

ctjhoa commented 6 years ago

As mentionned in the README, you must use iostat or sar to get accurate result. https://github.com/tmux-plugins/tmux-cpu#optional-requirement-linux-bsd-osx

qikaigu commented 5 years ago

I don't know what has been changed but I can't reproduce the inaccuracy with ps when iostat and sar are not available. I'll close the issue.