-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
On a system, where mawk is the default awk instead of gawk (for example, Raspbian Stretch), the following will fail to give any output until all the samples are produced. For default settings, this will cause a delay of 60x10 seconds between CPU usage updates.
tmux-plugin-sysstat/scripts/cpu_collect.sh
Lines 30 to 31 in 29e150f
| vmstat -n "$refresh_interval" "$samples_count" \ | |
| | stdbuf -o0 awk 'NR>2 {print 100-$(NF-2)}' |
I propose two solutions:
- Replace
awkwith/usr/bin/gawkeverywhere in the code and listgawkas a dependency. - Adapt the code so that
stdbufandmawkcan produce streaming output.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels