Fix typos

Found via `codespell -S ./venv,./glances/outputs,*.svg -L hart,bu,te,statics`
This commit is contained in:
Kian-Meng Ang 2022-10-03 21:53:24 +08:00
parent 94d1e00692
commit 4046fbb18c
36 changed files with 108 additions and 101 deletions

View File

@ -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'
<saghul@gmail.com>:
http://code.saghul.net/index.php/2015/09/09/
"""

View File

@ -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

View File

@ -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. <class 'TypeError'>: ... 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 <pattern>)
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

View File

@ -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

View File

@ -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_api_id>
#censys_password=<censys_secret>
# 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`

View File

@ -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`

View File

@ -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``:

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
-----------------

View File

@ -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

View File

@ -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`

View File

@ -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

View File

@ -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
^^^^

View File

@ -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)

View File

@ -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

View File

@ -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'

View File

@ -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:

View File

@ -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

View File

@ -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'
)

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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(

View File

@ -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"""

View File

@ -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

View File

@ -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()
)

View File

@ -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']

View File

@ -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
"""

View File

@ -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:

View File

@ -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

View File

@ -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')

View File

@ -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 \

View File

@ -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