Improve packaging - Round 2

This commit is contained in:
Alessio Sergi 2013-04-08 16:16:00 +02:00
parent c589d08cf2
commit ecfadce4ac
36 changed files with 1412 additions and 2963 deletions

1882
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,6 @@
include AUTHORS
include COPYING
include NEWS
include README
recursive-include doc *.png
include README.rst
recursive-include docs images/*.png man/glances.1 glances-doc.html
recursive-include i18n *.mo
recursive-include man *.1

448
README
View File

@ -1,448 +0,0 @@
[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/thing/484466/nicolargoglances-on-GitHub)
[![Build Status](https://travis-ci.org/nicolargo/glances.png?branch=master)](https://travis-ci.org/nicolargo/glances)
=============================
Glances -- Eye on your system
=============================
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/glances-white-256.png)
## Description
Glances is a CLI curses based monitoring tool for GNU/Linux and BSD OS.
Glances uses the PsUtil library to get information from your system.
It is developed in Python.
Console (80x24) screenshot:
![screenshot](https://raw.github.com/nicolargo/glances/master/doc/screenshot.png)
Wide terminal (> 90x24) screenshot:
![screenshot](https://raw.github.com/nicolargo/glances/master/doc/screenshot-wide.png)
## Installation
Pre-requisites (information for packagers):
* Python 2.6+ (not tested with Python 3+)
* build-essential (for installation via Pypi and setup.py)
* python-dev (for installation via Pypi)
* python-setuptools (for the installation via setup.py)
* python-psutil 0.4.1+ (replace the old libstatgrab's lib)
* python-jinja2 2.0+ (optional for HTML export)
* pysensors (Python library for sensors stats)
### From package manager (very easy way)
Packages exist for Debian (SID), Arch, Fedora, Redhat, FreeBSD...
Check if the version is the latest one.
### From PyPi (easy and cross platform way)
PyPi is an official Python package manager.
You first need to install PyPi on your system. For example on Debian/Ubuntu:
$ sudo apt-get update
$ sudo apt-get install python-pip build-essential python-dev
Then install the latest Glances version:
$ sudo pip install Glances
Note: if you are behind an HTTP Proxy, you should use instead:
$ sudo pip install --proxy=user:password@url:port Glances
### From [Homebrew](http://mxcl.github.com/homebrew/) for Mac OS X
$ brew install brew-pip
$ export PYTHONPATH=$(brew --prefix)/lib/python2.7/site-packages
$ brew pip Glances
If you have the following error:
Error: Failed executing: pip install glances==1.X --install-option=--prefix=/usr/local/XXX/glances/1.X (.rb:)
then try to run:
$ pip install glances==1.X --install-option=--prefix=/usr/local/XXX/glances/1.X
$ brew link Glances
### Concerning Windows operating system
Thanks to Nicolas Bourges, a Windows installer is available:
64 bits: https://s3.amazonaws.com/glances/glances-1.6.0-x64.exe
32 bits: https://s3.amazonaws.com/glances/glances-1.6.0-x86.exe
If you want to install it manually, please read the following procedure.
Windows operating system only support the Glances in server mode. So if you ran Glances on Windows, it will be automaticaly running in server mode.
To install Glances on you system:
* Install [Python for Windows](http://www.python.org/getit/)
* Install the [PsUtil lib](https://code.google.com/p/psutil/downloads/list)
* Download the latest [Glances version](https://raw.github.com/nicolargo/glances/master/glances/glances.py)
I am looking for a contributor to package Glances for Windows (for exemple using [PyInstaller](http://www.pyinstaller.org/)).
### From source
Get the latest version (form GitHub):
$ rm -rf /tmp/nicolargo-glances-*
$ wget -O /tmp/glances-last.tgz https://github.com/nicolargo/glances/tarball/master
Glances use a standard GNU style installer (for a Debian like system):
$ sudo apt-get update
$ sudo apt-get install python-setuptools build-essential python-dev
$ cd /tmp
$ tar zxvf glances-last.tgz
$ cd nicolargo-glances-*
$ sudo python setup.py install
## From a configuration manager
Puppet: https://github.com/rverchere/puppet-glances
Chef: https://github.com/cookbooks/hw-chef-glances
## Configuration
No configuration is needed to use Glances.
Furthermore, the release 1.6 introduces a configuration file to setup limits.
The default configuration file is under:
/etc/glances/glances.conf (Linux)
or
/usr/local/etc/glances/glances.conf (*BSD and OS X)
To override the default configuration, you can copy the `glances.conf` file to
your `$XDG_CONFIG_HOME` directory (e.g. Linux):
mkdir -p $XDG_CONFIG_HOME/glances
cp /etc/glances/glances.conf $XDG_CONFIG_HOME/glances/
On OS X, you should copy the configuration file to `~/Library/Application Support/glances/`.
## Running
### In standalone mode
If you want to monitor your local machine, just run:
$ glances
### In client/server mode
If you want to remotely monitor a machine (called server) from another one (called client).
Run this command on the server:
server$ glances -s
and this one on the client:
client$ glances -c @server
where @server is the IP address or hostname of the server
Glances uses a [XML/RPC](http://docs.python.org/2/library/simplexmlrpcserver.html) server and can be used by another client software.
In server mode, you can set the bind address (-B ADDRESS) and listenning TCP port (-p PORT).
In client mode, you can set the TCP port of the server (-p port).
Default binding address is 0.0.0.0 (Glances will listen on all the networks interfaces) and TCP port is 61209.
In client/server mode, limits are set by the server side.
The version 1.6 introduces a optionnal password to access to the server (-P password).
## User guide
Command line options are:
-b Display network rate in Byte per second
-B @IP|host Bind server to the given IP or host NAME
-c @IP|host Connect to a Glances server
-C file Path to the configuration file
-d Disable disk I/O module
-e Enable the sensors module (Linux-only)
-f file Set the output folder (HTML) or file (CSV)
-h Display the syntax and exit
-m Disable mount module
-n Disable network module
-o output Define additional output (available: HTML or CSV)
-p PORT Define the client or server TCP port (default: 61209)
-P password Client/server password
-r Do not list processes (significant CPU use reduction)
-s Run Glances in server mode
-t sec Set the refresh time in seconds (default: 3)
-v Display the version and exit
-y Enable the hddtemp module
-z Do not use the bold color attribute
Importants stats are colored:
* GREEN: stat counter is "OK"
* BLUE: stat counter is "CAREFUL"
* MAGENTA: stat counter is "WARNING"
* RED: stat counter is "CRITICAL"
When Glances is running, you can press:
* 'a' to set the automatic mode. The processes are sorted automatically
IF CPU IoWait > 60% sort by process "IO read and write"
If CPU > 70%, sort by process "CPU consumption"
If MEM > 70%, sort by process "memory size"
* 'b' switch between bit/s or byte/s for network IO
* 'c' sort the processes list by CPU consumption
* 'd' disable or enable the disk IO stats
* 'e' enable the sensors module (PySensors library is needed; Linux-only)
* 'f' disable or enable the file system stats
* 'h' to display a help message with the keys you can press and the limits
* 'i' sort the processes list by IO rate (need root account on some OS)
* 'l' disable or enable the logs
* 'm' sort the processes list by process MEM
* 'n' disable or enable the network interfaces stats
* 'p' sort by process name
* 's' disable or enable the sensor stats (only available with -e tag)
* 't' View network IO as combination
* 'u' View cumulative network IO
* 'w' delete finished warning logs messages
* 'x' delete finished warning and critical logs messages
* '1' switch between global CPU and per core stats
* 'q' Exit
### Header
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/header.png)
The header shows the host name and the operating system name, version and architecture.
### CPU
Short view:
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/cpu.png)
If horizontal space is available, extended CPU infomations are displayed.
Extended view (only available if your terminal is wide enough)
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/cpu-wide.png)
If user click on the '1' key, per CPU stats is displayed:
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/percpu.png)
The CPU stats are shown as a percentage and for the configured refresh
time. The total CPU usage is displayed on the first line.
Color code used:
If user|kernel|nice CPU is < 50%, then status is set to "OK".
If user|kernel|nice CPU is > 50%, then status is set to "CAREFUL".
If user|kernel|nice CPU is > 70%, then status is set to "WARNING".
If user|kernel|nice CPU is > 90%, then status is set to "CRITICAL".
### Load
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/load.png)
On the Nosheep blog, Zach defines average load: "In short it is the
average sum of the number of processes waiting in the run-queue plus the
number currently executing over 1, 5, and 15 minute time periods."
Glances gets the number of CPU cores to adapt the alerts. With Glances,
alerts on average load are only set on 5 and 15 mins. The first line
also display the number of CPU core.
If average load is < O.7*Core, then status is set to "OK".
If average load is > O.7*Core, then status is set to "CAREFUL".
If average load is > 1*Core, then status is set to "WARNING".
If average load is > 5*Core, then status is set to "CRITICAL".
### Memory
Glances uses two columns: one for the RAM and another one for the SWAP.
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/mem.png)
If space is available, Glances displays extended informations:
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/mem-wide.png)
With Glances, alerts are only set for on used swap and real memory.
If memory is < 50%, then status is set to "OK".
If memory is > 50%, then status is set to "CAREFUL".
If memory is > 70%, then status is set to "WARNING".
If memory is > 90%, then status is set to "CRITICAL".
### Network bit rate
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/network.png)
Glances display the network interface bit rate. The unit is adapted
dynamicaly (bits per second, Kbits per second, Mbits per second...).
Alerts are set only if the network interface maximum speed is available.
If bit rate is < 50%, then status is set to "OK".
If bit rate is > 50%, then status is set to "CAREFUL".
If bit rate is > 70%, then status is set to "WARNING".
If bit rate is > 90%, then status is set to "CRITICAL".
For example, on a 100 Mbps Ethernet interface, the warning status is set
if the bit rate is higher than 70 Mbps.
### Sensors (optional; only available on Linux)
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/sensors.png)
Optionally, Glances displays the sensors informations (lm-sensors).
A filter is processed in order to only display temperature.
You should enable this module using the following command line:
glances -e
There is no alert on this information.
### Disk I/O
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/diskio.png)
Glances displays the disk I/O throughput. The unit is adapted dynamically
(bytes per second, Kbytes per second, Mbytes per second...).
There is no alert on this information.
### Filesystem
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/fs.png)
Glances displays the total and used filesytem disk space. The unit is
adapted dynamically (bytes per second, Kbytes per second, Mbytes per
second...).
Alerts are set for used disk space:
If disk used is < 50%, then status is set to "OK".
If disk used is > 50%, then status is set to "CAREFUL".
If disk used is > 70%, then status is set to "WARNING".
If disk used is > 90%, then status is set to "CRITICAL".
### Processes
Short view:
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/processlist.png)
Long view (only available if your terminal is wide enough)
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/processlist-wide.png)
Glances displays a summary and a list of processes.
By default (or if you hit the 'a' key) the process list is automatically
sorted by CPU of memory consumption.
The number of processes in the list is adapted to the screen size.
* VIRT: Virtual memory size (in byte)
* REST: Amount of resident memory (in byte)
* CPU%: % of CPU used by the process
* MEM%: % of MEM used by the process
* PID: Process ID
* USER: Process user ID
* NI: Nice level of the process
* S: Process status
R - Running
D - Sleeping (may not be interrupted)
S - Sleeping (may be interrupted)
T - Traced or stopped
Z - Zombie or "hung" process
* TIME+: Cumulative CPU time used
* IO_R and IO_W: Per process IO read and write rate (in byte per second)
* NAME: Process name or command line
### Logs
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/logs.png)
A logs list is displayed in the bottom of the screen if (and only if):
* at least one WARNING or CRITICAL alert was occured.
* space is available in the bottom of the console/terminal
There is one line per alert with the following information:
* start date
* end date
* alert name
* (min/avg/max) values
### Footer
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/footer.png)
Glances displays the current time/date and access to the embedded help screen.
If you have ran Glances in client mode (-c), you can also see if the client is connected to the server.
If client is connected:
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/client-connected.png)
else:
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/client-disconnected.png)
On the left, you can easely seen if you are connected to a Glances server.
## Localisation
Glances localization files exist for:
* English (default langage)
* French
* Italian
* Spanish
* Portugal
Feel free to contribute !

448
README.md
View File

@ -1,448 +0,0 @@
[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/thing/484466/nicolargoglances-on-GitHub)
[![Build Status](https://travis-ci.org/nicolargo/glances.png?branch=master)](https://travis-ci.org/nicolargo/glances)
=============================
Glances -- Eye on your system
=============================
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/glances-white-256.png)
## Description
Glances is a CLI curses based monitoring tool for GNU/Linux and BSD OS.
Glances uses the PsUtil library to get information from your system.
It is developed in Python.
Console (80x24) screenshot:
![screenshot](https://raw.github.com/nicolargo/glances/master/doc/screenshot.png)
Wide terminal (> 90x24) screenshot:
![screenshot](https://raw.github.com/nicolargo/glances/master/doc/screenshot-wide.png)
## Installation
Pre-requisites (information for packagers):
* Python 2.6+ (not tested with Python 3+)
* build-essential (for installation via Pypi and setup.py)
* python-dev (for installation via Pypi)
* python-setuptools (for the installation via setup.py)
* python-psutil 0.4.1+ (replace the old libstatgrab's lib)
* python-jinja2 2.0+ (optional for HTML export)
* pysensors (Python library for sensors stats)
### From package manager (very easy way)
Packages exist for Debian (SID), Arch, Fedora, Redhat, FreeBSD...
Check if the version is the latest one.
### From PyPi (easy and cross platform way)
PyPi is an official Python package manager.
You first need to install PyPi on your system. For example on Debian/Ubuntu:
$ sudo apt-get update
$ sudo apt-get install python-pip build-essential python-dev
Then install the latest Glances version:
$ sudo pip install Glances
Note: if you are behind an HTTP Proxy, you should use instead:
$ sudo pip install --proxy=user:password@url:port Glances
### From [Homebrew](http://mxcl.github.com/homebrew/) for Mac OS X
$ brew install brew-pip
$ export PYTHONPATH=$(brew --prefix)/lib/python2.7/site-packages
$ brew pip Glances
If you have the following error:
Error: Failed executing: pip install glances==1.X --install-option=--prefix=/usr/local/XXX/glances/1.X (.rb:)
then try to run:
$ pip install glances==1.X --install-option=--prefix=/usr/local/XXX/glances/1.X
$ brew link Glances
### Concerning Windows operating system
Thanks to Nicolas Bourges, a Windows installer is available:
64 bits: https://s3.amazonaws.com/glances/glances-1.6.0-x64.exe
32 bits: https://s3.amazonaws.com/glances/glances-1.6.0-x86.exe
If you want to install it manually, please read the following procedure.
Windows operating system only support the Glances in server mode. So if you ran Glances on Windows, it will be automaticaly running in server mode.
To install Glances on you system:
* Install [Python for Windows](http://www.python.org/getit/)
* Install the [PsUtil lib](https://code.google.com/p/psutil/downloads/list)
* Download the latest [Glances version](https://raw.github.com/nicolargo/glances/master/glances/glances.py)
I am looking for a contributor to package Glances for Windows (for exemple using [PyInstaller](http://www.pyinstaller.org/)).
### From source
Get the latest version (form GitHub):
$ rm -rf /tmp/nicolargo-glances-*
$ wget -O /tmp/glances-last.tgz https://github.com/nicolargo/glances/tarball/master
Glances use a standard GNU style installer (for a Debian like system):
$ sudo apt-get update
$ sudo apt-get install python-setuptools build-essential python-dev
$ cd /tmp
$ tar zxvf glances-last.tgz
$ cd nicolargo-glances-*
$ sudo python setup.py install
## From a configuration manager
Puppet: https://github.com/rverchere/puppet-glances
Chef: https://github.com/cookbooks/hw-chef-glances
## Configuration
No configuration is needed to use Glances.
Furthermore, the release 1.6 introduces a configuration file to setup limits.
The default configuration file is under:
/etc/glances/glances.conf (Linux)
or
/usr/local/etc/glances/glances.conf (*BSD and OS X)
To override the default configuration, you can copy the `glances.conf` file to
your `$XDG_CONFIG_HOME` directory (e.g. Linux):
mkdir -p $XDG_CONFIG_HOME/glances
cp /etc/glances/glances.conf $XDG_CONFIG_HOME/glances/
On OS X, you should copy the configuration file to `~/Library/Application Support/glances/`.
## Running
### In standalone mode
If you want to monitor your local machine, just run:
$ glances
### In client/server mode
If you want to remotely monitor a machine (called server) from another one (called client).
Run this command on the server:
server$ glances -s
and this one on the client:
client$ glances -c @server
where @server is the IP address or hostname of the server
Glances uses a [XML/RPC](http://docs.python.org/2/library/simplexmlrpcserver.html) server and can be used by another client software.
In server mode, you can set the bind address (-B ADDRESS) and listenning TCP port (-p PORT).
In client mode, you can set the TCP port of the server (-p port).
Default binding address is 0.0.0.0 (Glances will listen on all the networks interfaces) and TCP port is 61209.
In client/server mode, limits are set by the server side.
The version 1.6 introduces a optionnal password to access to the server (-P password).
## User guide
Command line options are:
-b Display network rate in Byte per second
-B @IP|host Bind server to the given IP or host NAME
-c @IP|host Connect to a Glances server
-C file Path to the configuration file
-d Disable disk I/O module
-e Enable the sensors module (Linux-only)
-f file Set the output folder (HTML) or file (CSV)
-h Display the syntax and exit
-m Disable mount module
-n Disable network module
-o output Define additional output (available: HTML or CSV)
-p PORT Define the client or server TCP port (default: 61209)
-P password Client/server password
-r Do not list processes (significant CPU use reduction)
-s Run Glances in server mode
-t sec Set the refresh time in seconds (default: 3)
-v Display the version and exit
-y Enable the hddtemp module
-z Do not use the bold color attribute
Importants stats are colored:
* GREEN: stat counter is "OK"
* BLUE: stat counter is "CAREFUL"
* MAGENTA: stat counter is "WARNING"
* RED: stat counter is "CRITICAL"
When Glances is running, you can press:
* 'a' to set the automatic mode. The processes are sorted automatically
IF CPU IoWait > 60% sort by process "IO read and write"
If CPU > 70%, sort by process "CPU consumption"
If MEM > 70%, sort by process "memory size"
* 'b' switch between bit/s or byte/s for network IO
* 'c' sort the processes list by CPU consumption
* 'd' disable or enable the disk IO stats
* 'e' enable the sensors module (PySensors library is needed; Linux-only)
* 'f' disable or enable the file system stats
* 'h' to display a help message with the keys you can press and the limits
* 'i' sort the processes list by IO rate (need root account on some OS)
* 'l' disable or enable the logs
* 'm' sort the processes list by process MEM
* 'n' disable or enable the network interfaces stats
* 'p' sort by process name
* 's' disable or enable the sensor stats (only available with -e tag)
* 't' View network IO as combination
* 'u' View cumulative network IO
* 'w' delete finished warning logs messages
* 'x' delete finished warning and critical logs messages
* '1' switch between global CPU and per core stats
* 'q' Exit
### Header
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/header.png)
The header shows the host name and the operating system name, version and architecture.
### CPU
Short view:
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/cpu.png)
If horizontal space is available, extended CPU infomations are displayed.
Extended view (only available if your terminal is wide enough)
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/cpu-wide.png)
If user click on the '1' key, per CPU stats is displayed:
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/percpu.png)
The CPU stats are shown as a percentage and for the configured refresh
time. The total CPU usage is displayed on the first line.
Color code used:
If user|kernel|nice CPU is < 50%, then status is set to "OK".
If user|kernel|nice CPU is > 50%, then status is set to "CAREFUL".
If user|kernel|nice CPU is > 70%, then status is set to "WARNING".
If user|kernel|nice CPU is > 90%, then status is set to "CRITICAL".
### Load
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/load.png)
On the Nosheep blog, Zach defines average load: "In short it is the
average sum of the number of processes waiting in the run-queue plus the
number currently executing over 1, 5, and 15 minute time periods."
Glances gets the number of CPU cores to adapt the alerts. With Glances,
alerts on average load are only set on 5 and 15 mins. The first line
also display the number of CPU core.
If average load is < O.7*Core, then status is set to "OK".
If average load is > O.7*Core, then status is set to "CAREFUL".
If average load is > 1*Core, then status is set to "WARNING".
If average load is > 5*Core, then status is set to "CRITICAL".
### Memory
Glances uses two columns: one for the RAM and another one for the SWAP.
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/mem.png)
If space is available, Glances displays extended informations:
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/mem-wide.png)
With Glances, alerts are only set for on used swap and real memory.
If memory is < 50%, then status is set to "OK".
If memory is > 50%, then status is set to "CAREFUL".
If memory is > 70%, then status is set to "WARNING".
If memory is > 90%, then status is set to "CRITICAL".
### Network bit rate
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/network.png)
Glances display the network interface bit rate. The unit is adapted
dynamicaly (bits per second, Kbits per second, Mbits per second...).
Alerts are set only if the network interface maximum speed is available.
If bit rate is < 50%, then status is set to "OK".
If bit rate is > 50%, then status is set to "CAREFUL".
If bit rate is > 70%, then status is set to "WARNING".
If bit rate is > 90%, then status is set to "CRITICAL".
For example, on a 100 Mbps Ethernet interface, the warning status is set
if the bit rate is higher than 70 Mbps.
### Sensors (optional; only available on Linux)
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/sensors.png)
Optionally, Glances displays the sensors informations (lm-sensors).
A filter is processed in order to only display temperature.
You should enable this module using the following command line:
glances -e
There is no alert on this information.
### Disk I/O
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/diskio.png)
Glances displays the disk I/O throughput. The unit is adapted dynamically
(bytes per second, Kbytes per second, Mbytes per second...).
There is no alert on this information.
### Filesystem
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/fs.png)
Glances displays the total and used filesytem disk space. The unit is
adapted dynamically (bytes per second, Kbytes per second, Mbytes per
second...).
Alerts are set for used disk space:
If disk used is < 50%, then status is set to "OK".
If disk used is > 50%, then status is set to "CAREFUL".
If disk used is > 70%, then status is set to "WARNING".
If disk used is > 90%, then status is set to "CRITICAL".
### Processes
Short view:
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/processlist.png)
Long view (only available if your terminal is wide enough)
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/processlist-wide.png)
Glances displays a summary and a list of processes.
By default (or if you hit the 'a' key) the process list is automatically
sorted by CPU of memory consumption.
The number of processes in the list is adapted to the screen size.
* VIRT: Virtual memory size (in byte)
* REST: Amount of resident memory (in byte)
* CPU%: % of CPU used by the process
* MEM%: % of MEM used by the process
* PID: Process ID
* USER: Process user ID
* NI: Nice level of the process
* S: Process status
R - Running
D - Sleeping (may not be interrupted)
S - Sleeping (may be interrupted)
T - Traced or stopped
Z - Zombie or "hung" process
* TIME+: Cumulative CPU time used
* IO_R and IO_W: Per process IO read and write rate (in byte per second)
* NAME: Process name or command line
### Logs
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/logs.png)
A logs list is displayed in the bottom of the screen if (and only if):
* at least one WARNING or CRITICAL alert was occured.
* space is available in the bottom of the console/terminal
There is one line per alert with the following information:
* start date
* end date
* alert name
* (min/avg/max) values
### Footer
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/footer.png)
Glances displays the current time/date and access to the embedded help screen.
If you have ran Glances in client mode (-c), you can also see if the client is connected to the server.
If client is connected:
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/client-connected.png)
else:
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/client-disconnected.png)
On the left, you can easely seen if you are connected to a Glances server.
## Localisation
Glances localization files exist for:
* English (default langage)
* French
* Italian
* Spanish
* Portugal
Feel free to contribute !

143
README.rst Normal file
View File

@ -0,0 +1,143 @@
===============================
Glances - An eye on your system
===============================
.. image:: http://api.flattr.com/button/flattr-badge-large.png
:target: https://flattr.com/thing/484466/nicolargoglances-on-GitHub
.. image:: https://travis-ci.org/nicolargo/glances.png?branch=master
:target: https://travis-ci.org/nicolargo/glances
.. image:: docs/images/glances-white-256.png
:width: 128
**Glances** is a cross-platform curses-based monitoring tool written in Python.
It uses the `psutil`_ library to get information from your system.
.. image:: docs/images/screenshot-wide.png
Requirements
============
- ``python >= 2.6`` (tested with version 2.6, 2.7, 3.2, 3.3)
- ``psutil >= 0.4.1`` (recommended version >= 0.6)
- ``jinja`` (optional for HTML output)
- ``pysensors`` (optional for HW monitoring support)
- ``hddtemp`` (optional for HDD temperature monitoring support)
- ``setuptools``
Installation
============
Actually, Glances is available for Arch Linux, Fedora / CentOS / RHEL,
Debian (Sid), Ubuntu (13.04+) and FreeBSD, so you should be able to
install it using your favorite package manager.
Glances is on `PyPI`_. To install, simply use `pip`_:
.. code-block:: console
pip install Glances
OS X
----
OS X users can also install Glances using `Homebrew`_ or `MacPorts`_.
Homebrew
````````
.. code-block:: console
$ brew install brew-pip
$ export PYTHONPATH=$(brew --prefix)/lib/python2.7/site-packages
$ brew pip Glances
.. note:: If you get the following error:
::
Error: Failed executing: pip install glances==X.X --install-option=--prefix=/usr/local/XXX/glances/X.X (.rb:)
Try to run:
.. code-block:: console
$ pip install glances==X.X --install-option=--prefix=/usr/local/XXX/glances/X.X
$ brew link Glances
MacPorts
````````
.. code-block:: console
$ sudo port install glances
Windows
-------
Windows only support Glances in server mode. Glances will automatically run in server mode on it.
Thanks to `Nicolas Bourges`, Glances can be easily installed using a Windows installer:
- glances-1.6.0-x86.exe_ (32-bit, md5sum: 1d25902a2b1030f953a108792f4732cf)
- glances-1.6.0-x64.exe_ (64-bit, md5sum: de2c35c4bdd6a3ab2b938ea5f4c1567d)
Otherwise, you have to follow these steps:
- Install `Python for Windows`: http://www.python.org/getit/
- Install the `psutil` library: https://code.google.com/p/psutil/downloads/list
- Download `Glances` from here: http://nicolargo.github.io/glances/
Source
------
To install Glances from source:
.. code-block:: console
$ curl -L https://github.com/nicolargo/glances/archive/vX.X.tar.gz -o glances-X.X.tar.gz
$ tar -zxvf glances-*.tar.gz
$ cd glances-*
# python setup.py install
.. note:: On Debian/Ubuntu, you have to install first `build-essential` and `python-dev`.
Puppet
------
You can install Glances using `Puppet`_: https://github.com/rverchere/puppet-glances
Usage
=====
Just run:
.. code-block:: console
$ glances [OPTIONS]
Documentation
=============
For complete documentation see ``glances-doc.html``.
Author
======
Nicolas Hennion (@nicolargo) <nicolas@nicolargo.com>
License
=======
LGPL. See ``COPYING`` for more details.
.. _psutil: https://code.google.com/p/psutil/
.. _PyPI: https://pypi.python.org/pypi
.. _pip: http://www.pip-installer.org/
.. _Homebrew: http://mxcl.github.com/homebrew/
.. _MacPorts: https://www.macports.org/
.. _glances-1.6.0-x86.exe: https://s3.amazonaws.com/glances/glances-1.6.0-x86.exe
.. _glances-1.6.0-x64.exe: https://s3.amazonaws.com/glances/glances-1.6.0-x64.exe
.. _Puppet: https://puppetlabs.com/puppet/what-is-puppet/

3
TODO
View File

@ -1,2 +1 @@
- Need a packager/installer for Windows OS (Server mode only)
- Need translators contributions (Chines, Japon, ...)
- Need translators contributions (Chinese, Japanese, etc.)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

550
docs/glances-doc.html Normal file
View File

@ -0,0 +1,550 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" />
<title>Glances</title>
<style type="text/css">
/*
:Author: Alessio Sergi
:Contact: al3hex at gmail dot com
Stylesheet for use with Docutils.
This file is the CSS for the Glances documentation.
*/
body {
margin-top: 1em;
margin-left: 1em;
max-width: 80em;
font-family: serif;
font-size: 16px;
}
h1 {
font-size: 20px;
}
h1.title {
font-size: 22px;
}
h2, h3, p.topic-title {
font-size: 18px;
}
.first {
/* override p.topic-title margin styles */
margin-top: 0 ! important;
}
a {
color: #0055df;
text-decoration: none;
}
a:hover {
color: #339999;
text-decoration: underline;
}
a:visited {
color: #800080;
}
a.toc-backref {
text-decoration: none;
color: black;
}
blockquote {
padding-left: 1ex;
border-left: 1px solid #008000;
max-width: 30em;
}
p.topic-title {
font-weight: bold;
}
pre.code {
margin-left: 2em;
margin-right: 2em;
}
.console {
background-color: #eeeeee;
border: 1px solid #cccccc;
max-width: 60em;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px 3px 3px 3px;
}
span.option, tt.docutils {
white-space: nowrap;
border: 1px dotted #008000;
padding: 1px;
background-color: #eeeeee;
}
.literal, .literal-block, .option, .var {
font-family: monospace;
font-size: 10pt;
}
dl.docutils {
margin-left: 2em;
}
dl.docutils dd {
margin-bottom: 0.5em;
}
ol.simple {
margin-left: 0.5em;
}
table.docutils {
margin-left: 2em;
}
td.option-group {
padding-right: 1em;
}
</style>
</head>
<body>
<div class="document" id="glances">
<h1 class="title">Glances</h1>
<p>This manual describes <em>Glances</em> version 1.7.</p>
<p>Copyright © 2012-2013 Nicolas Hennion &lt;<a class="reference external" href="mailto:nicolas&#64;nicolargo.com">nicolas&#64;nicolargo.com</a>&gt;</p>
<p>April 2013</p>
<div class="contents topic" id="table-of-contents">
<p class="topic-title first">Table of Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#introduction" id="id3">Introduction</a></li>
<li><a class="reference internal" href="#usage" id="id4">Usage</a><ul>
<li><a class="reference internal" href="#standalone-mode" id="id5">Standalone mode</a></li>
<li><a class="reference internal" href="#client-server-mode" id="id6">Client/Server mode</a></li>
</ul>
</li>
<li><a class="reference internal" href="#command-reference" id="id7">Command reference</a><ul>
<li><a class="reference internal" href="#command-line-options" id="id8">Command-line options</a></li>
<li><a class="reference internal" href="#interactive-commands" id="id9">Interactive commands</a></li>
</ul>
</li>
<li><a class="reference internal" href="#configuration" id="id10">Configuration</a></li>
<li><a class="reference internal" href="#anatomy-of-the-application" id="id11">Anatomy of the application</a><ul>
<li><a class="reference internal" href="#legend" id="id12">Legend</a></li>
<li><a class="reference internal" href="#header" id="id13">Header</a></li>
<li><a class="reference internal" href="#cpu" id="id14">CPU</a></li>
<li><a class="reference internal" href="#load" id="id15">Load</a></li>
<li><a class="reference internal" href="#memory" id="id16">Memory</a></li>
<li><a class="reference internal" href="#network" id="id17">Network</a></li>
<li><a class="reference internal" href="#sensors" id="id18">Sensors</a></li>
<li><a class="reference internal" href="#disk-i-o" id="id19">Disk I/O</a></li>
<li><a class="reference internal" href="#file-system" id="id20">File system</a></li>
<li><a class="reference internal" href="#processes-list" id="id21">Processes list</a></li>
<li><a class="reference internal" href="#logs" id="id22">Logs</a></li>
<li><a class="reference internal" href="#footer" id="id23">Footer</a></li>
</ul>
</li>
<li><a class="reference internal" href="#api-documentation" id="id24">API documentation</a></li>
<li><a class="reference internal" href="#support" id="id25">Support</a></li>
</ul>
</div>
<div class="section" id="introduction">
<h1><a class="toc-backref" href="#id3">Introduction</a></h1>
<p>Glances is a cross-platform curses-based monitoring tool which aims to
present a maximum of information in a minimum of space, ideally to fit
in a classical 80x24 terminal or higher to have additional information.</p>
<p>Glances can adapt dynamically the displayed information depending on the
terminal size. It can also work in a client/server mode for remote monitoring.</p>
<p>Glances is written in Python and uses the <a class="reference external" href="https://code.google.com/p/psutil/">psutil</a> library to get information from your system.</p>
<p>Console (80x24)</p>
<img alt="images/screenshot.png" src="images/screenshot.png" />
<p>Full view (&gt;80x24)</p>
<img alt="images/screenshot-wide.png" src="images/screenshot-wide.png" />
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id4">Usage</a></h1>
<div class="section" id="standalone-mode">
<h2><a class="toc-backref" href="#id5">Standalone mode</a></h2>
<p>Simply run:</p>
<pre class="code console literal-block">
<span class="generic prompt">$</span> glances
</pre>
</div>
<div class="section" id="client-server-mode">
<h2><a class="toc-backref" href="#id6">Client/Server mode</a></h2>
<p>If you want to remotely monitor a machine, called <tt class="docutils literal">server</tt>, from another one, called <tt class="docutils literal">client</tt>,
just run on the server:</p>
<pre class="code console literal-block">
<span class="generic output">server$ glances -s</span>
</pre>
<p>and on the client:</p>
<pre class="code console literal-block">
<span class="generic output">client$ glances -c &#64;server</span>
</pre>
<p>where <tt class="docutils literal">&#64;server</tt> is the IP address or host name of the server.</p>
<p>In server mode, you can set the bind address <tt class="docutils literal"><span class="pre">-B</span> ADDRESS</tt> and listening TCP port <tt class="docutils literal"><span class="pre">-p</span> PORT</tt>.</p>
<p>In client mode, you can set the TCP port of the server <tt class="docutils literal"><span class="pre">-p</span> PORT</tt>.</p>
<p>Default binding address is <tt class="docutils literal">0.0.0.0</tt> (Glances will listen on all the network interfaces) and TCP port is <tt class="docutils literal">61209</tt>.</p>
<p>In client/server mode, limits are set by the server side.</p>
<p>The version 1.6 introduces a optional password to access to the server <tt class="docutils literal"><span class="pre">-P</span> password</tt>.</p>
</div>
</div>
<div class="section" id="command-reference">
<h1><a class="toc-backref" href="#id7">Command reference</a></h1>
<div class="section" id="command-line-options">
<h2><a class="toc-backref" href="#id8">Command-line options</a></h2>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group">
<kbd><span class="option">-b</span></kbd></td>
<td>Display network rate in Byte per second</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-B <var>IP</var></span></kbd></td>
<td>Bind server to the given IP or hostname</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-c <var>IP</var></span></kbd></td>
<td>Connect to a Glances server</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-C <var>file</var></span></kbd></td>
<td>Path to the configuration file (default: {/usr/local,}/etc/glances/glances.conf)</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-d</span></kbd></td>
<td>Disable disk I/O module</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-e</span></kbd></td>
<td>Enable the sensors module (Linux-only)</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-f <var>file</var></span></kbd></td>
<td>Set the output folder (HTML) or file (CSV)</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-h</span></kbd></td>
<td>Display the help and exit</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-m</span></kbd></td>
<td>Disable mount module</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-n</span></kbd></td>
<td>Disable network module</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-o <var>output</var></span></kbd></td>
<td>Define additional output (available: HTML or CSV)</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-p <var>PORT</var></span></kbd></td>
<td>Define the client or server TCP port (default: 61209)</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-P <var>password</var></span></kbd></td>
<td>Define a client/server password</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-r</span></kbd></td>
<td>Do not list processes</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-s</span></kbd></td>
<td>Run Glances in server mode</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-t <var>sec</var></span></kbd></td>
<td>Set the refresh time in seconds (default: 3)</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-v</span></kbd></td>
<td>Display the version and exit</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-y</span></kbd></td>
<td>Enable the hddtemp module (needs running hddtemp daemon)</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-z</span></kbd></td>
<td>Do not use the bold color attribute</td></tr>
</tbody>
</table>
</div>
<div class="section" id="interactive-commands">
<h2><a class="toc-backref" href="#id9">Interactive commands</a></h2>
<p>The following commands are supported while in Glances:</p>
<dl class="docutils">
<dt><tt class="docutils literal">a</tt></dt>
<dd><p class="first">Automatic mode. The processes are sorted automatically.</p>
<ul class="last simple">
<li>If CPU iowait <tt class="docutils literal">&gt;60%</tt>, sort processes by IO read and write</li>
<li>If CPU <tt class="docutils literal">&gt;70%</tt>, sort processes by CPU usage</li>
<li>If MEM <tt class="docutils literal">&gt;70%</tt>, sort processes by memory usage</li>
</ul>
</dd>
<dt><tt class="docutils literal">b</tt></dt>
<dd>Switch between bit/s or Byte/s for network IO</dd>
<dt><tt class="docutils literal">c</tt></dt>
<dd>Sort processes by CPU%</dd>
<dt><tt class="docutils literal">d</tt></dt>
<dd>Show/hide disk I/O stats</dd>
<dt><tt class="docutils literal">f</tt></dt>
<dd>Show/hide file system stats</dd>
<dt><tt class="docutils literal">h</tt></dt>
<dd>Show/hide the help message (with the keys you can press and the limits)</dd>
<dt><tt class="docutils literal">i</tt></dt>
<dd>Sort processes by IO rate (need root account on some OS)</dd>
<dt><tt class="docutils literal">l</tt></dt>
<dd>Show/hide log messages</dd>
<dt><tt class="docutils literal">m</tt></dt>
<dd>Sort processes by MEM%</dd>
<dt><tt class="docutils literal">n</tt></dt>
<dd>Show/hide network stats</dd>
<dt><tt class="docutils literal">p</tt></dt>
<dd>Sort processes by name</dd>
<dt><tt class="docutils literal">s</tt></dt>
<dd>Show/hide sensors stats (only available with -e flag; pysensors library is needed; Linux-only)</dd>
<dt><tt class="docutils literal">t</tt></dt>
<dd>View network IO as combination</dd>
<dt><tt class="docutils literal">u</tt></dt>
<dd>View cumulative network IO</dd>
<dt><tt class="docutils literal">w</tt></dt>
<dd>Delete finished warning log messages</dd>
<dt><tt class="docutils literal">x</tt></dt>
<dd>Delete finished warning and critical log messages</dd>
<dt><tt class="docutils literal">1</tt></dt>
<dd>Switch between global CPU and per-CPU stats</dd>
<dt><tt class="docutils literal">q</tt></dt>
<dd>Quit</dd>
</dl>
</div>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#id10">Configuration</a></h1>
<p>No configuration is needed to use Glances.</p>
<p>Furthermore, starting from release 1.6, it has been introduced a configuration file for setup limits.</p>
<p>By default, the configuration file is under:</p>
<pre class="code console literal-block">
<span class="generic output">/etc/glances/glances.conf (Linux)</span>
</pre>
<p>or:</p>
<pre class="code console literal-block">
<span class="generic output">/usr/local/etc/glances/glances.conf (*BSD and OS X)</span>
</pre>
<p>To override the default configuration, you can copy the <tt class="docutils literal">glances.conf</tt> file to
your <tt class="docutils literal">$XDG_CONFIG_HOME</tt> directory (e.g. Linux):</p>
<pre class="code console literal-block">
<span class="generic output">mkdir -p $XDG_CONFIG_HOME/glances
cp /etc/glances/glances.conf $XDG_CONFIG_HOME/glances/</span>
</pre>
<p>On OS X, you should copy the configuration file to <tt class="docutils literal">~/Library/Application Support/glances/</tt>.</p>
</div>
<div class="section" id="anatomy-of-the-application">
<h1><a class="toc-backref" href="#id11">Anatomy of the application</a></h1>
<div class="section" id="legend">
<h2><a class="toc-backref" href="#id12">Legend</a></h2>
<div class="line-block">
<div class="line"><tt class="docutils literal">GREEN</tt> stat counter is <tt class="docutils literal">&quot;OK&quot;</tt></div>
<div class="line"><tt class="docutils literal">BLUE</tt> stat counter is <tt class="docutils literal">&quot;CAREFUL&quot;</tt></div>
<div class="line"><tt class="docutils literal">MAGENTA</tt> stat counter is <tt class="docutils literal">&quot;WARNING&quot;</tt></div>
<div class="line"><tt class="docutils literal">RED</tt> stat counter is <tt class="docutils literal">&quot;CRITICAL&quot;</tt></div>
</div>
</div>
<div class="section" id="header">
<h2><a class="toc-backref" href="#id13">Header</a></h2>
<img alt="images/header.png" src="images/header.png" />
<p>The header shows the OS name, release version, platform architecture and the host name.
On Linux, it shows also the kernel version.</p>
</div>
<div class="section" id="cpu">
<h2><a class="toc-backref" href="#id14">CPU</a></h2>
<p>Short view:</p>
<img alt="images/cpu.png" src="images/cpu.png" />
<p>If enough horizontal space is available, extended CPU informations are displayed.</p>
<p>Extended view:</p>
<img alt="images/cpu-wide.png" src="images/cpu-wide.png" />
<p>To switch to per-CPU stats, just hit the <tt class="docutils literal">1</tt> key:</p>
<img alt="images/per-cpu.png" src="images/per-cpu.png" />
<p>The CPU stats are shown as a percentage and for the configured refresh time.
The total CPU usage is displayed on the first line.</p>
<div class="line-block">
<div class="line">If user|system|nice CPU is <tt class="docutils literal">&lt;50%</tt>, then status is set to <tt class="docutils literal">&quot;OK&quot;</tt></div>
<div class="line">If user|system|nice CPU is <tt class="docutils literal">&gt;50%</tt>, then status is set to <tt class="docutils literal">&quot;CAREFUL&quot;</tt></div>
<div class="line">If user|system|nice CPU is <tt class="docutils literal">&gt;70%</tt>, then status is set to <tt class="docutils literal">&quot;WARNING&quot;</tt></div>
<div class="line">If user|system|nice CPU is <tt class="docutils literal">&gt;90%</tt>, then status is set to <tt class="docutils literal">&quot;CRITICAL&quot;</tt></div>
</div>
</div>
<div class="section" id="load">
<h2><a class="toc-backref" href="#id15">Load</a></h2>
<img alt="images/load.png" src="images/load.png" />
<p>On the <em>No Sheep</em> blog, <em>Zachary Tirrell</em> defines the average load <a class="footnote-reference" href="#id2" id="id1">[1]</a>:</p>
<blockquote>
&quot;In short it is the average sum of the number of processes
waiting in the run-queue plus the number currently executing
over 1, 5, and 15 minute time periods.&quot;</blockquote>
<p>Glances gets the number of CPU core to adapt the alerts.
Alerts on average load are only set on 5 and 15 min.
The first line also display the number of CPU core.</p>
<div class="line-block">
<div class="line">If average load is <tt class="docutils literal">&lt;0.7*core</tt>, then status is set to <tt class="docutils literal">&quot;OK&quot;</tt></div>
<div class="line">If average load is <tt class="docutils literal">&gt;0.7*core</tt>, then status is set to <tt class="docutils literal">&quot;CAREFUL&quot;</tt></div>
<div class="line">If average load is <tt class="docutils literal">&gt;1*core</tt>, then status is set to <tt class="docutils literal">&quot;WARNING&quot;</tt></div>
<div class="line">If average load is <tt class="docutils literal">&gt;5*core</tt>, then status is set to <tt class="docutils literal">&quot;CRITICAL&quot;</tt></div>
</div>
</div>
<div class="section" id="memory">
<h2><a class="toc-backref" href="#id16">Memory</a></h2>
<p>Glances uses two columns: one for the <tt class="docutils literal">RAM</tt> and another one for the <tt class="docutils literal">Swap</tt>.</p>
<img alt="images/mem.png" src="images/mem.png" />
<p>If enough space is available, Glances displays extended informations:</p>
<img alt="images/mem-wide.png" src="images/mem-wide.png" />
<p>With Glances, alerts are only set for on used memory and used swap.</p>
<div class="line-block">
<div class="line">If memory is <tt class="docutils literal">&lt;50%</tt>, then status is set to <tt class="docutils literal">&quot;OK&quot;</tt></div>
<div class="line">If memory is <tt class="docutils literal">&gt;50%</tt>, then status is set to <tt class="docutils literal">&quot;CAREFUL&quot;</tt></div>
<div class="line">If memory is <tt class="docutils literal">&gt;70%</tt>, then status is set to <tt class="docutils literal">&quot;WARNING&quot;</tt></div>
<div class="line">If memory is <tt class="docutils literal">&gt;90%</tt>, then status is set to <tt class="docutils literal">&quot;CRITICAL&quot;</tt></div>
</div>
</div>
<div class="section" id="network">
<h2><a class="toc-backref" href="#id17">Network</a></h2>
<img alt="images/network.png" src="images/network.png" />
<p>Glances displays the network interface bit rate. The unit is adapted
dynamically (bits per second, kbits per second, Mbits per second, etc).</p>
<p>Alerts are only set if the network interface maximum speed is available.</p>
<p>For example, on a 100 Mbps ethernet interface, the warning status is set
if the bit rate is higher than 70 Mbps.</p>
<div class="line-block">
<div class="line">If bit rate is <tt class="docutils literal">&lt;50%</tt>, then status is set to <tt class="docutils literal">&quot;OK&quot;</tt></div>
<div class="line">If bit rate is <tt class="docutils literal">&gt;50%</tt>, then status is set to <tt class="docutils literal">&quot;CAREFUL&quot;</tt></div>
<div class="line">If bit rate is <tt class="docutils literal">&gt;70%</tt>, then status is set to <tt class="docutils literal">&quot;WARNING&quot;</tt></div>
<div class="line">If bit rate is <tt class="docutils literal">&gt;90%</tt>, then status is set to <tt class="docutils literal">&quot;CRITICAL&quot;</tt></div>
</div>
</div>
<div class="section" id="sensors">
<h2><a class="toc-backref" href="#id18">Sensors</a></h2>
<img alt="images/sensors.png" src="images/sensors.png" />
<p>Glances can displays the sensors informations trough <cite>lm-sensors</cite> (only
available on Linux).</p>
<p>A filter is processed in order to only display temperature.</p>
<p>You should enable this module using the following command line:</p>
<pre class="code console literal-block">
<span class="generic prompt">$</span> glances -e
</pre>
<p>There is no alert on this information.</p>
</div>
<div class="section" id="disk-i-o">
<h2><a class="toc-backref" href="#id19">Disk I/O</a></h2>
<img alt="images/diskio.png" src="images/diskio.png" />
<p>Glances displays the disk I/O throughput. The unit is adapted dynamically.</p>
<p>There is no alert on this information.</p>
</div>
<div class="section" id="file-system">
<h2><a class="toc-backref" href="#id20">File system</a></h2>
<img alt="images/fs.png" src="images/fs.png" />
<p>Glances displays the used and total file system disk space. The unit is
adapted dynamically.</p>
<p>Alerts are set for used disk space:</p>
<div class="line-block">
<div class="line">If disk used is <tt class="docutils literal">&lt;50%</tt>, then status is set to <tt class="docutils literal">&quot;OK&quot;</tt></div>
<div class="line">If disk used is <tt class="docutils literal">&gt;50%</tt>, then status is set to <tt class="docutils literal">&quot;CAREFUL&quot;</tt></div>
<div class="line">If disk used is <tt class="docutils literal">&gt;70%</tt>, then status is set to <tt class="docutils literal">&quot;WARNING&quot;</tt></div>
<div class="line">If disk used is <tt class="docutils literal">&gt;90%</tt>, then status is set to <tt class="docutils literal">&quot;CRITICAL&quot;</tt></div>
</div>
</div>
<div class="section" id="processes-list">
<h2><a class="toc-backref" href="#id21">Processes list</a></h2>
<p>Compact view:</p>
<img alt="images/processlist.png" src="images/processlist.png" />
<p>Full view:</p>
<img alt="images/processlist-wide.png" src="images/processlist-wide.png" />
<p>Glances displays a summary and a list of processes.</p>
<p>By default, or if you hit the <tt class="docutils literal">a</tt> key, the processes list is automatically
sorted by CPU of memory usage.</p>
<p>The number of processes in the list is adapted to the screen size.</p>
<dl class="docutils">
<dt><tt class="docutils literal">VIRT</tt></dt>
<dd>Virtual memory size</dd>
<dt><tt class="docutils literal">RES</tt></dt>
<dd>Resident memory</dd>
<dt><tt class="docutils literal">CPU%</tt></dt>
<dd>% of CPU used by the process</dd>
<dt><tt class="docutils literal">MEM%</tt></dt>
<dd>% of MEM used by the process</dd>
<dt><tt class="docutils literal">PID</tt></dt>
<dd>Process ID</dd>
<dt><tt class="docutils literal">USER</tt></dt>
<dd>User ID per process</dd>
<dt><tt class="docutils literal">NI</tt></dt>
<dd>Nice level of the process</dd>
<dt><tt class="docutils literal">S</tt></dt>
<dd>Process status</dd>
<dt><tt class="docutils literal">TIME+</tt></dt>
<dd>Cumulative CPU time used</dd>
<dt><tt class="docutils literal">IOR/s</tt></dt>
<dd>Per process IO read rate (in Byte/s)</dd>
<dt><tt class="docutils literal">IOW/s</tt></dt>
<dd>Per process IO write rate (in Byte/s)</dd>
<dt><tt class="docutils literal">NAME</tt></dt>
<dd>Process name or command line</dd>
</dl>
<p>Process status legend:</p>
<dl class="docutils">
<dt><tt class="docutils literal">R</tt></dt>
<dd>running</dd>
<dt><tt class="docutils literal">S</tt></dt>
<dd>sleeping (may be interrupted)</dd>
<dt><tt class="docutils literal">D</tt></dt>
<dd>disk sleep (may not be interrupted)</dd>
<dt><tt class="docutils literal">T</tt></dt>
<dd>traced/stopped</dd>
<dt><tt class="docutils literal">Z</tt></dt>
<dd>zombie</dd>
</dl>
</div>
<div class="section" id="logs">
<h2><a class="toc-backref" href="#id22">Logs</a></h2>
<img alt="images/logs.png" src="images/logs.png" />
<p>A log messages list is displayed in the bottom of the screen if (and only if):</p>
<ul class="simple">
<li>at least one <tt class="docutils literal">WARNING</tt> or <tt class="docutils literal">CRITICAL</tt> alert was occurred</li>
<li>space is available in the bottom of the console/terminal</li>
</ul>
<p>Each alert message displays the following information:</p>
<ol class="arabic simple">
<li>start date</li>
<li>end date</li>
<li>alert name</li>
<li>{min/avg/max} values</li>
</ol>
</div>
<div class="section" id="footer">
<h2><a class="toc-backref" href="#id23">Footer</a></h2>
<img alt="images/footer.png" src="images/footer.png" />
<p>Glances displays the current date &amp; time and access to the embedded help screen.</p>
<p>If you have ran Glances in client mode <tt class="docutils literal"><span class="pre">-c</span></tt>, you can also see if the client is connected to the server.</p>
<p>If client is connected:</p>
<img alt="images/client-connected.png" src="images/client-connected.png" />
<p>else:</p>
<img alt="images/client-disconnected.png" src="images/client-disconnected.png" />
<p>On the left, you can easily see if you are connected to a Glances server.</p>
</div>
</div>
<div class="section" id="api-documentation">
<h1><a class="toc-backref" href="#id24">API documentation</a></h1>
<p>Glances uses a <a class="reference external" href="http://docs.python.org/2/library/simplexmlrpcserver.html">XML-RPC server</a> and can be used by another client software.</p>
<p>API documentation is available at <a class="reference external" href="https://github.com/nicolargo/glances/wiki/The-Glances-API-How-To">https://github.com/nicolargo/glances/wiki/The-Glances-API-How-To</a></p>
</div>
<div class="section" id="support">
<h1><a class="toc-backref" href="#id25">Support</a></h1>
<p>To report a bug or a feature request use the bug tracking system at <a class="reference external" href="https://github.com/nicolargo/glances/issues">https://github.com/nicolargo/glances/issues</a></p>
<p>Feel free to contribute!</p>
<table class="docutils footnote" frame="void" id="id2" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td><a class="reference external" href="http://nosheep.net/story/defining-unix-load-average/">http://nosheep.net/story/defining-unix-load-average/</a></td></tr>
</tbody>
</table>
</div>
</div>
</body>
</html>

