CPU, RAM, and load monitor for use with tmux
Go to file
Pawel "l0ner" Soltys 51f85ba032 code syntax style, vim modelines, license
* Use std::sting instead of char[] in the graph drawing functions. This is the
  only change to the code. Rest is just styling.
* Corrected whole code to follow Allman/GNU coding style, with 2 spaces for each
  indentation step.
* Added license headers to all code files
* Added vim modelines to all files. They sit on the first line and enable the
  following settings: 2 space indentation, tab expansion to spaces, line at
  80th column, automatic line breaking on "\ !@*+-;:,./?" characters, automatic
  line break if line exceeds 80 colums. This should keep the code nice and tidy.
2015-01-18 14:36:59 +01:00
argParse easier to read argv parse using command line argument parser by Michael Hanke 2015-01-07 20:57:25 +01:00
bsd code syntax style, vim modelines, license 2015-01-18 14:36:59 +01:00
linux code syntax style, vim modelines, license 2015-01-18 14:36:59 +01:00
osx code syntax style, vim modelines, license 2015-01-18 14:36:59 +01:00
.gitignore include fixes to make it compile on osx, added *~ files to gitignore 2015-01-04 17:21:20 +01:00
.travis.yml Do not run ctest in Travis. 2013-06-14 01:56:46 +00:00
AUTHORS added AUTHORS file to store all contributors 2015-01-18 14:27:30 +01:00
CMakeLists.txt code syntax style, vim modelines, license 2015-01-18 14:36:59 +01:00
generate-luts.py Improve foreground contrast with colors. 2013-07-15 23:20:35 +00:00
graph.cc code syntax style, vim modelines, license 2015-01-18 14:36:59 +01:00
graph.h code syntax style, vim modelines, license 2015-01-18 14:36:59 +01:00
LICENSE Add Apache-2.0 license. 2012-11-25 17:20:31 +00:00
luts.h Improve foreground contrast with colors. 2013-07-15 23:20:35 +00:00
README.rst added myself (l0ner) to contributors list 2015-01-18 14:30:38 +01:00
tmux-mem-cpu-load.cpp code syntax style, vim modelines, license 2015-01-18 14:36:59 +01:00
version.h.in code syntax style, vim modelines, license 2015-01-18 14:36:59 +01:00

====================================================
               tmux-mem-cpu-load
====================================================
----------------------------------------------------
CPU, RAM memory, and load monitor for use with tmux_
----------------------------------------------------

.. image:: https://travis-ci.org/thewtex/tmux-mem-cpu-load.svg
  :target: https://travis-ci.org/thewtex/tmux-mem-cpu-load

Description
===========

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.

The system load average is also displayed.

Example output::

  2885/7987MB [|||||     ]  51.2% 2.11 2.35 2.44

   ^    ^          ^         ^     ^    ^    ^
   |    |          |         |     |    |    |
   1    2          3         4     5    6    7

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.

For `terminals with 256 color support`_, graded colors can be displayed by
passing the **--colors** flag.


Installation
============

Dependencies
------------

Currently, Linux and Mac OSX are 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


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-load --colors 2)#[default]"

Note that the first argument to `tmux-mem-cpu-load` should be the same number
of seconds that *status-interval* is set at.

An optional second 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.


Author
======

Matt McCormick (thewtex) <matt@mmmccormick.com>

Contributions from:

* Justin Crawford <justinc@pci-online.net>
* krieiter <krieiter@gmail.com>
* Mark Palmeri <mlp6@duke.edu>
* `Pawel 'l0ner' Soltys`_ <pwslts@gmail.com>


.. _tmux: http://tmux.sourceforge.net/
.. _CMake: http://www.cmake.org
.. _`project homepage`: http://github.com/thewtex/tmux-mem-cpu-load
.. _`terminals with 256 color support`: http://misc.flogisoft.com/bash/tip_colors_and_formatting#terminals_compatibility
.. _`Pawel 'l0ner' Soltys` : http://l0ner.github.io/