From 09ec93a9d96ca3e7a471423b326c5dbfeccd5780 Mon Sep 17 00:00:00 2001 From: Nicolas Hennion Date: Mon, 7 Jul 2014 15:54:26 +0200 Subject: Add methods to the Restfull/API --- docs/glances-doc.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'docs/glances-doc.rst') diff --git a/docs/glances-doc.rst b/docs/glances-doc.rst index c41e49d0..f6dfa97b 100644 --- a/docs/glances-doc.rst +++ b/docs/glances-doc.rst @@ -592,13 +592,15 @@ CSV files have two lines per stats: - Stats description - Stats (comma separated) -API Documentation -================= +APIs Documentations +=================== + +Glances includes a `XML-RPC server`_ and a `RESTFULL-JSON`_ API which and can be used by another client software. -Glances uses a `XML-RPC server`_ and can be used by another client software. +APIs documentations are available at: -API documentation is available at -https://github.com/nicolargo/glances/wiki/The-Glances-2.x-API-How-to. +- XML-RPC: https://github.com/nicolargo/glances/wiki/The-Glances-2.x-API-How-to +- RESTFULL-JSON: https://github.com/nicolargo/glances/wiki/The-Glances-RESTFULL-JSON-API Support ======= @@ -614,3 +616,4 @@ Feel free to contribute! .. _psutil: https://code.google.com/p/psutil/ .. _XML-RPC server: http://docs.python.org/2/library/simplexmlrpcserver.html +.. _RESTFULL-JSON: http://jsonapi.org/ \ No newline at end of file -- cgit v1.2.3 From 42448da1e761aeb56e4f68ddb4498d74221a9870 Mon Sep 17 00:00:00 2001 From: Nicolargo Date: Sat, 30 Aug 2014 10:48:05 +0200 Subject: Also add the / shortcut to toogle between short/command line (issue #407) --- docs/glances-doc.rst | 91 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 36 deletions(-) (limited to 'docs/glances-doc.rst') diff --git a/docs/glances-doc.rst b/docs/glances-doc.rst index f6dfa97b..04dae28f 100644 --- a/docs/glances-doc.rst +++ b/docs/glances-doc.rst @@ -123,42 +123,53 @@ Command Reference Command-Line Options -------------------- --h, --help show this help message and exit --V, --version show program's version number and exit --b, --byte display network rate in byte per second --B BIND_ADDRESS, --bind BIND_ADDRESS - bind server to the given IPv4/IPv6 address or hostname --c CLIENT, --client CLIENT - connect to a Glances server by IPv4/IPv6 address or - hostname --C CONF_FILE, --config CONF_FILE - path to the configuration file ---disable-bold disable bold mode in the terminal ---disable-diskio disable disk I/O module ---disable-fs disable file system module ---disable-network disable network module ---disable-sensors disable sensors module ---disable-process disable process module ---disable-log disable log module ---output-csv OUTPUT_CSV - export stats to a CSV file --p PORT, --port PORT define the client/server TCP port [default: 61209] ---password define a client/server password from the prompt or - file --s, --server run Glances in server mode ---snmp-community SNMP_COMMUNITY - SNMP community ---snmp-port SNMP_PORT - SNMP port ---snmp-version SNMP_VERSION - SNMP version (1, 2c or 3) ---snmp-user SNMP_USER - SNMP username (only for SNMPv3) ---snmp-auth SNMP_AUTH - SNMP authentication key (only for SNMPv3) --t TIME, --time TIME set refresh time in seconds [default: 3 sec] --w, --webserver run Glances in Web server mode --1, --percpu start Glances in per CPU mode + -h, --help show this help message and exit + -V, --version show program's version number and exit + -d, --debug Enable debug mode + -C CONF_FILE, --config CONF_FILE + path to the configuration file + --enable-history enable the history mode + --disable-bold disable bold mode in the terminal + --disable-diskio disable disk I/O module + --disable-fs disable filesystem module + --disable-network disable network module + --disable-sensors disable sensors module + --disable-process disable process module + --disable-process-extended + disable extended stats on top process + --disable-log disable log module + --output-csv OUTPUT_CSV + export stats to a CSV file + -c CLIENT, --client CLIENT + connect to a Glances server by IPv4/IPv6 address or + hostname + -s, --server run Glances in server mode + -p PORT, --port PORT define the client/server TCP port [default: 61209] + -B BIND_ADDRESS, --bind BIND_ADDRESS + bind server to the given IPv4/IPv6 address or hostname + --password-badidea PASSWORD_ARG + define password from the command line + --password define a client/server password from the prompt or + file + --snmp-community SNMP_COMMUNITY + SNMP community + --snmp-port SNMP_PORT + SNMP port + --snmp-version SNMP_VERSION + SNMP version (1, 2c or 3) + --snmp-user SNMP_USER + SNMP username (only for SNMPv3) + --snmp-auth SNMP_AUTH + SNMP authentication key (only for SNMPv3) + --snmp-force force SNMP mode + -t TIME, --time TIME set refresh time in seconds [default: 3 sec] + -w, --webserver run Glances in web server mode + -f PROCESS_FILTER, --process-filter PROCESS_FILTER + set the process filter patern (regular expression) + --process-short-name force short name for processes name + -b, --byte display network rate in byte per second + -1, --percpu start Glances in per CPU mode + --theme-white optimize display for white background Interactive Commands -------------------- @@ -177,8 +188,12 @@ The following commands (key pressed) are supported while in Glances: Sort processes by CPU usage ``d`` Show/hide disk I/O stats +``e`` + Enable/disable top extended stats ``f`` Show/hide file system stats +``f`` + Generate hraphs for current history ``h`` Show/hide the help screen ``i`` @@ -193,6 +208,8 @@ The following commands (key pressed) are supported while in Glances: Sort processes by name ``q`` Quit +``r`` + Reset history ``s`` Show/hide sensors stats ``t`` @@ -207,6 +224,8 @@ The following commands (key pressed) are supported while in Glances: Show/hide processes stats ``1`` Switch between global CPU and per-CPU stats +``/`` + Switch between short name / command line (processes name) Configuration ============= -- cgit v1.2.3 From adb13fef32548ec8b87367e8383b8766cc3b3126 Mon Sep 17 00:00:00 2001 From: Nicolargo Date: Thu, 4 Sep 2014 21:52:25 +0200 Subject: Update user documentation for Glances 2.1 --- docs/glances-doc.rst | 51 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 16 deletions(-) (limited to 'docs/glances-doc.rst') diff --git a/docs/glances-doc.rst b/docs/glances-doc.rst index 04dae28f..1ede82a0 100644 --- a/docs/glances-doc.rst +++ b/docs/glances-doc.rst @@ -2,11 +2,11 @@ Glances ======= -This manual describes *Glances* version 2.0.1. +This manual describes *Glances* version 2.1. Copyright © 2012-2014 Nicolas Hennion -June 2014 +September 2014 .. contents:: Table of Contents @@ -75,7 +75,7 @@ In client mode, you can set the TCP port of the server ``-p PORT``. You can also set a password to access to the server ``--password``. Default binding address is ``0.0.0.0`` (Glances will listen on all the -network interfaces) and TCP port is ``61209``. +available network interfaces) and TCP port is ``61209``. In client/server mode, limits are set by the server side. @@ -89,14 +89,13 @@ client, the latter will try to grab stats using the ``SNMP`` protocol: client$ glances -c @snmpserver -Known issues: grab using SNMP is only validated for GNU/Linux with SNMP -v2/2c server. +Note: Stats grabbed by SNMP request are limited. Web Server Mode --------------- If you want to remotely monitor a machine, called ``server``, from any -device with a web browser, called ``client``, just run on the server: +device with a web browser, just run on the server: .. code-block:: console @@ -192,7 +191,7 @@ The following commands (key pressed) are supported while in Glances: Enable/disable top extended stats ``f`` Show/hide file system stats -``f`` +``g`` Generate hraphs for current history ``h`` Show/hide the help screen @@ -230,13 +229,11 @@ The following commands (key pressed) are supported while in Glances: Configuration ============= -**Caution! Glances version 1.x configuration files are not compatible -with the version 2.x.** - No configuration file is mandatory to use Glances. Furthermore a configuration file is needed to set up limits, disks or -network interfaces to hide and/or monitored processes list. +network interfaces to hide and/or monitored processes list or to define +alias. By default, the configuration file is under: @@ -255,6 +252,8 @@ Since Windows Vista and newer versions: :: C:\Users\\AppData\Roaming + or + %userprofile%\AppData\Roaming You can override the default configuration, located in one of the above directories on your system, except for Windows. @@ -270,6 +269,18 @@ e.g., on Linux: On OS X, you should copy the configuration file to ``~/Library/Application Support/glances/``. +Logs and debug mode +=================== + +Glances logs all its internal messages to a log file. By default, only +INFO & WARNING & ERROR &CRITICAL levels are logged, but DEBUG messages +can ben logged using the -d option on the command line. + +By default, the configuration file is under: + +:Linux, \*BSD and OS X: ``/tmp/glances.conf`` +:Windows: ``%APPDATA%\Local\temp\glances.conf`` + Anatomy Of The Application ========================== @@ -390,7 +401,7 @@ Alerts are only set if the maximum speed per network interface is available *Note*: it is possibile to define a list of network interfaces to hide and per-interface limit values in the ``[network]`` section of the -configuration file. +configuration file and aliases for interface name. Disk I/O -------- @@ -402,7 +413,7 @@ Glances displays the disk I/O throughput. The unit is adapted dynamically. There is no alert on this information. *Note*: it is possible to define a list of disks to hide under the -``[diskio]`` section in the configuration file. +``[diskio]`` section in the configuration file and aliases for disk name. File System ----------- @@ -437,8 +448,8 @@ temperature only. There is no alert on this information. -*Note*: limit values can be overwritten in the configuration file under -the ``[sensors]`` section. +*Note*: limit values and sensors alias names can be defined in the configuration +file under the ``[sensors]`` section. Processes List -------------- @@ -499,7 +510,8 @@ The number of processes in the list is adapted to the screen size. ``IOW/s`` Per process I/O write rate (in Byte/s) ``COMMAND`` - Process command line (process name is highlighted) + Process command line + User cans switch to the process name by pressing on the ``/`` key Process status legend: @@ -514,6 +526,13 @@ Process status legend: ``Z`` Zombie +In standalone mode, additionals informations are provided for the top process: + +* CPU affinity (number of cores used by the process) +* Extended memory information (swap, shared, text, lib, data and dirty on Linux) +* Openned threads, files and network sessions (TCP and UDP) +* IO nice level + *Note*: limit values can be overwritten in the configuration file under the ``[process]`` section. -- cgit v1.2.3 From 2f847a9fae1dfcbe9cf372e7dadb05d7d57e7f10 Mon Sep 17 00:00:00 2001 From: Nicolargo Date: Sat, 13 Sep 2014 09:25:42 +0200 Subject: Update docs with forum URL --- docs/glances-doc.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'docs/glances-doc.rst') diff --git a/docs/glances-doc.rst b/docs/glances-doc.rst index 1ede82a0..2aa751ee 100644 --- a/docs/glances-doc.rst +++ b/docs/glances-doc.rst @@ -643,10 +643,12 @@ APIs documentations are available at: Support ======= +To post a question about Glances use case, please post it to the offical Q&A `forum`_. + To report a bug or a feature request use the bug tracking system at https://github.com/nicolargo/glances/issues. -Feel free to contribute! +Feel free to contribute ! .. [1] http://nosheep.net/story/defining-unix-load-average/ @@ -654,4 +656,5 @@ Feel free to contribute! .. _psutil: https://code.google.com/p/psutil/ .. _XML-RPC server: http://docs.python.org/2/library/simplexmlrpcserver.html -.. _RESTFULL-JSON: http://jsonapi.org/ \ No newline at end of file +.. _RESTFULL-JSON: http://jsonapi.org/ +.. _forum: https://groups.google.com/forum/?hl=en#!forum/glances-users \ No newline at end of file -- cgit v1.2.3 From 6e33121b61ed65a1eb1f96878b1c8ba4cf324a03 Mon Sep 17 00:00:00 2001 From: Nicolargo Date: Sat, 13 Sep 2014 15:29:07 +0200 Subject: Glances version 2.1 --- docs/glances-doc.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs/glances-doc.rst') diff --git a/docs/glances-doc.rst b/docs/glances-doc.rst index 2aa751ee..7f5f0b63 100644 --- a/docs/glances-doc.rst +++ b/docs/glances-doc.rst @@ -175,6 +175,12 @@ Interactive Commands The following commands (key pressed) are supported while in Glances: +``ENTER`` + Set the process filter + Filter is a regular expression pattern: + + - gnome: all processes starting with the gnome string + - .*gnome.*: all processes containing the gnome string ``a`` Sort process list automatically @@ -528,11 +534,15 @@ Process status legend: In standalone mode, additionals informations are provided for the top process: +.. image:: images/processlist-top.png + * CPU affinity (number of cores used by the process) * Extended memory information (swap, shared, text, lib, data and dirty on Linux) * Openned threads, files and network sessions (TCP and UDP) * IO nice level +The extended stats feature could be disabled using the --disable-process-extended option (command line) or the ``e`` key (curses interface). + *Note*: limit values can be overwritten in the configuration file under the ``[process]`` section. -- cgit v1.2.3