From 4046fbb18cf16be684ada228314c1f328779a3c1 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Mon, 3 Oct 2022 21:53:24 +0800 Subject: [PATCH] Fix typos Found via `codespell -S ./venv,./glances/outputs,*.svg -L hart,bu,te,statics` --- .ci/appveyor/download_exes.py | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- NEWS.rst | 46 ++++++++++++------------- README.rst | 4 +-- conf/glances.conf | 16 ++++----- docker-compose/glances.conf | 14 ++++---- docs/aoa/actions.rst | 2 +- docs/aoa/diskio.rst | 2 +- docs/aoa/docker.rst | 6 ++-- docs/aoa/ports.rst | 2 +- docs/aoa/quicklook.rst | 2 +- docs/api.rst | 18 +++++----- docs/gw/graph.rst | 2 +- docs/gw/influxdb.rst | 4 +-- docs/gw/mqtt.rst | 2 +- docs/quickstart.rst | 4 +-- glances/__init__.py | 2 +- glances/amps_list.py | 2 +- glances/autodiscover.py | 2 +- glances/compat.py | 2 +- glances/filter.py | 4 +-- glances/main.py | 6 ++-- glances/outputs/glances_stdout_issue.py | 4 +-- glances/plugins/glances_cloud.py | 2 +- glances/plugins/glances_docker.py | 18 ++++++---- glances/plugins/glances_load.py | 2 +- glances/plugins/glances_plugin.py | 10 ++++-- glances/plugins/glances_processcount.py | 2 +- glances/plugins/glances_processlist.py | 2 +- glances/processes.py | 9 ++--- glances/secure.py | 2 +- glances/stats.py | 2 +- glances/stats_client_snmp.py | 2 +- setup.py | 2 +- snap/local/launchers/glances-launch | 2 +- unitest.py | 4 +-- 36 files changed, 108 insertions(+), 101 deletions(-) diff --git a/.ci/appveyor/download_exes.py b/.ci/appveyor/download_exes.py index cb8cb0b2..2e8973c1 100644 --- a/.ci/appveyor/download_exes.py +++ b/.ci/appveyor/download_exes.py @@ -7,7 +7,7 @@ """ Script which downloads exe and wheel files hosted on AppVeyor: https://ci.appveyor.com/project/giampaolo/psutil -Copied and readapted from the original recipe of Ibarra Corretge' +Copied and re-adapted from the original recipe of Ibarra Corretge' : http://code.saghul.net/index.php/2015/09/09/ """ diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 4f79ea23..e602208c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -12,7 +12,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: -1. Start Glances with the followings options '...' +1. Start Glances with the following options '...' 2. Press the key '....' 3. See error diff --git a/NEWS.rst b/NEWS.rst index d7caa6b8..5d0f34db 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -18,8 +18,8 @@ Enhancements: * Keybind(s) for modifying nice level #2081 * [WEBUI] Reorganize help screen #2037 * Add a Json stdout option #2060 - * Improve error message when export error occures - * Improve error message when MQTT error occures + * Improve error message when export error occurs + * Improve error message when MQTT error occurs * Change the way core are displayed * Remove unused key in the process list * Refactor top menu of the curse interface @@ -126,7 +126,7 @@ Bugs corrected: * Failure to start on Apple M1 Max #1939 * Influxdb2 via SSL #1934 * Update WebUI (security patch). Thanks to @notFloran. - * Swith from black <> white theme with the '9' hotkey - Related to issue #976 + * Switch from black <> white theme with the '9' hotkey - Related to issue #976 * Fix: Docker plugin - Invalid IO stats with Arch Linux #1945 * Bug Fix: Docker plugin - Network stats not being displayed #1944 * Fix Grafana CPU temperature panel #1954 @@ -219,7 +219,7 @@ Enhancement and development requests: - Add caching for processing username and cmdline - Correct and improve refresh time method - Set refresh rate for global CPU percent - - Set the dafault refresh rate of system stats to 60 seconds + - Set the default refresh rate of system stats to 60 seconds - Default refresh time for sensors is refresh rate * 2 - Improve history perf - Change main curses loop @@ -301,7 +301,7 @@ Version 3.1.6.1 Bugs corrected: - * Glances crash after installing module for shown GPU informations on Windows 10 #1800 + * Glances crash after installing module for shown GPU information on Windows 10 #1800 Version 3.1.6 ============= @@ -359,7 +359,7 @@ Enhancements and new features: * Enhancement: RSS for containers enhancement #1694 * exports: support rabbitmq amqps enhancement #1687 * Quick Look missing CPU Infos enhancement #1685 - * Add amqps protocol suppport for rabbitmq export #1688 + * Add amqps protocol support for rabbitmq export #1688 * Select host in Grafana json #1684 * Value for free disk space is counterintuative on ext file systems enhancement #644 @@ -403,7 +403,7 @@ Bugs corrected: * Disk IO stats missing after upgrade to 5.5.x kernel #1601 * Glances don't want to run on Crostini (LXC Container, Debian 10, python 3.7.3) #1600 * Kafka key name needs to be bytes #1593 - * Cant start glances with glances --export mqtt #1581 + * Can't start glances with glances --export mqtt #1581 * [WEBUI] AMP plugins is not displayed correctly in the Web Interface #1574 * Unhandled AttributeError when no config files found #1569 * Glances writing lots of Docker Error message in logs file enhancement #1561 @@ -641,7 +641,7 @@ Graph: # generate_every to a non zero value corresponding to the seconds between # two generation. Set it to 0 to disable graph auto generation. generate_every=60 - # See followings configuration keys definitions in the Pygal lib documentation + # See following configuration keys definitions in the Pygal lib documentation # http://pygal.org/en/stable/documentation/index.html width=800 height=600 @@ -701,7 +701,7 @@ Bugs corrected: * glances_network `OSError: [Errno 19] No such device` (issue #1106) * GPU plugin. : ... not JSON serializable"> (issue #1112) * PermissionError on macOS (issue #1120) - * Cant move up or down in glances --browser (issue #1113) + * Can't move up or down in glances --browser (issue #1113) * Unable to give aliases to or hide network interfaces and disks (issue #1126) * `UnicodeDecodeError` on mountpoints with non-breaking spaces (issue #1128) @@ -758,7 +758,7 @@ Bugs corrected: * On Windows --export-statsd terminates immediately and does not export (issue #1067) * Glances v2.8.7 issues with Curses UI on Android (issue #1053) * Fails to start, OSError in sensors_temperatures (issue #1057) - * Crashs after long time running the glances --browser (issue #1059) + * Crashes after long time running the glances --browser (issue #1059) * Sensor values don't refresh since psutil backend (issue #1061) * glances-version.db Permission denied (issue #1066) @@ -857,7 +857,7 @@ Enhancements and new features: * Not compatible with the new Docker API 2.0 (Docker 1.13) (issue #1000) * Add ZeroMQ exporter (issue #939) * Add CouchDB exporter (issue #928) - * Add hotspot Wifi informations (issue #937) + * Add hotspot Wifi information (issue #937) * Add default interface speed and automatic rate thresolds (issue #718) * Highlight max stats in the processes list (issue #878) * Docker alerts and actions (issue #875) @@ -880,8 +880,8 @@ Version 2.7.1 Bugs corrected: - * AMP plugin crashs on start with Python 3 (issue #917) - * Ports plugin crashs on start with Python 3 (issue #918) + * AMP plugin crashes on start with Python 3 (issue #917) + * Ports plugin crashes on start with Python 3 (issue #918) Version 2.7 =========== @@ -902,7 +902,7 @@ Enhancements and new features: * Add a new "Ports scanner" plugin (issue #734) * Add a new IRQ monitoring plugin (issue #911) * Improve IP plugin to display public IP address (issue #646) - * CPU additionnal stats monitoring: Context switch, Interrupts... (issue #810) + * CPU additional stats monitoring: Context switch, Interrupts... (issue #810) * Filter processes by others stats (username) (issue #748) * [Folders] Differentiate permission issue and non-existence of a directory (issue #828) * [Web UI] Add cpu name in quicklook plugin (issue #825) @@ -1042,10 +1042,10 @@ Enhancements and new features: Bugs corrected: * The WebUI displays bad sensors stats (issue #632) - * Filter processes crashs with a bad regular expression pattern (issue #665) + * Filter processes crashes with a bad regular expression pattern (issue #665) * Error with IP plugin (issue #651) * Crach with Docker plugin (issue #649) - * Docker plugin crashs with webserver mode (issue #654) + * Docker plugin crashes with webserver mode (issue #654) * Infrequently crashing due to assert (issue #623) * Value for free disk space is counterintuative on ext file systems (issue #644) * Try/catch for unexpected psutil.NoSuchProcess: process no longer exists (issue #432) @@ -1125,7 +1125,7 @@ Enhancements and new features: * Add InfluxDB export module (--export-influxdb) (issue #455) * Add StatsD export module (--export-statsd) (issue #465) * Refactor export module (CSV export option is now --export-csv). It is now possible to export stats from the Glances client mode (issue #463) - * The Web inteface is now based on Bootstrap / RWD grid (issue #417, #366 and #461) Thanks to Nicolas Hart @nclsHart + * The Web interface is now based on Bootstrap / RWD grid (issue #417, #366 and #461) Thanks to Nicolas Hart @nclsHart * It is now possible, through the configuration file, to define if an alarm should be logged or not (using the _log option) (issue #437) * You can now set alarm for Disk IO * API: add getAllLimits and getAllViews methods (issue #481) and allow CORS request (issue #479) @@ -1181,7 +1181,7 @@ Version 2.1.1 Enhancement: - * Automaticaly compute top processes number for the current screen (issue #408) + * Automatically compute top processes number for the current screen (issue #408) * CPU and Memory footprint optimization (issue #401) Bugs corrected: @@ -1190,7 +1190,7 @@ Bugs corrected: * Process no longer exists (issue #421) * Error with Glances Client with Python 3.4.1 (issue #419) * TypeError: memory_maps() takes exactly 2 arguments (issue #413) - * No filesystem informations since Glances 2.0 bug enhancement (issue #381) + * No filesystem information since Glances 2.0 bug enhancement (issue #381) Version 2.1 =========== @@ -1200,7 +1200,7 @@ Version 2.1 The pattern could be defined from the command line (-f ) or by pressing the ENTER key in the curse interface. For the moment, process filter feature is only available in standalone mode. - * Add extended processes informations for top process + * Add extended processes information for top process Top process stats availables: CPU affinity, extended memory information (shared, text, lib, datat, dirty, swap), open threads/files and TCP/UDP network sessions, IO nice level For the moment, extended processes stats are only available in standalone mode. * Add --process-short-name tag and '/' key to switch between short/command line @@ -1396,7 +1396,7 @@ Version 1.6.1 * Key 'u' shows cumulative net traffic * Work in improving autoUnit * Take into account the number of core in the CPU process limit - * API improvment add time_since_update for disk, process_disk and network + * API improvement add time_since_update for disk, process_disk and network * Improve help display * Add more dummy FS to the ignore list * Code refactory: psutil < 0.4.1 is deprecated (Thk to Alessio) @@ -1504,7 +1504,7 @@ Version 1.3.7 ============= * Display (if terminal space is available) an alerts history (logs) - * Add a limits classe to manage stats limits + * Add a limits class to manage stats limits * Manage black and white console (issue #31) Version 1.3.6 @@ -1533,7 +1533,7 @@ Version 1.3.4 Version 1.3.3 ============= - * Automatically swith between process short and long name + * Automatically switch between process short and long name * Center the host / system information * Always put the hour/date in the bottom/right * Correct a bug if there is a lot of Disk/IO diff --git a/README.rst b/README.rst index 6986ec90..ecfd1f8f 100644 --- a/README.rst +++ b/README.rst @@ -198,7 +198,7 @@ Get the Glances container: docker pull nicolargo/glances:alpine-latest-full -The followings tags are availables: +The following tags are availables: - *alpine-latest-full* for a full Alpine Glances image (latest release) with all dependencies - *latest-full* for a full Debian Glances image (latest release) with all dependencies @@ -414,7 +414,7 @@ or in a CSV format thanks to the stdout-csv option: 2018-12-08 22:04:23 CEST,5.4,5949136896,4,1.04,0.99,1.04 ... -or in a JSON format thanks to the stdout-json option (attibute not supported in this mode in order to have a real JSON object in output): +or in a JSON format thanks to the stdout-json option (attribute not supported in this mode in order to have a real JSON object in output): .. code-block:: console diff --git a/conf/glances.conf b/conf/glances.conf index 5f3b128d..86c2b92a 100644 --- a/conf/glances.conf +++ b/conf/glances.conf @@ -181,7 +181,7 @@ public_ip_disabled=False # Need to create an aacount: https://censys.io/login censys_url=https://search.censys.io/api # Get your own credential here: https://search.censys.io/account/api -# Enter your creadential and uncomment the following lines +# Enter your credential and uncomment the following lines #censys_username= #censys_password= # List of fields to be displayed in user interface (comma separated) @@ -249,7 +249,7 @@ disable=False # * careful: optional careful threshold (in MB) # * warning: optional warning threshold (in MB) # * critical: optional critical threshold (in MB) -# * refresh: interval in second between two refreshs +# * refresh: interval in second between two refreshes #folder_1_path=/tmp #folder_1_careful=2500 #folder_1_warning=3000 @@ -372,7 +372,7 @@ port_default_gateway=True # web_x_url is the URL to monitor (example: http://my.site.com/folder) # web_x_description is optional (if not set, define to URL) # web_x_timeout is optional and overwrite the default timeout value -# web_x_rtt_warning is optional and defines the warning respond time in ms (approximatively) +# web_x_rtt_warning is optional and defines the warning respond time in ms (approximately) # #web_1_url=https://blog.nicolargo.com #web_1_description=My Blog @@ -385,10 +385,10 @@ port_default_gateway=True [docker] disable=False -# Only show specific containers (comma separeted list of container name or regular expression) +# Only show specific containers (comma separated list of container name or regular expression) # Comment this line to display all containers (default configuration) #show=telegraf -# Hide some containers (comma separeted list of container name or regular expression) +# Hide some containers (comma separated list of container name or regular expression) # Comment this line to display all containers (default configuration) #hide=telegraf # Define the maximum docker size name (default is 20 chars) @@ -453,7 +453,7 @@ path=/tmp # generate_every to a non zero value corresponding to the seconds between # two generation. Set it to 0 to disable graph auto generation. generate_every=60 -# See followings configuration keys definitions in the Pygal lib documentation +# See following configuration keys definitions in the Pygal lib documentation # http://pygal.org/en/stable/documentation/index.html width=800 height=600 @@ -478,7 +478,7 @@ db=glances # => foo.mem # You can also use dynamic values #prefix=foo -# Followings tags will be added for all measurements +# Following tags will be added for all measurements # You can also use dynamic values. # Note: hostname is always added as a tag #tags=foo:bar,spam:eggs,domain:`domainname` @@ -498,7 +498,7 @@ token=EjFUTWe8U-MIseEAkaVIgVnej_TrnbdvEcRkaB1imstW7gapSqy6_6-8XD-yd51V0zUUpDy-kA # => foo.mem # You can also use dynamic values #prefix=foo -# Followings tags will be added for all measurements +# Following tags will be added for all measurements # You can also use dynamic values. # Note: hostname is always added as a tag #tags=foo:bar,spam:eggs,domain:`domainname` diff --git a/docker-compose/glances.conf b/docker-compose/glances.conf index efcb0e95..02744a08 100644 --- a/docker-compose/glances.conf +++ b/docker-compose/glances.conf @@ -238,7 +238,7 @@ disable=False # * careful: optional careful threshold (in MB) # * warning: optional warning threshold (in MB) # * critical: optional critical threshold (in MB) -# * refresh: interval in second between two refreshs +# * refresh: interval in second between two refreshes #folder_1_path=/tmp #folder_1_careful=2500 #folder_1_warning=3000 @@ -359,7 +359,7 @@ port_default_gateway=True # web_x_url is the URL to monitor (example: http://my.site.com/folder) # web_x_description is optional (if not set, define to URL) # web_x_timeout is optional and overwrite the default timeout value -# web_x_rtt_warning is optional and defines the warning respond time in ms (approximatively) +# web_x_rtt_warning is optional and defines the warning respond time in ms (approximately) # #web_1_url=https://blog.nicolargo.com #web_1_description=My Blog @@ -372,10 +372,10 @@ port_default_gateway=True [docker] disable=False -# Only show specific containers (comma separeted list of container name or regular expression) +# Only show specific containers (comma separated list of container name or regular expression) # Comment this line to display all containers (default configuration) #show=telegraf -# Hide some containers (comma separeted list of container name or regular expression) +# Hide some containers (comma separated list of container name or regular expression) # Comment this line to display all containers (default configuration) #hide=telegraf # Define the maximum docker size name (default is 20 chars) @@ -440,7 +440,7 @@ path=/tmp # generate_every to a non zero value corresponding to the seconds between # two generation. Set it to 0 to disable graph auto generation. generate_every=60 -# See followings configuration keys definitions in the Pygal lib documentation +# See following configuration keys definitions in the Pygal lib documentation # http://pygal.org/en/stable/documentation/index.html width=800 height=600 @@ -465,7 +465,7 @@ db=glances # => foo.mem # You can also use dynamic values #prefix=foo -# Followings tags will be added for all measurements +# Following tags will be added for all measurements # You can also use dynamic values. # Note: hostname is always added as a tag #tags=foo:bar,spam:eggs,domain:`domainname` @@ -485,7 +485,7 @@ token=EjFUTWe8U-MIseEAkaVIgVnej_TrnbdvEcRkaB1imstW7gapSqy6_6-8XD-yd51V0zUUpDy-kA # => foo.mem # You can also use dynamic values #prefix=foo -# Followings tags will be added for all measurements +# Following tags will be added for all measurements # You can also use dynamic values. # Note: hostname is always added as a tag #tags=foo:bar,spam:eggs,domain:`domainname` diff --git a/docs/aoa/actions.rst b/docs/aoa/actions.rst index aaa4fc64..65030cd1 100644 --- a/docs/aoa/actions.rst +++ b/docs/aoa/actions.rst @@ -40,7 +40,7 @@ critical is reached: .. note:: - Use && as seprator for multiple commands + Use && as separator for multiple commands Within ``/etc/glances/actions.d/fs-critical.py``: diff --git a/docs/aoa/diskio.rst b/docs/aoa/diskio.rst index 6ae77207..9a1e87d7 100644 --- a/docs/aoa/diskio.rst +++ b/docs/aoa/diskio.rst @@ -10,7 +10,7 @@ dynamically. You can display: -- bytes per second (default behavor / Bytes/s, KBytes/s, MBytes/s, etc) +- bytes per second (default behavior / Bytes/s, KBytes/s, MBytes/s, etc) - requests per second (using --diskio-iops option or *B* hotkey) There is no alert on this information. diff --git a/docs/aoa/docker.rst b/docs/aoa/docker.rst index 2c5b951d..cc8c485b 100644 --- a/docs/aoa/docker.rst +++ b/docs/aoa/docker.rst @@ -21,11 +21,11 @@ under the ``[docker]`` section: [docker] disable=False - # Only show specific containers (comma separeted list of container name or regular expression) + # Only show specific containers (comma separated list of container name or regular expression) show=thiscontainer,andthisone,andthoseones.* - # Hide some containers (comma separeted list of container name or regular expression) + # Hide some containers (comma separated list of container name or regular expression) hide=donotshowthisone,andthose.* - # Show only specific containers (comma separeted list of container name or regular expression) + # Show only specific containers (comma separated list of container name or regular expression) #show=showthisone,andthose.* # Define the maximum docker size name (default is 20 chars) max_name_size=20 diff --git a/docs/aoa/ports.rst b/docs/aoa/ports.rst index 54353891..5f26917e 100644 --- a/docs/aoa/ports.rst +++ b/docs/aoa/ports.rst @@ -50,7 +50,7 @@ configuration file. # web_x_url is the URL to monitor (example: http://my.site.com/folder) # web_x_description is optional (if not set, define to URL) # web_x_timeout is optional and overwrite the default timeout value - # web_x_rtt_warning is optional and defines the warning respond time in ms (approximatively) + # web_x_rtt_warning is optional and defines the warning respond time in ms (approximately) # web_1_url=https://blog.nicolargo.com web_1_description=My Blog diff --git a/docs/aoa/quicklook.rst b/docs/aoa/quicklook.rst index eaa3751c..093a7814 100644 --- a/docs/aoa/quicklook.rst +++ b/docs/aoa/quicklook.rst @@ -19,7 +19,7 @@ sparkline using 'S' hot key or --sparkline command line option (need the sparklines Python lib on your system). Please be aware that sparklines use the Glances history and will not be available if the history is disabled from the command line. For the moment sparkline is not available in -client/server mode (see isse ). +client/server mode (see issue ). .. image:: ../_static/sparkline.png diff --git a/docs/api.rst b/docs/api.rst index 78aa98ae..dfadc569 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -15,7 +15,7 @@ GET API status -------------- This entry point should be used to check the API status. -It will return nothing but a 200 return code if everythin is OK. +It will return nothing but a 200 return code if everything is OK. Get the Rest API status:: @@ -109,7 +109,7 @@ Get a specific field:: # curl http://localhost:61208/api/3/amps/name {"name": ["Dropbox", "Python", "Conntrack", "Nginx", "Systemd", "SystemV"]} -Get a specific item when field matchs the given value:: +Get a specific item when field matches the given value:: # curl http://localhost:61208/api/3/amps/name/Dropbox {"Dropbox": [{"count": 0, @@ -213,7 +213,7 @@ Get a specific field:: # curl http://localhost:61208/api/3/diskio/disk_name {"disk_name": ["sda", "sda1", "sda2", "sda5", "dm-0", "dm-1"]} -Get a specific item when field matchs the given value:: +Get a specific item when field matches the given value:: # curl http://localhost:61208/api/3/diskio/disk_name/sda {"sda": [{"disk_name": "sda", @@ -287,7 +287,7 @@ Get a specific field:: # curl http://localhost:61208/api/3/fs/mnt_point {"mnt_point": ["/", "/var/snap/firefox/common/host-hunspell"]} -Get a specific item when field matchs the given value:: +Get a specific item when field matches the given value:: # curl http://localhost:61208/api/3/fs/mnt_point// {"/": [{"device_name": "/dev/mapper/ubuntu--gnome--vg-root", @@ -460,7 +460,7 @@ Get a specific field:: "vboxnet0", "mpqemubr0"]} -Get a specific item when field matchs the given value:: +Get a specific item when field matches the given value:: # curl http://localhost:61208/api/3/network/interface_name/lo {"lo": [{"alias": None, @@ -542,7 +542,7 @@ Get a specific field:: # curl http://localhost:61208/api/3/ports/host {"host": ["192.168.0.254"]} -Get a specific item when field matchs the given value:: +Get a specific item when field matches the given value:: # curl http://localhost:61208/api/3/ports/host/192.168.0.254 {"192.168.0.254": [{"description": "DefaultGateway", @@ -971,7 +971,7 @@ Get a specific field:: 535974, 536119]} -Get a specific item when field matchs the given value:: +Get a specific item when field matches the given value:: # curl http://localhost:61208/api/3/processlist/pid/477633 {"477633": [{"cmdline": ["/snap/firefox/1877/usr/lib/firefox/firefox"], @@ -1108,7 +1108,7 @@ Get a specific field:: "SODIMM", "BAT BAT0"]} -Get a specific item when field matchs the given value:: +Get a specific item when field matches the given value:: # curl http://localhost:61208/api/3/sensors/label/acpitz 1 {"acpitz 1": [{"critical": 105, @@ -1151,7 +1151,7 @@ GET all stats Get all Glances stats:: # curl http://localhost:61208/api/3/all - Return a very big dictionnary (avoid using this request, performances will be poor)... + Return a very big dictionary (avoid using this request, performances will be poor)... GET stats history ----------------- diff --git a/docs/gw/graph.rst b/docs/gw/graph.rst index f4a742bc..e5ef76ee 100644 --- a/docs/gw/graph.rst +++ b/docs/gw/graph.rst @@ -17,7 +17,7 @@ starts every time the 'g' key is pressed in the CLI interface. # generate_every to a non zero value corresponding to the seconds between # two generation. Set it to 0 to disable graph auto generation. generate_every=60 - # See followings configuration keys definitions in the Pygal lib documentation + # See following configuration keys definitions in the Pygal lib documentation # http://pygal.org/en/stable/documentation/index.html width=800 height=600 diff --git a/docs/gw/influxdb.rst b/docs/gw/influxdb.rst index 1cbecc05..7d5e16ac 100644 --- a/docs/gw/influxdb.rst +++ b/docs/gw/influxdb.rst @@ -56,7 +56,7 @@ following: # => foo.mem # You can also use dynamic values #prefix=foo - # Followings tags will be added for all measurements + # Following tags will be added for all measurements # You can also use dynamic values. # Note: hostname is always added as a tag #tags=foo:bar,spam:eggs,domain:`domainname` @@ -98,7 +98,7 @@ following: # => foo.mem # You can also use dynamic values #prefix=foo - # Followings tags will be added for all measurements + # Following tags will be added for all measurements # You can also use dynamic values. # Note: hostname is always added as a tag #tags=foo:bar,spam:eggs,domain:`domainname` diff --git a/docs/gw/mqtt.rst b/docs/gw/mqtt.rst index 0027e2a5..8497ea08 100644 --- a/docs/gw/mqtt.rst +++ b/docs/gw/mqtt.rst @@ -25,5 +25,5 @@ and run Glances with: $ glances --export mqtt The topic_structure field aims at configuring the way stats are exported to MQTT (see #1798): -- per-metric: one event per metric (default behavor) +- per-metric: one event per metric (default behavior) - per-plugin: one event per plugin diff --git a/docs/quickstart.rst b/docs/quickstart.rst index a32a42c6..3ecb4f93 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -47,7 +47,7 @@ or in a CSV format thanks to the stdout-csv option: 2018-12-08 22:04:23 CEST,5.4,5949136896,4,1.04,0.99,1.04 ... -or as a JSON format thanks to the stdout-json option (attibute not supported in this mode): +or as a JSON format thanks to the stdout-json option (attribute not supported in this mode): .. code-block:: console @@ -124,7 +124,7 @@ When the list is displayed, you can navigate through the Glances servers with up/down keys. It is also possible to sort the server using: - '1' is normal (do not sort) - '2' is using sorting with ascending order (ONLINE > SNMP > PROTECTED > OFFLINE > UNKNOWN) -- '3' is using sorting with descending order (UNKNOW > OFFLINE > PROTECTED > SNMP > ONLINE) +- '3' is using sorting with descending order (UNKNOWN > OFFLINE > PROTECTED > SNMP > ONLINE) SNMP ^^^^ diff --git a/glances/__init__.py b/glances/__init__.py index 95ab50b3..9693a0b2 100644 --- a/glances/__init__.py +++ b/glances/__init__.py @@ -134,7 +134,7 @@ def start(config, args): snapshot_end = tracemalloc.take_snapshot() snapshot_diff = snapshot_end.compare_to(snapshot_begin, 'filename') memory_leak = sum([s.size_diff for s in snapshot_diff]) - print("Memory comsumption: {0:.1f}KB (see log for details)".format(memory_leak / 1000)) + print("Memory consumption: {0:.1f}KB (see log for details)".format(memory_leak / 1000)) logger.info("Memory consumption (top 5):") for stat in snapshot_diff[:5]: logger.info(stat) diff --git a/glances/amps_list.py b/glances/amps_list.py index be2cb5fa..b2a4fee0 100644 --- a/glances/amps_list.py +++ b/glances/amps_list.py @@ -53,7 +53,7 @@ class AmpsList(object): ) header = "glances_" - # For each AMP scrip, call the load_config method + # For each AMP script, call the load_config method for s in self.config.sections(): if s.startswith("amp_"): # An AMP section exists in the configuration file diff --git a/glances/autodiscover.py b/glances/autodiscover.py index 1d50b165..f7e86722 100644 --- a/glances/autodiscover.py +++ b/glances/autodiscover.py @@ -32,7 +32,7 @@ if zeroconf_tag: sys.exit(1) # Global var -# Recent versions of the zeroconf python package doesnt like a zeroconf type that ends with '._tcp.'. +# Recent versions of the zeroconf python package doesn't like a zeroconf type that ends with '._tcp.'. # Correct issue: zeroconf problem with zeroconf_type = "_%s._tcp." % 'glances' #888 zeroconf_type = "_%s._tcp.local." % 'glances' diff --git a/glances/compat.py b/glances/compat.py index b0e2c480..81fad5ad 100644 --- a/glances/compat.py +++ b/glances/compat.py @@ -203,7 +203,7 @@ else: return s.encode('utf-8', errors=errors) def system_exec(command): - """Execute a system command and return the resul as a str""" + """Execute a system command and return the result as a str""" try: res = subprocess.check_output(command.split(' ')) except Exception as e: diff --git a/glances/filter.py b/glances/filter.py index a603c985..55950060 100644 --- a/glances/filter.py +++ b/glances/filter.py @@ -47,7 +47,7 @@ class GlancesFilter(object): @property def filter_input(self): - """Return the filter given by the user (as a sting)""" + """Return the filter given by the user (as a string)""" return self._filter_input @property @@ -57,7 +57,7 @@ class GlancesFilter(object): @filter.setter def filter(self, value): - """Set the filter (as a sting) and compute the regular expression + """Set the filter (as a string) and compute the regular expression A filter could be one of the following: - python > Process name of cmd start with python diff --git a/glances/main.py b/glances/main.py index 5176734d..fcefc1ba 100644 --- a/glances/main.py +++ b/glances/main.py @@ -123,10 +123,10 @@ Examples of use: '--disable-plugin', '--disable-plugins', dest='disable_plugin', - help='disable plugin (comma separed list or all). If all is used, then you need to configure --enable-plugin.', + help='disable plugin (comma separated list or all). If all is used, then you need to configure --enable-plugin.', ) parser.add_argument( - '--enable-plugin', '--enable-plugins', dest='enable_plugin', help='enable plugin (comma separed list)' + '--enable-plugin', '--enable-plugins', dest='enable_plugin', help='enable plugin (comma separated list)' ) parser.add_argument( '--disable-process', @@ -253,7 +253,7 @@ Examples of use: help='Accumulate processes by program', ) # Export modules feature - parser.add_argument('--export', dest='export', help='enable export module (comma separed list)') + parser.add_argument('--export', dest='export', help='enable export module (comma separated list)') parser.add_argument( '--export-csv-file', default='./glances.csv', dest='export_csv_file', help='file path for CSV exporter' ) diff --git a/glances/outputs/glances_stdout_issue.py b/glances/outputs/glances_stdout_issue.py index d70f2f81..8685b7fe 100644 --- a/glances/outputs/glances_stdout_issue.py +++ b/glances/outputs/glances_stdout_issue.py @@ -125,9 +125,7 @@ class GlancesStdoutIssue(object): # Display total time need to update all plugins sys.stdout.write('=' * TERMINAL_WIDTH + '\n') - print("Total time to update all stats: {}{:.5f}s{}".format(colors.BLUE, - counter_total.get(), - colors.NO)) + print("Total time to update all stats: {}{:.5f}s{}".format(colors.BLUE, counter_total.get(), colors.NO)) sys.stdout.write('=' * TERMINAL_WIDTH + '\n') # Return True to exit directly (no refresh) diff --git a/glances/plugins/glances_cloud.py b/glances/plugins/glances_cloud.py index 4d0be568..75840aa8 100644 --- a/glances/plugins/glances_cloud.py +++ b/glances/plugins/glances_cloud.py @@ -10,7 +10,7 @@ """Cloud plugin. Supported Cloud API: -- OpenStack meta data (class ThreadOpenStack, see bellow): AWS, OVH... +- OpenStack meta data (class ThreadOpenStack, see below): AWS, OVH... """ import threading diff --git a/glances/plugins/glances_docker.py b/glances/plugins/glances_docker.py index 589d8709..65f8124e 100644 --- a/glances/plugins/glances_docker.py +++ b/glances/plugins/glances_docker.py @@ -640,7 +640,8 @@ class Plugin(GlancesPlugin): value = ( self.auto_unit( int(container['network']['rx'] // container['network']['time_since_update'] * to_bit) - ) + unit + ) + + unit ) msg = '{:>7}'.format(value) except KeyError: @@ -650,7 +651,8 @@ class Plugin(GlancesPlugin): value = ( self.auto_unit( int(container['network']['tx'] // container['network']['time_since_update'] * to_bit) - ) + unit + ) + + unit ) msg = ' {:<7}'.format(value) except KeyError: @@ -750,11 +752,13 @@ def sort_docker_stats(stats): sort_by = 'cpu_percent' # Sort docker stats - sort_stats_processes(stats['containers'], - sorted_by=sort_by, - sorted_by_secondary=sort_by_secondary, - # Reverse for all but name - reverse=glances_processes.sort_key != 'name') + sort_stats_processes( + stats['containers'], + sorted_by=sort_by, + sorted_by_secondary=sort_by_secondary, + # Reverse for all but name + reverse=glances_processes.sort_key != 'name', + ) # Return the main sort key and the sorted stats return sort_by, stats diff --git a/glances/plugins/glances_load.py b/glances/plugins/glances_load.py index bdd6e830..8d8b6cfc 100644 --- a/glances/plugins/glances_load.py +++ b/glances/plugins/glances_load.py @@ -134,7 +134,7 @@ class Plugin(GlancesPlugin): # Call the father's method super(Plugin, self).update_views() - # Add specifics informations + # Add specifics information try: # Alert and log self.views['min15']['decoration'] = self.get_alert_log( diff --git a/glances/plugins/glances_plugin.py b/glances/plugins/glances_plugin.py index b765873c..6c056570 100644 --- a/glances/plugins/glances_plugin.py +++ b/glances/plugins/glances_plugin.py @@ -516,7 +516,7 @@ class GlancesPlugin(object): If key is None, return all the view for the current plugin else if option is None return the view for the specific key (all option) - else return the view fo the specific key/option + else return the view of the specific key/option Specify item if the stats are stored in a dict of dict (ex: NETWORK, FS...) """ @@ -831,7 +831,9 @@ class GlancesPlugin(object): show=sda.* """ # @TODO: possible optimisation: create a re.compile list - return any(j for j in [re.fullmatch(i.lower(), value.lower()) for i in self.get_conf_value('show', header=header)]) + return any( + j for j in [re.fullmatch(i.lower(), value.lower()) for i in self.get_conf_value('show', header=header)] + ) def is_hide(self, value, header=""): """Return True if the value is in the hide configuration list. @@ -842,7 +844,9 @@ class GlancesPlugin(object): hide=sda2,sda5,loop.* """ # @TODO: possible optimisation: create a re.compile list - return any(j for j in [re.fullmatch(i.lower(), value.lower()) for i in self.get_conf_value('hide', header=header)]) + return any( + j for j in [re.fullmatch(i.lower(), value.lower()) for i in self.get_conf_value('hide', header=header)] + ) def is_display(self, value, header=""): """Return True if the value should be displayed in the UI""" diff --git a/glances/plugins/glances_processcount.py b/glances/plugins/glances_processcount.py index 73e3176d..066dae9f 100644 --- a/glances/plugins/glances_processcount.py +++ b/glances/plugins/glances_processcount.py @@ -60,7 +60,7 @@ class Plugin(GlancesPlugin): stats = glances_processes.get_count() elif self.input_method == 'snmp': # Update stats using SNMP - # Not availaible + # Not available pass # Update the stats diff --git a/glances/plugins/glances_processlist.py b/glances/plugins/glances_processlist.py index 0fc29a3c..0b54f5fa 100644 --- a/glances/plugins/glances_processlist.py +++ b/glances/plugins/glances_processlist.py @@ -373,7 +373,7 @@ class Plugin(GlancesPlugin): msg = self.layout_stat['pid'].format(p['pid'], width=self.__max_pid_size()) else: # Display programs, so the PID should not be displayed - # Instead displays the number of childrens + # Instead displays the number of children msg = self.layout_stat['pid'].format( len(p['childrens']) if 'childrens' in p else '_', width=self.__max_pid_size() ) diff --git a/glances/processes.py b/glances/processes.py index acf5bdf8..09d3e49a 100644 --- a/glances/processes.py +++ b/glances/processes.py @@ -291,9 +291,10 @@ class GlancesProcesses(object): p.info for p in psutil.process_iter(attrs=sorted_attrs, ad_value=None) # OS-related processes filter - if not (BSD and p.info['name'] == 'idle') and - not (WINDOWS and p.info['name'] == 'System Idle Process') and - not (MACOS and p.info['name'] == 'kernel_task') and + if not (BSD and p.info['name'] == 'idle') + and not (WINDOWS and p.info['name'] == 'System Idle Process') + and not (MACOS and p.info['name'] == 'kernel_task') + and # Kernel threads filter not (self.no_kernel_threads and LINUX and p.info['gids'].real == 0) ] @@ -322,7 +323,7 @@ class GlancesProcesses(object): top_process = psutil.Process(proc['pid']) extended_stats = ['cpu_affinity', 'ionice', 'num_ctx_switches'] if LINUX: - # num_fds only avalable on Unix system (see issue #1351) + # num_fds only available on Unix system (see issue #1351) extended_stats += ['num_fds'] if WINDOWS: extended_stats += ['num_handles'] diff --git a/glances/secure.py b/glances/secure.py index e1821415..65c64945 100644 --- a/glances/secure.py +++ b/glances/secure.py @@ -16,7 +16,7 @@ from subprocess import Popen, PIPE def secure_popen(cmd): """A more or less secure way to execute system commands - Multiple command should be seperated with a && + Multiple command should be separated with a && :return: the result of the commands """ diff --git a/glances/stats.py b/glances/stats.py index be2d6af5..86cbe31e 100644 --- a/glances/stats.py +++ b/glances/stats.py @@ -110,7 +110,7 @@ class GlancesStats(object): # on the console but do not crash logger.critical("Error while initializing the {} plugin ({})".format(name, e)) logger.error(traceback.format_exc()) - # An error occure, disable the plugin + # An error occurred, disable the plugin if args is not None: setattr(args, 'disable_' + name, False) else: diff --git a/glances/stats_client_snmp.py b/glances/stats_client_snmp.py index fb206b4c..4f064898 100644 --- a/glances/stats_client_snmp.py +++ b/glances/stats_client_snmp.py @@ -47,7 +47,7 @@ class GlancesStatsClientSNMP(GlancesStats): self.load_modules(self.args) def check_snmp(self): - """Chek if SNMP is available on the server.""" + """Check if SNMP is available on the server.""" # Import the SNMP client class from glances.snmp import GlancesSNMPClient diff --git a/setup.py b/setup.py index 06764efd..36c64a1b 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def get_install_extras_require(): 'sparklines': ['sparklines'], 'web': ['bottle', 'requests'], 'wifi': ['wifi'] - # 'gpu' and 'sensors' ==> See bellow + # 'gpu' and 'sensors' ==> See below } if PY3: extras_require['export'].append('influxdb-client') diff --git a/snap/local/launchers/glances-launch b/snap/local/launchers/glances-launch index 2b79fca2..688042b2 100755 --- a/snap/local/launchers/glances-launch +++ b/snap/local/launchers/glances-launch @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# This is the maintainence launcher for the snap, make necessary runtime +# This is the maintenance launcher for the snap, make necessary runtime # environment changes to make the snap work here. You may also insert # security confinement/deprecation/obsoletion notice of the snap here. set \ diff --git a/unitest.py b/unitest.py index f49bb687..07bab142 100755 --- a/unitest.py +++ b/unitest.py @@ -322,7 +322,7 @@ class TestGlances(unittest.TestCase): msg='{} view is not a dict'.format(plugin)) def test_097_attribute(self): - """Test GlancesAttribute classe""" + """Test GlancesAttribute classes""" print('INFO: [TEST_097] Test attribute') # GlancesAttribute from glances.attribute import GlancesAttribute @@ -345,7 +345,7 @@ class TestGlances(unittest.TestCase): self.assertEqual(a.history_mean(nb=3), 4.5) def test_098_history(self): - """Test GlancesHistory classe""" + """Test GlancesHistory classes""" print('INFO: [TEST_098] Test history') # GlancesHistory from glances.history import GlancesHistory