427
docs/glances-doc.rst Normal file
View File

@ -0,0 +1,427 @@
=======
Glances
=======
This manual describes *Glances* version 1.7.
Copyright © 2012-2013 Nicolas Hennion <nicolas@nicolargo.com>
April 2013
.. contents:: Table of Contents
Introduction
============
Glances is a cross-platform curses-based monitoring tool which aims to
present a maximum of information in a minimum of space, ideally to fit
in a classical 80x24 terminal or higher to have additional information.
Glances can adapt dynamically the displayed information depending on the
terminal size. It can also work in a client/server mode for remote monitoring.
Glances is written in Python and uses the `psutil`_ library to get information from your system.
Console (80x24)
.. image:: images/screenshot.png
Full view (>80x24)
.. image:: images/screenshot-wide.png
Usage
=====
Standalone mode
---------------
Simply run:
.. code-block:: console
$ glances
Client/Server mode
------------------
If you want to remotely monitor a machine, called ``server``, from another one, called ``client``,
just run on the server:
.. code-block:: console
server$ glances -s
and on the client:
.. code-block:: console
client$ glances -c @server
where ``@server`` is the IP address or host name of the server.
In server mode, you can set the bind address ``-B ADDRESS`` and listening TCP port ``-p PORT``.
In client mode, you can set the TCP port of the server ``-p PORT``.
Default binding address is ``0.0.0.0`` (Glances will listen on all the network interfaces) and TCP port is ``61209``.
In client/server mode, limits are set by the server side.
The version 1.6 introduces a optional password to access to the server ``-P password``.
Command reference
=================
Command-line options
--------------------
-b Display network rate in Byte per second
-B IP Bind server to the given IP or hostname
-c IP Connect to a Glances server
-C file Path to the configuration file (default: {/usr/local,}/etc/glances/glances.conf)
-d Disable disk I/O module
-e Enable the sensors module (Linux-only)
-f file Set the output folder (HTML) or file (CSV)
-h Display the help and exit
-m Disable mount module
-n Disable network module
-o output Define additional output (available: HTML or CSV)
-p PORT Define the client or server TCP port (default: 61209)
-P password Define a client/server password
-r Do not list processes
-s Run Glances in server mode
-t sec Set the refresh time in seconds (default: 3)
-v Display the version and exit
-y Enable the hddtemp module (needs running hddtemp daemon)
-z Do not use the bold color attribute
Interactive commands
--------------------
The following commands are supported while in Glances:
``a``
Automatic mode. The processes are sorted automatically.
- If CPU iowait ``>60%``, sort processes by IO read and write
- If CPU ``>70%``, sort processes by CPU usage
- If MEM ``>70%``, sort processes by memory usage
``b``
Switch between bit/s or Byte/s for network IO
``c``
Sort processes by CPU%
``d``
Show/hide disk I/O stats
``f``
Show/hide file system stats
``h``
Show/hide the help message (with the keys you can press and the limits)
``i``
Sort processes by IO rate (need root account on some OS)
``l``
Show/hide log messages
``m``
Sort processes by MEM%
``n``
Show/hide network stats
``p``
Sort processes by name
``s``
Show/hide sensors stats (only available with -e flag; pysensors library is needed; Linux-only)
``t``
View network IO as combination
``u``
View cumulative network IO
``w``
Delete finished warning log messages
``x``
Delete finished warning and critical log messages
``1``
Switch between global CPU and per-CPU stats
``q``
Quit
Configuration
=============
No configuration is needed to use Glances.
Furthermore, starting from release 1.6, it has been introduced a configuration file for setup limits.
By default, the configuration file is under:
.. code-block:: console
/etc/glances/glances.conf (Linux)
or:
.. code-block:: console
/usr/local/etc/glances/glances.conf (*BSD and OS X)
To override the default configuration, you can copy the ``glances.conf`` file to
your ``$XDG_CONFIG_HOME`` directory (e.g. Linux):
.. code-block:: console
mkdir -p $XDG_CONFIG_HOME/glances
cp /etc/glances/glances.conf $XDG_CONFIG_HOME/glances/
On OS X, you should copy the configuration file to ``~/Library/Application Support/glances/``.
Anatomy of the application
==========================
Legend
------
| ``GREEN`` stat counter is ``"OK"``
| ``BLUE`` stat counter is ``"CAREFUL"``
| ``MAGENTA`` stat counter is ``"WARNING"``
| ``RED`` stat counter is ``"CRITICAL"``
Header
------
.. image:: images/header.png
The header shows the OS name, release version, platform architecture and the host name.
On Linux, it shows also the kernel version.
CPU
---
Short view:
.. image:: images/cpu.png
If enough horizontal space is available, extended CPU informations are displayed.
Extended view:
.. image:: images/cpu-wide.png
To switch to per-CPU stats, just hit the ``1`` key:
.. image:: images/per-cpu.png
The CPU stats are shown as a percentage and for the configured refresh time.
The total CPU usage is displayed on the first line.
| If user|system|nice CPU is ``<50%``, then status is set to ``"OK"``
| If user|system|nice CPU is ``>50%``, then status is set to ``"CAREFUL"``
| If user|system|nice CPU is ``>70%``, then status is set to ``"WARNING"``
| If user|system|nice CPU is ``>90%``, then status is set to ``"CRITICAL"``
Load
----
.. image:: images/load.png
On the *No Sheep* blog, *Zachary Tirrell* defines the average load [1]_:
"In short it is the average sum of the number of processes
waiting in the run-queue plus the number currently executing
over 1, 5, and 15 minute time periods."
Glances gets the number of CPU core to adapt the alerts.
Alerts on average load are only set on 5 and 15 min.
The first line also display the number of CPU core.
| If average load is ``<0.7*core``, then status is set to ``"OK"``
| If average load is ``>0.7*core``, then status is set to ``"CAREFUL"``
| If average load is ``>1*core``, then status is set to ``"WARNING"``
| If average load is ``>5*core``, then status is set to ``"CRITICAL"``
Memory
------
Glances uses two columns: one for the ``RAM`` and another one for the ``Swap``.
.. image:: images/mem.png
If enough space is available, Glances displays extended informations:
.. image:: images/mem-wide.png
With Glances, alerts are only set for on used memory and used swap.
| If memory is ``<50%``, then status is set to ``"OK"``
| If memory is ``>50%``, then status is set to ``"CAREFUL"``
| If memory is ``>70%``, then status is set to ``"WARNING"``
| If memory is ``>90%``, then status is set to ``"CRITICAL"``
Network
-------
.. image:: images/network.png
Glances displays the network interface bit rate. The unit is adapted
dynamically (bits per second, kbits per second, Mbits per second, etc).
Alerts are only set if the network interface maximum speed is available.
For example, on a 100 Mbps ethernet interface, the warning status is set
if the bit rate is higher than 70 Mbps.
| If bit rate is ``<50%``, then status is set to ``"OK"``
| If bit rate is ``>50%``, then status is set to ``"CAREFUL"``
| If bit rate is ``>70%``, then status is set to ``"WARNING"``
| If bit rate is ``>90%``, then status is set to ``"CRITICAL"``
Sensors
-------
.. image:: images/sensors.png
Glances can displays the sensors informations trough `lm-sensors` (only
available on Linux).
A filter is processed in order to only display temperature.
You should enable this module using the following command line:
.. code-block:: console
$ glances -e
There is no alert on this information.
Disk I/O
--------
.. image:: images/diskio.png
Glances displays the disk I/O throughput. The unit is adapted dynamically.
There is no alert on this information.
File system
-----------
.. image:: images/fs.png
Glances displays the used and total file system disk space. The unit is
adapted dynamically.
Alerts are set for used disk space:
| If disk used is ``<50%``, then status is set to ``"OK"``
| If disk used is ``>50%``, then status is set to ``"CAREFUL"``
| If disk used is ``>70%``, then status is set to ``"WARNING"``
| If disk used is ``>90%``, then status is set to ``"CRITICAL"``
Processes list
--------------
Compact view:
.. image:: images/processlist.png
Full view:
.. image:: images/processlist-wide.png
Glances displays a summary and a list of processes.
By default, or if you hit the ``a`` key, the processes list is automatically
sorted by CPU of memory usage.
The number of processes in the list is adapted to the screen size.
``VIRT``
Virtual memory size
``RES``
Resident memory
``CPU%``
% of CPU used by the process
``MEM%``
% of MEM used by the process
``PID``
Process ID
``USER``
User ID per process
``NI``
Nice level of the process
``S``
Process status
``TIME+``
Cumulative CPU time used
``IOR/s``
Per process IO read rate (in Byte/s)
``IOW/s``
Per process IO write rate (in Byte/s)
``NAME``
Process name or command line
Process status legend:
``R``
running
``S``
sleeping (may be interrupted)
``D``
disk sleep (may not be interrupted)
``T``
traced/stopped
``Z``
zombie
Logs
----
.. image:: images/logs.png
A log messages list is displayed in the bottom of the screen if (and only if):
- at least one ``WARNING`` or ``CRITICAL`` alert was occurred
- space is available in the bottom of the console/terminal
Each alert message displays the following information:
1. start date
2. end date
3. alert name
4. {min/avg/max} values
Footer
------
.. image:: images/footer.png
Glances displays the current date & time and access to the embedded help screen.
If you have ran Glances in client mode ``-c``, you can also see if the client is connected to the server.
If client is connected:
.. image:: images/client-connected.png
else:
.. image:: images/client-disconnected.png
On the left, you can easily see if you are connected to a Glances server.
API documentation
=================
Glances uses a `XML-RPC server`_ and can be used by another client software.
API documentation is available at https://github.com/nicolargo/glances/wiki/The-Glances-API-How-To
Support
=======
To report a bug or a feature request use the bug tracking system at https://github.com/nicolargo/glances/issues
Feel free to contribute!
.. [1] http://nosheep.net/story/defining-unix-load-average/
.. _psutil: https://code.google.com/p/psutil/
.. _XML-RPC server: http://docs.python.org/2/library/simplexmlrpcserver.html

