mirror of https://github.com/nicolargo/glances
Merge branch 'issue967' into develop
commit
3799de31c5
|
@ -78,6 +78,10 @@ Command-Line Options
|
||||||
|
|
||||||
disable network module
|
disable network module
|
||||||
|
|
||||||
|
.. option:: --disable-now
|
||||||
|
|
||||||
|
disable current time module
|
||||||
|
|
||||||
.. option:: --disable-ports
|
.. option:: --disable-ports
|
||||||
|
|
||||||
disable Ports module
|
disable Ports module
|
||||||
|
@ -393,6 +397,9 @@ The following commands (key pressed) are supported while in Glances:
|
||||||
``n``
|
``n``
|
||||||
Show/hide network stats
|
Show/hide network stats
|
||||||
|
|
||||||
|
``N``
|
||||||
|
Show/hide current time
|
||||||
|
|
||||||
``p``
|
``p``
|
||||||
Sort processes by name
|
Sort processes by name
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.\" Man page generated from reStructuredText.
|
.\" Man page generated from reStructuredText.
|
||||||
.
|
.
|
||||||
.TH "GLANCES" "1" "Dec 29, 2016" "2.8_DEVELOP" "Glances"
|
.TH "GLANCES" "1" "Dec 31, 2016" "2.8_DEVELOP" "Glances"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
glances \- An eye on your system
|
glances \- An eye on your system
|
||||||
.
|
.
|
||||||
|
@ -138,6 +138,11 @@ disable network module
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
|
.B \-\-disable\-now
|
||||||
|
disable current time module
|
||||||
|
.UNINDENT
|
||||||
|
.INDENT 0.0
|
||||||
|
.TP
|
||||||
.B \-\-disable\-ports
|
.B \-\-disable\-ports
|
||||||
disable Ports module
|
disable Ports module
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
|
@ -513,6 +518,9 @@ Reset processes summary min/max
|
||||||
.B \fBn\fP
|
.B \fBn\fP
|
||||||
Show/hide network stats
|
Show/hide network stats
|
||||||
.TP
|
.TP
|
||||||
|
.B \fBN\fP
|
||||||
|
Show/hide current time
|
||||||
|
.TP
|
||||||
.B \fBp\fP
|
.B \fBp\fP
|
||||||
Sort processes by name
|
Sort processes by name
|
||||||
.TP
|
.TP
|
||||||
|
|
|
@ -127,6 +127,8 @@ Start the client browser (browser mode):\n\
|
||||||
dest='disable_memswap', help='disable memory swap module')
|
dest='disable_memswap', help='disable memory swap module')
|
||||||
parser.add_argument('--disable-network', action='store_true', default=False,
|
parser.add_argument('--disable-network', action='store_true', default=False,
|
||||||
dest='disable_network', help='disable network module')
|
dest='disable_network', help='disable network module')
|
||||||
|
parser.add_argument('--disable-now', action='store_true', default=False,
|
||||||
|
dest='disable_now', help='disable current time module')
|
||||||
parser.add_argument('--disable-ports', action='store_true', default=False,
|
parser.add_argument('--disable-ports', action='store_true', default=False,
|
||||||
dest='disable_ports', help='disable ports scanner module')
|
dest='disable_ports', help='disable ports scanner module')
|
||||||
parser.add_argument('--disable-process', action='store_true', default=False,
|
parser.add_argument('--disable-process', action='store_true', default=False,
|
||||||
|
|
|
@ -52,8 +52,6 @@ class _GlancesCurses(object):
|
||||||
'1': {'switch': 'percpu'},
|
'1': {'switch': 'percpu'},
|
||||||
'2': {'switch': 'disable_left_sidebar'},
|
'2': {'switch': 'disable_left_sidebar'},
|
||||||
'3': {'switch': 'disable_quicklook'},
|
'3': {'switch': 'disable_quicklook'},
|
||||||
'4': {'switch': 'full_quicklook'},
|
|
||||||
'5': {'switch': 'disable_top'},
|
|
||||||
'6': {'switch': 'meangpu'},
|
'6': {'switch': 'meangpu'},
|
||||||
'/': {'switch': 'process_short_name'},
|
'/': {'switch': 'process_short_name'},
|
||||||
'd': {'switch': 'disable_diskio'},
|
'd': {'switch': 'disable_diskio'},
|
||||||
|
@ -68,9 +66,9 @@ class _GlancesCurses(object):
|
||||||
'l': {'switch': 'disable_alert'},
|
'l': {'switch': 'disable_alert'},
|
||||||
'M': {'switch': 'reset_minmax_tag'},
|
'M': {'switch': 'reset_minmax_tag'},
|
||||||
'n': {'switch': 'disable_network'},
|
'n': {'switch': 'disable_network'},
|
||||||
|
'N': {'switch': 'disable_now'},
|
||||||
'P': {'switch': 'disable_ports'},
|
'P': {'switch': 'disable_ports'},
|
||||||
'Q': {'switch': 'enable_irq'},
|
'Q': {'switch': 'enable_irq'},
|
||||||
'r': {'switch': 'reset_history_tag'},
|
|
||||||
'R': {'switch': 'disable_raid'},
|
'R': {'switch': 'disable_raid'},
|
||||||
's': {'switch': 'disable_sensors'},
|
's': {'switch': 'disable_sensors'},
|
||||||
'T': {'switch': 'network_sum'},
|
'T': {'switch': 'network_sum'},
|
||||||
|
@ -352,11 +350,13 @@ class _GlancesCurses(object):
|
||||||
# 'ENTER' > Edit the process filter
|
# 'ENTER' > Edit the process filter
|
||||||
self.edit_filter = not self.edit_filter
|
self.edit_filter = not self.edit_filter
|
||||||
elif self.pressedkey == ord('4'):
|
elif self.pressedkey == ord('4'):
|
||||||
|
self.args.full_quicklook = not self.args.full_quicklook
|
||||||
if self.args.full_quicklook:
|
if self.args.full_quicklook:
|
||||||
self.enable_fullquicklook()
|
self.enable_fullquicklook()
|
||||||
else:
|
else:
|
||||||
self.disable_fullquicklook()
|
self.disable_fullquicklook()
|
||||||
elif self.pressedkey == ord('5'):
|
elif self.pressedkey == ord('5'):
|
||||||
|
self.args.disable_top = not self.args.disable_top
|
||||||
if self.args.disable_top:
|
if self.args.disable_top:
|
||||||
self.disable_top()
|
self.disable_top()
|
||||||
else:
|
else:
|
||||||
|
@ -378,6 +378,9 @@ class _GlancesCurses(object):
|
||||||
elif self.pressedkey == ord('g'):
|
elif self.pressedkey == ord('g'):
|
||||||
# 'g' > Generate graph from history
|
# 'g' > Generate graph from history
|
||||||
self.graph_tag = not self.graph_tag
|
self.graph_tag = not self.graph_tag
|
||||||
|
elif self.pressedkey == ord('r'):
|
||||||
|
# 'r' > Reset graph history
|
||||||
|
self.reset_history_tag = not self.reset_history_tag
|
||||||
elif self.pressedkey == ord('w'):
|
elif self.pressedkey == ord('w'):
|
||||||
# 'w' > Delete finished warning logs
|
# 'w' > Delete finished warning logs
|
||||||
glances_logs.clean()
|
glances_logs.clean()
|
||||||
|
@ -650,7 +653,7 @@ class _GlancesCurses(object):
|
||||||
# Dict for plugins width
|
# Dict for plugins width
|
||||||
plugin_widths = {'quicklook': 0}
|
plugin_widths = {'quicklook': 0}
|
||||||
for p in ['cpu', 'gpu', 'mem', 'memswap', 'load']:
|
for p in ['cpu', 'gpu', 'mem', 'memswap', 'load']:
|
||||||
plugin_widths[p] = self.get_stats_display_width(stat_display[p]) if hasattr(self.args, 'disable_' + p) else 0
|
plugin_widths[p] = self.get_stats_display_width(stat_display[p]) if hasattr(self.args, 'disable_' + p) and p in stat_display else 0
|
||||||
|
|
||||||
# Width of all plugins
|
# Width of all plugins
|
||||||
stats_width = sum(itervalues(plugin_widths))
|
stats_width = sum(itervalues(plugin_widths))
|
||||||
|
@ -700,7 +703,9 @@ class _GlancesCurses(object):
|
||||||
|
|
||||||
# Display CPU, MEM, SWAP and LOAD
|
# Display CPU, MEM, SWAP and LOAD
|
||||||
for p in ['cpu', 'gpu', 'mem', 'memswap', 'load']:
|
for p in ['cpu', 'gpu', 'mem', 'memswap', 'load']:
|
||||||
self.display_plugin(stat_display[p], display_optional=plugin_display_optional[p])
|
if p in stat_display:
|
||||||
|
self.display_plugin(stat_display[p],
|
||||||
|
display_optional=plugin_display_optional[p])
|
||||||
if p is not 'load':
|
if p is not 'load':
|
||||||
# Skip last column
|
# Skip last column
|
||||||
self.new_column()
|
self.new_column()
|
||||||
|
@ -717,27 +722,12 @@ class _GlancesCurses(object):
|
||||||
network+wifi+ports+diskio+fs+irq+folders+raid+sensors+now
|
network+wifi+ports+diskio+fs+irq+folders+raid+sensors+now
|
||||||
"""
|
"""
|
||||||
self.init_column()
|
self.init_column()
|
||||||
if not (self.args.disable_network and
|
if not self.args.disable_left_sidebar:
|
||||||
self.args.disable_wifi and
|
for s in ['network', 'wifi', 'ports', 'diskio', 'fs', 'irq',
|
||||||
self.args.disable_ports and
|
'folders', 'raid', 'sensors', 'now']:
|
||||||
self.args.disable_diskio and
|
if hasattr(self.args, 'disable_' + s) and s in stat_display:
|
||||||
self.args.disable_fs and
|
self.new_line()
|
||||||
self.args.enable_irq and
|
self.display_plugin(stat_display[s])
|
||||||
self.args.disable_folders and
|
|
||||||
self.args.disable_raid and
|
|
||||||
self.args.disable_sensors) and not self.args.disable_left_sidebar:
|
|
||||||
for s in (stat_display["network"],
|
|
||||||
stat_display["wifi"],
|
|
||||||
stat_display["ports"],
|
|
||||||
stat_display["diskio"],
|
|
||||||
stat_display["fs"],
|
|
||||||
stat_display["irq"],
|
|
||||||
stat_display["folders"],
|
|
||||||
stat_display["raid"],
|
|
||||||
stat_display["sensors"],
|
|
||||||
stat_display["now"]):
|
|
||||||
self.new_line()
|
|
||||||
self.display_plugin(s)
|
|
||||||
|
|
||||||
def __display_right(self, stat_display):
|
def __display_right(self, stat_display):
|
||||||
"""Display the right sidebar in the Curses interface.
|
"""Display the right sidebar in the Curses interface.
|
||||||
|
|
Loading…
Reference in New Issue