samoshkin / tmux-plugin-sysstat

Prints CPU usage, memory & swap, load average, net I/O metrics in Tmux status bar
MIT License
158 stars 48 forks source link

Make cpu_collect compatible with OSX and use gstdbuf #7

Open aaronlna opened 6 years ago

aaronlna commented 6 years ago

https://github.com/samoshkin/tmux-plugin-sysstat/issues/5

Environment

Problems

iostat intervals are buffered-- even while using stdbuf-- until all intervals are complete. This makes the cpu_collect script not update the statusline for TMUX as a refresh happens before all intervals are completed (ie. nothing gets written to the corresponding tmp file).

Changes

chris-vest commented 6 years ago

This fixed the issue for me. Thank you!

hit9 commented 6 years ago

Will this pr be merged?

hit9 commented 6 years ago

brew install coreutils gets me gstdbuf installed.

And then CPU outputs ok.

kleinjm commented 5 years ago

@samoshkin please merge this

h0adp0re commented 2 years ago

@samoshkin please consider merging this. Currently I (and probably many others) have resorted to using aaronlna/tmux-plugin-sysstat but it'd be nice to use the main project.