View File

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 90 KiB

View File

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 146 KiB

View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

143
docs/man/glances.1 Normal file
View File

@ -0,0 +1,143 @@
.TH glances 1 "April, 2013" "version 1.7" "USER COMMANDS"
.SH NAME
glances \- A cross-platform curses-based monitoring tool
.SH SYNOPSIS
.B glances
[\-bdehmnrsvyz] [\-B bind] [\-c server] [\-C conffile] [\-f file] [\-o output] [\-p port] [\-P password] [\-t refresh]
.SH DESCRIPTION
Glances is a free (LGPL) cross-platform curses-based monitoring tool which aims to present a maximum of information
in a minimum of space, ideally to fit in a classical 80x24 terminal or higher to have additionnal information.
Glances can adapt dynamically the displayed information depending on the terminal size.
It can also work in a client/server mode for remote monitoring.
.PP
This tool is written in Python and uses psutil to fetch the statistical values from key elements.
.PP
The current version grab the following stats: CPU, Load, Memory, Network rate, Disk I/O, file system,
process number and details.
.SH COMMAND-LINE OPTIONS
The command-line options are the following:
.TP
.B \-b
Display network rate in Byte per second
.TP
.B \-B @IP|host
Bind server to the given IP or hostname
.TP
.B \-c @IP|host
Connect to a Glances server
.TP
.B \-C file
Path to the configuration file (default: {/usr/local,}/etc/glances/glances.conf)
.TP
.B \-d
Disable disk I/O module
.TP
.B \-e
Enable the sensors module (Linux-only)
.TP
.B \-f file
Set the output folder (HTML) or file (CSV)
.TP
.B \-h
Display the help and exit
.TP
.B \-m
Disable mount module
.TP
.B \-n
Disable network module
.TP
.B \-o output
Define additional output (available: HTML or CSV)
.TP
.B \-p PORT
Define the client or server TCP port (default: 61209)
.TP
.B \-P password
Define a client/server password
.TP
.B \-r
Do not list processes
.TP
.B \-s
Run Glances in server mode
.TP
.B \-t sec
Set the refresh time in seconds (default: 3)
.TP
.B \-v
Display the version and exit
.TP
.B \-y
Enable the hddtemp module (requires running hddtemp daemon)
.TP
.B \-z
Do not use the bold color attribute
.SH INTERACTIVE COMMANDS
You can use the following keys while in Glances:
.TP
.B a
Automatic mode. The process list is sorted automatically
.TP
.B b
Switch between bit/s or Byte/s for network IO
.TP
.B c
Sort processes by CPU%
.TP
.B d
Show/hide disk IO stats
.TP
.B f
Show/hide file system stats
.TP
.B h
Show/hide the help message
.TP
.B i
Sort processes by IO rate
.TP
.B l
Show/hide log messages
.TP
.B m
Sort processes by MEM%
.TP
.B n
Show/hide network stats
.TP
.B p
Sort processes by name
.TP
.B s
Show/hide sensors stats (Linux-only)
.TP
.B t
View network IO as combination
.TP
.B u
View cumulative network IO
.TP
.B w
Delete finished warning log messages
.TP
.B x
Delete finished warning and critical log messages
.TP
.B 1
Switch between global CPU and per-CPU stats
.TP
.B q
Quit
.SH EXAMPLES
.TP
Refresh information every 5 seconds:
.B glances
\-t 5
.PP
.SH EXIT STATUS
Glances returns a zero exit status if it succeeds to print/grab information.
.PP
It returns 2 if it fails to parse its options (missing arguments, invalid value, etc).
.SH AUTHOR
Glances is written by Nicolas Hennion aka Nicolargo (contact@nicolargo.com)

