Here's a solution which may consume a lot of cpu usage (stolen from this article):
There's a difference in my Ubuntu 12 ec2 server, I have to use top -bn1
instead of top -ln
.
Here's my related .tmux.conf
file:
set -g status-right '#[fg=yellow]#[(getCpuUsage.sh)]'
It actually calls top
every 2 seconds and outputs a whole lot of information. I think there should be a way involving less cpu consumption or use some flag to limit the output of top
to only cpu usage.