提交 42448da1 编写于 作者: N Nicolargo

Also add the / shortcut to toogle between short/command line (issue #407)

上级 9ba1394c
......@@ -12,6 +12,7 @@ Version 2.1
Process filter feature is only available in standalone mode.
* Add extended processes informations for top process
Top process stats availables: CPU affinity, extended memory information (shared, text, lib, datat, dirty, swap), openned threads/files and TCP/UDP network sessions, IO nice level
* Add --process-short-name tag and '/' key to switch between short/command line
* Create a max_processes key in the configuration file
The goal is to reduce the number of displayed processes in the curses UI and
so limit the CPU footprint of the Glances standalone mode.
......
......@@ -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
=============
......
......@@ -20,7 +20,7 @@
"""Init the Glances software."""
__appname__ = 'glances'
__version__ = '2.1_RC6'
__version__ = '2.1_RC7'
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
__license__ = 'LGPL'
......
......@@ -219,6 +219,9 @@ class GlancesCurses(object):
elif self.pressedkey == ord('1'):
# '1' > Switch between CPU and PerCPU information
self.args.percpu = not self.args.percpu
elif self.pressedkey == ord('/'):
# '/' > Switch between short/long name for processes
self.args.process_short_name = not self.args.process_short_name
elif self.pressedkey == ord('a'):
# 'a' > Sort processes automatically
self.args.process_sorted_by = 'auto'
......
......@@ -128,6 +128,9 @@ class Plugin(GlancesPlugin):
ret.append(self.curse_add_line(msg))
msg = msg_col2.format("q", _("Quit (Esc and Ctrl-C also work)"))
ret.append(self.curse_add_line(msg))
ret.append(self.curse_new_line())
msg = msg_col.format("/", _("Enable/disable short processes name"))
ret.append(self.curse_add_line(msg))
ret.append(self.curse_new_line())
ret.append(self.curse_new_line())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册