109
docs/stylesheet.css Normal file
View File

@ -0,0 +1,109 @@
/*
:Author: Alessio Sergi
:Contact: al3hex at gmail dot com
Stylesheet for use with Docutils.
This file is the CSS for the Glances documentation.
*/
body {
margin-top: 1em;
margin-left: 1em;
max-width: 80em;
font-family: serif;
font-size: 16px;
}
h1 {
font-size: 20px;
}
h1.title {
font-size: 22px;
}
h2, h3, p.topic-title {
font-size: 18px;
}
.first {
/* override p.topic-title margin styles */
margin-top: 0 ! important;
}
a {
color: #0055df;
text-decoration: none;
}
a:hover {
color: #339999;
text-decoration: underline;
}
a:visited {
color: #800080;
}
a.toc-backref {
text-decoration: none;
color: black;
}
blockquote {
padding-left: 1ex;
border-left: 1px solid #008000;
max-width: 30em;
}
p.topic-title {
font-weight: bold;
}
pre.code {
margin-left: 2em;
margin-right: 2em;
}
.console {
background-color: #eeeeee;
border: 1px solid #cccccc;
max-width: 60em;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px 3px 3px 3px;
}
span.option, tt.docutils {
white-space: nowrap;
border: 1px dotted #008000;
padding: 1px;
background-color: #eeeeee;
}
.literal, .literal-block, .option, .var {
font-family: monospace;
font-size: 10pt;
}
dl.docutils {
margin-left: 2em;
}
dl.docutils dd {
margin-bottom: 0.5em;
}
ol.simple {
margin-left: 0.5em;
}
table.docutils {
margin-left: 2em;
}
td.option-group {
padding-right: 1em;
}

