From 0417762d9620fc31ceb15705117c2506c0319cfb Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sun, 23 May 2021 19:17:14 +0200 Subject: [PATCH] Update documentation --- docs/config.rst | 5 +++-- docs/man/glances.1 | 14 +++++++++++--- glances/main.py | 10 ++++++---- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/docs/config.rst b/docs/config.rst index 56accc1e..c806ec9c 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -39,10 +39,10 @@ A first section (called global) is available: .. code-block:: ini [global] - # Refresh rate (default is a minimum of 3 seconds) + # Refresh rate (default is a minimum of 2 seconds) # Can be overwrite by the -t option # It is also possible to overwrite it in each plugin sections - refresh=3 + refresh=2 # Does Glances should check if a newer version is available on PyPI ? check_update=false # History size (maximum number of values) @@ -56,6 +56,7 @@ have a section. Below an example for the CPU plugin: [cpu] disable=False + refresh=3 user_careful=50 user_warning=70 user_critical=90 diff --git a/docs/man/glances.1 b/docs/man/glances.1 index 71b4e94d..eb73ad55 100644 --- a/docs/man/glances.1 +++ b/docs/man/glances.1 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "GLANCES" "1" "May 06, 2021" "3.1.8b1" "Glances" +.TH "GLANCES" "1" "May 23, 2021" "3.1.8b3" "Glances" .SH NAME glances \- An eye on your system . @@ -565,8 +565,15 @@ A first section (called global) is available: .nf .ft C [global] -# Does Glances should check if a newer version is available on PyPI? -check_update=true +# Refresh rate (default is a minimum of 2 seconds) +# Can be overwrite by the \-t option +# It is also possible to overwrite it in each plugin sections +refresh=2 +# Does Glances should check if a newer version is available on PyPI ? +check_update=false +# History size (maximum number of values) +# Default is 28800: 1 day with 1 point every 3 seconds +history_size=28800 .ft P .fi .UNINDENT @@ -581,6 +588,7 @@ have a section. Below an example for the CPU plugin: .ft C [cpu] disable=False +refresh=3 user_careful=50 user_warning=70 user_critical=90 diff --git a/glances/main.py b/glances/main.py index 77c9471f..88b27038 100644 --- a/glances/main.py +++ b/glances/main.py @@ -2,7 +2,7 @@ # # This file is part of Glances. # -# Copyright (C) 2019 Nicolargo +# Copyright (C) 2021 Nicolargo # # Glances is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by @@ -67,7 +67,7 @@ Examples of use: Monitor local machine and export stats to a CSV file (standalone mode): $ glances --export csv --export-csv-file /tmp/glances.csv - Monitor local machine and export stats to a InfluxDB server with 5s refresh time (standalone mode): + Monitor local machine and export stats to a InfluxDB server with 5s refresh rate (standalone mode): $ glances -t 5 --export influxdb Start a Glances XML-RPC server (server mode): @@ -206,11 +206,13 @@ Examples of use: parser.add_argument('--snmp-force', action='store_true', default=False, dest='snmp_force', help='force SNMP mode') parser.add_argument('-t', '--time', default=self.DEFAULT_REFRESH_TIME, type=float, - dest='time', help='set refresh time in seconds [default: {} sec]'.format(self.DEFAULT_REFRESH_TIME)) + dest='time', help='set minumum refresh rate in seconds [default: {} sec]'.format( + self.DEFAULT_REFRESH_TIME)) parser.add_argument('-w', '--webserver', action='store_true', default=False, dest='webserver', help='run Glances in web server mode (bottle needed)') parser.add_argument('--cached-time', default=self.cached_time, type=int, - dest='cached_time', help='set the server cache time [default: {} sec]'.format(self.cached_time)) + dest='cached_time', help='set the server cache time [default: {} sec]'.format( + self.cached_time)) parser.add_argument('--open-web-browser', action='store_true', default=False, dest='open_web_browser', help='try to open the Web UI in the default Web browser') # Display options