Update doc and rezise window control

This commit is contained in:
Nicolargo 2014-11-16 21:31:02 +01:00
parent af62415923
commit 290d8a1d32
3 changed files with 46 additions and 18 deletions

View File

@ -1,7 +1,5 @@
Follow Glances on Twitter: `@nicolargo`_ or `@glances_system`_
Give Glances some Bitcoin: `18Nbs6kg9UCqtX4RPDM3qMkeKwjDxBFYrW`_
===============================
Glances - An eye on your system
===============================
@ -39,6 +37,7 @@ Optional dependencies:
- ``hddtemp`` (for HDD temperature monitoring support) [Linux-only]
- ``batinfo`` (for battery monitoring support) [Linux-only]
- ``pysnmp`` (for SNMP support)
- ``zeroconf`` and ``netifaces`` (for the autodiscovered support)
Installation
============
@ -46,7 +45,7 @@ Installation
Glances Auto Install script
---------------------------
Just enter the following command line:
To install both dependacies and latest Glances version, just enter the following command line:
.. code-block:: console
@ -193,6 +192,13 @@ on the server side and run:
on the client one.
You can also detect and display all the Glances servers available on your network:
.. code-block:: console
$ glances --autodiscover
And RTFM, always.
Documentation
@ -216,7 +222,6 @@ LGPL. See ``COPYING`` for more details.
.. _glancesautoinstall: https://github.com/nicolargo/glancesautoinstall
.. _@nicolargo: https://twitter.com/nicolargo
.. _@glances_system: https://twitter.com/glances_system
.. _18Nbs6kg9UCqtX4RPDM3qMkeKwjDxBFYrW: bitcoin:18Nbs6kg9UCqtX4RPDM3qMkeKwjDxBFYrW?amount=1X8&label=Glances
.. _PyPI: https://pypi.python.org/pypi
.. _pip: http://www.pip-installer.org/
.. _Homebrew: http://brew.sh/

View File

@ -67,6 +67,12 @@ and on the client:
where ``@server`` is the IP address or hostname of the server.
Glances can detect and display all Glances servers available on you network using the Zeroconf protocol:
.. code-block:: console
client$ glances --autodiscover
In server mode, you can set the bind address ``-B ADDRESS`` and listening
TCP port ``-p PORT``.
@ -141,6 +147,7 @@ Command-Line Options
enable extended stats on top process
--output-csv OUTPUT_CSV
export stats to a CSV file
--autodiscover run the Glances client browser (list of Glances server)
-c CLIENT, --client CLIENT
connect to a Glances server by IPv4/IPv6 address or
hostname
@ -152,6 +159,8 @@ Command-Line Options
define password from the command line
--password define a client/server password from the prompt or
file
--disable-autodiscover
Hide Glances server from the auto discover feature
--snmp-community SNMP_COMMUNITY
SNMP community
--snmp-port SNMP_PORT
@ -216,8 +225,8 @@ The following commands (key pressed) are supported while in Glances:
Show/hide network stats
``p``
Sort processes by name
``q``
Quit
``q`` or ``ESC``
Quit the current Glances session
``r``
Reset history
``s``
@ -239,6 +248,17 @@ The following commands (key pressed) are supported while in Glances:
``/``
Switch between short name / command line (processes name)
In the Glances client browser (accessible through the --autodiscover command line argument):
``ENTER``
Run Glances client to the selected server
``UP``
Up in the servers list
``DOWN``
Down in the servers list
``q`` or ``ESC``
Quit Glances
Configuration
=============

View File

@ -967,6 +967,7 @@ class GlancesCursesBrowser(_GlancesCurses):
['cpu_percent', _('CPU%'), 5],
['mem_percent', _('MEM%'), 5],
['ip', _('IP'), 15],
['port', _('PORT'), 5],
['hr_name', _('OS'), 16],
]
y = 2
@ -975,6 +976,7 @@ class GlancesCursesBrowser(_GlancesCurses):
cpt = 0
xc = x + 2
for c in column_def:
if xc < screen_x and y < screen_y:
self.term_window.addnstr(y, xc,
c[1],
screen_x - x,
@ -1011,15 +1013,16 @@ class GlancesCursesBrowser(_GlancesCurses):
# Display cursor
self.term_window.addnstr(y, xc,
">",
screen_x - x,
screen_x - xc,
self.colors_list['BOLD'])
xc += 2
for c in column_def:
if xc < screen_x and y < screen_y:
# Display server stats
self.term_window.addnstr(y, xc,
"%s" % server_stat[c[0]],
screen_x - x,
screen_x - xc,
self.colors_list['DEFAULT'])
xc += c[2] + self.space_between_column
cpt += 1