title: Is there a better way to display cpu usage in tmux?
body: <p>Here's a solution which may consume a lot of cpu usage (stolen from <a href="http://makerwannabe.blogspot.co.nz/2011/04/showing-cpumemory-usage-on-tmux-status.html" rel="nofollow noreferrer">this article</a>):</p>
  <p>There's a difference in my Ubuntu 12 ec2 server, I have to use <code>top -bn1</code> instead of <code>top -ln</code>.</p>
  <p>Here's my related <code>.tmux.conf</code> file:</p>
  <p><code>set -g status-right '#[fg=yellow]#[(getCpuUsage.sh)]'</code></p>
  <p>It actually calls <code>top</code> 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 <code>top</code> to only cpu usage.</p>