A simple, lightweight program provided for system monitoring in the status line of tmux.
The memory monitor displays the used and available memory.
The CPU usage monitor outputs a percent CPU usage over all processors. It also displays a textual bar graph of the current percent usage.
Example output::
1.1/3.8GB ▄ 76.5% ▇
^ ^ ^ ^ ^ | | | | | 1 2 3 4 5
- Currently used memory.
- Available memory.
- Memory usage bar graph.
- CPU usage percentage.
- CPU usage bar graph.
Only Mac OSX is supported.
Building
* >= CMake_ -2.6
* C++ compiler with C++11 support (e.g. gcc/g++ >= 4.6)
Download
--------
There are links to the source code at the `project homepage`_.
Build
-----
::
cd <source dir>
cmake .
make
Install
-------
::
su -
make install
logout
Build and Install Using tpm_
-----------------------------
Include the plugin in your ``.tmux.conf``, the same file you'll set the
configuration in, below.
::
set -g @plugin 'svanharmelen/tmux-mem-cpu'
Configuring tmux_
=================
Edit ``$HOME/.tmux.conf`` to display the program's output in *status-left* or
*status-right*. For example::
set -g status-interval 2
set -g status-left "#S #[fg=green,bg=black]#(tmux-mem-cpu --interval 2)#[default]"
set -g status-left-length 60
If you installed using tpm, you must specify the full path to the
``tmux-mem-cpu`` script, like below::
set -g status-right "#[fg=green]#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu/tmux-mem-cpu --interval 2)#[default]"
Note that the *interval* argument to `tmux-mem-cpu` should be the same number
of seconds that *status-interval* is set at.
The full usage::
Usage: tmux-mem-cpu [OPTIONS]
Available options:
-h, --help
Prints this help message
-i <value>, --interval <value>
Set tmux status refresh interval in seconds. Default: 1 second
Authors
=======
Matt McCormick (thewtex) <[email protected]>
Sander van Harmelen (svanharmelen) [email protected]
Contributions from:
* cousine <[email protected]>
* Jasper Lievisse Adriaanse <[email protected]>
* Justin Crawford <[email protected]>
* krieiter <[email protected]>
* Mark Palmeri <[email protected]>
* `Pawel 'l0ner' Soltys`_ <[email protected]>
* Travil Heller <[email protected]>
* Tony Narlock <[email protected]>
* Compilenix <[email protected]>
* jodavies <[email protected]>
* `@nhdaly`_ (Nathan Daly) <[email protected]>
.. _tmux: http://tmux.sourceforge.net/
.. _CMake: http://www.cmake.org
.. _`project homepage`: http://github.com/svanharmelen/tmux-mem-cpu
.. _`tpm`: http://github.com/tmux-plugins/tpm
.. _`Pawel 'l0ner' Soltys` : http://l0ner.github.io/
.. _`@nhdaly` : http://github.com/nhdaly