diff --git a/docs/aoa/sensors.rst b/docs/aoa/sensors.rst index 6f697dc4144e5ff60a26bd7946d4578b18cf1118..9aca0b5d966f73122bf6a5ed80e087b7ba391613 100644 --- a/docs/aoa/sensors.rst +++ b/docs/aoa/sensors.rst @@ -15,3 +15,6 @@ There is no alert on this information. .. note:: Limit values and sensors alias names can be defined in the configuration file under the ``[sensors]`` section. + +.. note:: + This plugin is disabled by default in the configuration file. diff --git a/docs/cmds.rst b/docs/cmds.rst index 3b85cc28fe5e2d21174dc8f271d381cb194eff30..a4c881797cf910d1767dbbfd63b099efb4010171 100644 --- a/docs/cmds.rst +++ b/docs/cmds.rst @@ -30,6 +30,10 @@ Command-Line Options disable PLUGIN (comma separed list) +.. option:: --enable-plugin PLUGIN + + enable PLUGIN (comma separed list) + .. option:: --stdout PLUGINS_STATS display stats to stdout (comma separated list of plugins/plugins.attribute) diff --git a/docs/config.rst b/docs/config.rst index 60edfbfe1ed15725d0daa1ea27dd11972e9465ab..875a2b351d943c1d4c379600bbabda151796018c 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -48,7 +48,7 @@ have a section. Below an example for the CPU plugin: .. code-block:: ini [cpu] - disable=false + disable=False user_careful=50 user_warning=70 user_critical=90 diff --git a/docs/man/glances.1 b/docs/man/glances.1 index 290f76daf85c9512ab49a0ef25f756fbd6f87679..6789fcc36743168c255b06cddbc2947cdbad24c2 100644 --- a/docs/man/glances.1 +++ b/docs/man/glances.1 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "GLANCES" "1" "Oct 07, 2019" "3.1.3_BETA" "Glances" +.TH "GLANCES" "1" "Oct 12, 2019" "3.1.3_BETA" "Glances" .SH NAME glances \- An eye on your system . @@ -78,6 +78,11 @@ disable PLUGIN (comma separed list) .UNINDENT .INDENT 0.0 .TP +.B \-\-enable\-plugin PLUGIN +enable PLUGIN (comma separed list) +.UNINDENT +.INDENT 0.0 +.TP .B \-\-stdout PLUGINS_STATS display stats to stdout (comma separated list of plugins/plugins.attribute) .UNINDENT @@ -389,6 +394,9 @@ Sort processes by I/O rate .B \fBI\fP Show/hide IP module .TP +.B \fBk\fP +Show/hide TCP connections +.TP .B \fBl\fP Show/hide log messages .TP @@ -569,7 +577,7 @@ have a section. Below an example for the CPU plugin: .nf .ft C [cpu] -disable=false +disable=False user_careful=50 user_warning=70 user_critical=90 diff --git a/glances/main.py b/glances/main.py index 18bc71ff27508ca309129e25ac7a42b817047db0..53ca7782094d24aecb60f7cd71b54bf8a7af8617 100644 --- a/glances/main.py +++ b/glances/main.py @@ -98,8 +98,11 @@ Examples of use: Display CSV stats to stdout (all stats in one line): $ glances --stdout-csv now,cpu.user,mem.used,load - Disable some plugins (any modes): + Disable some plugins (comma separated list): $ glances --disable-plugin network,ports + + Enable some plugins (comma separated list): + $ glances --enable-plugin sensors """ def __init__(self): @@ -126,8 +129,10 @@ Examples of use: action='store_true', default=False, dest='modules_list', help='display modules (plugins & exports) list and exit') - parser.add_argument('--disable-plugin', dest='disable_plugin', + parser.add_argument('--disable-plugin', '--disable-plugins', dest='disable_plugin', help='disable plugin (comma separed list)') + parser.add_argument('--enable-plugin', '--enable-plugins', dest='enable_plugin', + help='enable plugin (comma separed list)') parser.add_argument('--disable-process', action='store_true', default=False, dest='disable_process', help='disable process module') # Enable or disable option @@ -277,6 +282,9 @@ Examples of use: if args.disable_plugin is not None: for p in args.disable_plugin.split(','): disable(args, p) + if args.enable_plugin is not None: + for p in args.enable_plugin.split(','): + enable(args, p) # Exporters activation if args.export is not None: