tmux-mem-cpu-load/README.rst

184 lines
4.9 KiB
ReStructuredText
Raw Normal View History

=============================================
tmux-mem-cpu-load
=============================================
---------------------------------------------
CPU, RAM, and load monitor for use with tmux_
---------------------------------------------
2009-09-11 02:13:33 -04:00
.. image:: https://travis-ci.org/thewtex/tmux-mem-cpu-load.svg
2013-06-13 22:07:07 -04:00
:target: https://travis-ci.org/thewtex/tmux-mem-cpu-load
2015-07-30 16:03:52 -04:00
.. image:: https://circleci.com/gh/thewtex/tmux-mem-cpu-load.svg?style=svg
:target: https://circleci.com/gh/thewtex/tmux-mem-cpu-load
2009-09-11 02:13:33 -04:00
Description
===========
2010-02-25 12:13:59 -05:00
A simple, lightweight program provided for system monitoring in the *status*
line of **tmux**.
2009-09-11 02:13:33 -04:00
2010-02-25 12:13:59 -05:00
The memory monitor displays the used and available memory.
2009-09-11 02:13:33 -04:00
2010-02-25 12:13:59 -05:00
The CPU usage monitor outputs a percent CPU usage over all processors. It also
displays a textual bar graph of the current percent usage.
2009-09-11 02:13:33 -04:00
2010-02-25 12:13:59 -05:00
The system load average is also displayed.
2009-09-11 02:13:33 -04:00
2010-02-25 12:13:59 -05:00
Example output::
2009-09-11 02:13:33 -04:00
2010-02-25 12:13:59 -05:00
2885/7987MB [||||| ] 51.2% 2.11 2.35 2.44
^ ^ ^ ^ ^ ^ ^
| | | | | | |
1 2 3 4 5 6 7
2010-02-25 12:13:59 -05:00
1. Currently used memory.
2. Available memory.
3. CPU usage bar graph.
4. CPU usage percentage.
5. Load average for the past minute.
6. Load average for the past 5 minutes.
7. Load average for the past 15 minutes.
2009-09-11 02:13:33 -04:00
For `terminals with 256 color support`_, graded colors can be displayed by
passing the **--colors** flag.
2009-09-11 02:13:33 -04:00
Installation
============
Dependencies
------------
Currently, Linux, Mac OSX, FreeBSD, OpenBSD, and NetBSD are supported.
2009-09-11 02:13:33 -04:00
Building
~~~~~~~~
* >= CMake_ -2.6
* C++ compiler with C++11 support (e.g. gcc/g++ >= 4.6)
2009-09-11 02:13:33 -04:00
Download
--------
There are links to the source code at the `project homepage`_.
Build
-----
::
cd <source dir>
cmake .
make
Install
-------
::
su -
make install
logout
Install with Package Managers
-----------------------------
2016-09-04 15:44:16 -04:00
* Gentoo: ``emerge tmux-mem-cpu-load``
* Homebrew: ``brew install tmux-mem-cpu-load``
Build and Install Using Antigen_
--------------------------------
Include the bundle in your ``.zshrc``
2015-09-30 15:27:29 -04:00
::
antigen bundle thewtex/tmux-mem-cpu-load
2009-09-11 02:13:33 -04:00
Build and Install Using tpm_
-----------------------------
Include the plugin in your ``.tmux.conf``
::
set -g @plugin 'thewtex/tmux-mem-cpu-load'
2010-02-25 12:13:59 -05:00
Configuring tmux_
=================
2009-09-11 02:13:33 -04:00
Edit ``$HOME/.tmux.conf`` to display the program's output in *status-left* or
2010-02-25 12:13:59 -05:00
*status-right*. For example::
2009-09-11 02:13:33 -04:00
2010-02-25 12:13:59 -05:00
set -g status-interval 2
2015-01-19 23:00:48 -05:00
set -g status-left "#S #[fg=green,bg=black]#(tmux-mem-cpu-load --colors --interval 2)#[default]"
set -g status-left-length 60
2009-09-11 02:13:33 -04:00
If you installed using tpm, you must specify the full path to the
``tmux-mem-cpu-load`` script, like below::
set -g status-right "#[fg=green]#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --colors --powerline-right --interval 2)#[default]"
2015-01-19 23:00:48 -05:00
Note that the *interval* argument to `tmux-mem-cpu-load` should be the same number
2010-02-25 12:13:59 -05:00
of seconds that *status-interval* is set at.
2009-09-11 02:13:33 -04:00
2015-01-19 23:00:48 -05:00
Another optional argument is the number of bars in the bar graph, which
defaults to 10. This can, for instance, be set to the number of cores in a
multi-core system.
2015-01-19 23:00:48 -05:00
The *colors* option will add graded colors for each of the measures.
2009-09-11 02:13:33 -04:00
2015-01-19 23:00:48 -05:00
The full usage::
Usage: tmux-mem-cpu-load [OPTIONS]
Available options:
-h, --help
Prints this help message
-c, --colors
2015-01-19 23:00:48 -05:00
Use tmux colors in output
2016-07-31 22:03:18 -04:00
-p, --powerline-left
Use powerline left symbols throughout the output, enables --colors
2016-07-31 22:03:18 -04:00
-q, --powerline-right
Use powerline right symbols throughout the output, enables --colors
2015-01-19 23:00:48 -05:00
-i <value>, --interval <value>
Set tmux status refresh interval in seconds. Default: 1 second
-g <value>, --graph-lines <value>
Set how many lines should be drawn in a graph. Default: 10
-m <value>, --mem-mode <value>
Set memory display mode. 0: Default, 1: Free memory, 2: Usage percent.
-t <value>, --cpu-mode <value>
Set cpu % display mode. 0: Default max 100%, 1: Max 100% * number of threads.
2016-04-28 16:13:05 -04:00
-a <value>, --averages-count <value>
Set how many load-averages should be drawn. Default: 3
2015-01-19 23:00:48 -05:00
Authors
=======
2009-09-11 02:13:33 -04:00
Matt McCormick (thewtex) <matt@mmmccormick.com>
2013-06-09 22:57:37 -04:00
Contributions from:
* cousine <iam@cousine.me>
2015-03-01 19:23:25 -05:00
* Jasper Lievisse Adriaanse <jasper@humppa.nl>
2013-06-09 22:57:37 -04:00
* Justin Crawford <justinc@pci-online.net>
* krieiter <krieiter@gmail.com>
2014-05-07 23:23:41 -04:00
* Mark Palmeri <mlp6@duke.edu>
* `Pawel 'l0ner' Soltys`_ <pwslts@gmail.com>
2016-01-09 17:00:56 -05:00
* Travil Heller <trav.heller@gmail.com>
* Tony Narlock <tony@git-pull.com>
2016-04-28 16:13:05 -04:00
* Compilenix <Compilenix@compilenix.org>
2016-06-30 02:56:55 -04:00
* jodavies <jodavies1010@gmail.com>
2013-06-09 22:57:37 -04:00
2009-09-11 02:13:33 -04:00
2010-02-25 12:13:59 -05:00
.. _tmux: http://tmux.sourceforge.net/
.. _CMake: http://www.cmake.org
2010-02-25 12:13:59 -05:00
.. _`project homepage`: http://github.com/thewtex/tmux-mem-cpu-load
.. _`tpm`: http://github.com/tmux-plugins/tpm
.. _`Antigen`: https://github.com/zsh-users/antigen
.. _`terminals with 256 color support`: http://misc.flogisoft.com/bash/tip_colors_and_formatting#terminals_compatibility
.. _`Pawel 'l0ner' Soltys` : http://l0ner.github.io/