tmux-plugins/tmux-cpu — pull request #1 by lglenn (2014-12-09 03:57:20+00:00)
Title: Grab CPU stats from iostat on a mac

OSX doesn't have procfs, so grabbing cpu usage from /proc/stat won't
work.

Rather, if is_osx() returns true, get stats from the output of the
iostat utility.

Note that the first line of data that iostat prints is always averaged
over system uptime. You need to tell it to print two lines, averaging
over one second, and use the data in the second line.