View File

@ -12,8 +12,7 @@ LANG_LIST='es fr it pt_BR'
xgettext --language=Python --keyword=_ --output=./i18n/glances.pot ./glances/glances.py
for i in `echo $LANG_LIST`
do
for i in $LANG_LIST; do
echo "Generate language pack for: $i"
msgmerge --update --no-fuzzy-matching --backup=off ./i18n/$i/LC_MESSAGES/glances.po ./i18n/glances.pot
msgfmt ./i18n/$i/LC_MESSAGES/glances.po --output-file ./i18n/$i/LC_MESSAGES/glances.mo

View File

@ -1,155 +0,0 @@
.TH glances 1 "January, 2013" "version 1.6.1" "USER COMMANDS"
.SH NAME
glances \- CLI curses based monitoring tool
.SH SYNOPSIS
.B glances
[\-bdehmnsvz] [\-C conffile] [\-t refresh] [\-B bind] [\-c server] [\-p port] [\-P password] [\-o output] [\-f file]
.SH DESCRIPTION
Glances is a free (LGPL) curses-based monitoring tool which aims to present a maximum of information
in a minimum of space, ideally to fit in a classical 80x24 terminal or higher to have additionnal information.
Glances can adapt dynamicaly the displayed information depending on the terminal size.
It can also work in a client/server mode (for remote monitoring).
.PP
This tool is written in Python and uses PsUtil to fetch the statistical values from key elements.
.PP
The command line options are the following:
.PP
-b Display network rate in Byte per second
.PP
-B @IP|host Bind server to the given IP or host NAME
.PP
-c @IP|host Connect to a Glances server
.PP
-C file Path to the configuration file
.PP
-d Disable disk I/O module
.PP
-e Enable the sensors module (Linux-only)
.PP
-f file Set the output folder (HTML) or file (CSV)
.PP
-h Display the syntax and exit
.PP
-m Disable mount module
.PP
-n Disable network module
.PP
-o output Define additional output (available: HTML or CSV)
.PP
-p PORT Define the client or server TCP port (default: 61209)
.PP
-P password Client/server password
.PP
-r Do not list processes (significant CPU use reduction)
.PP
-s Run Glances in server mode
.PP
-t sec Set the refresh time in seconds (default: 3)
.PP
-v Display the version and exit
.PP
-y Enable the hddtemp module (requires running hddtemp daemon)
.PP
-z Do not use the bold color attribute
.PP
When Glances is running, you can use the following keys:
.PP
'a' Automatic mode. The process list is sorted automatically
.PP
'b' Switch between bit/s or Byte/s for network IO
.PP
'c' Sort processes by CPU%
.PP
'd' Show/hide disk IO stats
.PP
'f' Show/hide file system stats
.PP
'h' Show/hide the help message
.PP
'i' Sort processes by IO rate
.PP
'l' Show/hide log messages
.PP
'm' Sort processes by MEM%
.PP
'n' Show/hide network stats
.PP
'p' Sort processes by name
.PP
's' Show/hide sensors stats (Linux-only)
.PP
'w' Delete finished warning logs messages
.PP
'x' Delete finished warning and critical logs
.PP
'q' Quit
.PP
'1' Switch between global CPU and per core stats
.PP
The current version grab the following stats: CPU, Load, Memory, Network rate, Disk IO, file system,
process number and details.
.SH OPTIONS
.TP
.TP
\-b
Display network rate in Byte per second
.TP
\-B bind
Bind server to the given IP or host NAME
.TP
\-c server
Connect to a Glances server (IP address or hostname)
.TP
\-C conffile
Use a configuration file (default: {/usr/local,}/etc/glances/glances.conf)
.TP
\-d
Disable disk I/O module
.TP
\-e
Enable the sensors module (Linux-only)
.TP
\-f file
Set the output folder (HTML) or file (CSV)
.TP
\-h
Display the syntax and exit
.TP
\-m
Disable mount module
.TP
\-n
Disable network module
.TP
\-o output
Define additional output (available: HTML or CSV)
.TP
\-p port
Define the client or server TCP port (default: 61209)
.TP
\-P password
Define the client or server password (default: no password)
.TP
\-s
Run Glances in server mode
.TP
\-t sec
Set the refresh time in seconds (default: 3)
.TP
\-v
Display the version and exit
.TP
\-z
Do not use the bold color attribute
.SH EXAMPLES
.TP
Refresh information every 5 seconds:
.B glances
\-t 5
.PP
.SH EXIT STATUS
Glances returns a zero exit status if it succeeds to print/grab information.
.PP
It returns 2 if it fails to parse its options (missing arguments, invalid value, etc).
.SH AUTHOR
Glances is written by Nicolas Hennion aka Nicolargo (contact@nicolargo.com).

View File

@ -7,16 +7,14 @@ import glob
from setuptools import setup
data_files = [
('share/man/man1', ['man/glances.1']),
('share/doc/glances', ['AUTHORS',
'COPYING',
'NEWS',
'README',
('share/doc/glances', ['AUTHORS', 'COPYING', 'NEWS', 'README.rst',
'docs/glances-doc.html',
'glances/conf/glances.conf']),
('share/doc/glances/doc', glob.glob('doc/*.png')),
('share/doc/glances/images', glob.glob('docs/images/*.png')),
('share/glances/css', glob.glob('glances/data/css/*.css')),
('share/glances/html', glob.glob('glances/data/html/*.html')),
('share/glances/img', glob.glob('glances/data/img/*.png')),
('share/man/man1', ['docs/man/glances.1'])
]
if hasattr(sys, 'real_prefix') or ('bsd' or 'darwin' in sys.platform):
@ -31,22 +29,37 @@ for mo in glob.glob('i18n/*/LC_MESSAGES/*.mo'):
setup(
name='Glances',
version='1.7a',
download_url='https://s3.amazonaws.com/glances/glances-1.7a.tar.gz',
url='https://github.com/nicolargo/glances',
description='CLI curses-based monitoring tool',
description="A cross-platform curses-based monitoring tool",
long_description=open('README.rst').read(),
author='Nicolas Hennion',
author_email='nicolas@nicolargo.com',
url='https://github.com/nicolargo/glances',
download_url='https://s3.amazonaws.com/glances/glances-1.7a.tar.gz',
license="LGPL",
keywords="cli curses monitoring system",
long_description=open('README').read(),
test_suite="glances.tests",
install_requires=['psutil>=0.4.1'],
packages=['glances'],
extras_require={
'HTML': ['jinja2>=2.0'],
'SENSORS': ['pysensors>=0.0.2'],
'SENSORS': ['pysensors>=0.0.2']
},
packages=['glances'],
include_package_data=True,
data_files=data_files,
test_suite="glances.tests",
entry_points={"console_scripts": ["glances=glances.glances:main"]},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console :: Curses',
'Intended Audience :: Developers',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3'
]
)