mirror of
https://github.com/nicolargo/glances.git
synced 2025-01-05 08:39:15 +03:00
Merge branch 'develop' into issue1985
This commit is contained in:
commit
216b78936a
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -104,7 +104,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Retrieve Repository Docker metadata
|
- name: Retrieve Repository Docker metadata
|
||||||
id: docker_meta
|
id: docker_meta
|
||||||
uses: crazy-max/ghaction-docker-meta@v4.2.0
|
uses: crazy-max/ghaction-docker-meta@v4.3.0
|
||||||
with:
|
with:
|
||||||
images: ${{ env.DEFAULT_DOCKER_IMAGE }}
|
images: ${{ env.DEFAULT_DOCKER_IMAGE }}
|
||||||
labels: |
|
labels: |
|
||||||
|
9
Makefile
9
Makefile
@ -164,6 +164,15 @@ run-docker-alpine-full: ## Start Glances Alpine Docker full in console mode
|
|||||||
run-docker-alpine-dev: ## Start Glances Alpine Docker dev in console mode
|
run-docker-alpine-dev: ## Start Glances Alpine Docker dev in console mode
|
||||||
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-alpine-dev
|
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-alpine-dev
|
||||||
|
|
||||||
|
run-docker-ubuntu-minimal: ## Start Glances Ubuntu Docker minimal in console mode
|
||||||
|
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-ubuntu-minimal
|
||||||
|
|
||||||
|
run-docker-ubuntu-full: ## Start Glances Ubuntu Docker full in console mode
|
||||||
|
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-ubuntu-full
|
||||||
|
|
||||||
|
run-docker-ubuntu-dev: ## Start Glances Ubuntu Docker dev in console mode
|
||||||
|
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-ubuntu-dev
|
||||||
|
|
||||||
run-webserver: ## Start Glances in Web server mode
|
run-webserver: ## Start Glances in Web server mode
|
||||||
./venv/bin/python -m glances -C ./conf/glances.conf -w
|
./venv/bin/python -m glances -C ./conf/glances.conf -w
|
||||||
|
|
||||||
|
73
NEWS.rst
73
NEWS.rst
@ -2,11 +2,82 @@
|
|||||||
Glances changelog
|
Glances changelog
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
|
===============
|
||||||
|
Version 3.4.0
|
||||||
|
===============
|
||||||
|
|
||||||
|
See roadmap here: https://github.com/nicolargo/glances/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22Glances+3.4.0%22
|
||||||
|
|
||||||
|
===============
|
||||||
|
Version 3.3.1.1
|
||||||
|
===============
|
||||||
|
|
||||||
|
Hard patch on the master branch.
|
||||||
|
|
||||||
|
Bug corrected:
|
||||||
|
|
||||||
|
* "ModuleNotFoundError: No module named 'ujson'" #2246
|
||||||
|
* Remove surrounding quotes for quoted command arguments #2247 (related to #2239)
|
||||||
|
|
||||||
===============
|
===============
|
||||||
Version 3.3.1
|
Version 3.3.1
|
||||||
===============
|
===============
|
||||||
|
|
||||||
Under development, see milestone https://github.com/nicolargo/glances/milestone/61
|
Enhancements:
|
||||||
|
|
||||||
|
* Minor change on the help screen
|
||||||
|
* Refactor some loop in the processes function
|
||||||
|
* Replace json by ujson #2201
|
||||||
|
|
||||||
|
Bug corrected:
|
||||||
|
|
||||||
|
* Unable to see docker related information #2180
|
||||||
|
* CSV export dependent on sort order for docker container cpu #2156
|
||||||
|
* Error when process list is displayed in Programs mode #2209
|
||||||
|
* Console formatting permanently messed up when other text printed #2211
|
||||||
|
* API GET uptime returns formatted string, not seconds as the doc says #2158
|
||||||
|
* Glances UI is breaking for multiline commands #2189
|
||||||
|
|
||||||
|
Documentation and CI:
|
||||||
|
|
||||||
|
* Add unitary test for memory profiling
|
||||||
|
* Update memory profile chart
|
||||||
|
* Add run-docker-ubuntu-* in Makefile
|
||||||
|
* The open-web-browser option was missing dashes #2219
|
||||||
|
* Correct regexp in glances.conf file example
|
||||||
|
* What is CW from network #2222 (related to discussion #2221)
|
||||||
|
* Change Glances repology URL
|
||||||
|
* Add example for the date format
|
||||||
|
* Correct Flake8 configuration file
|
||||||
|
* Drop UT for Python 3.5 and 3.6 (no more available in Ubuntu 22.04)
|
||||||
|
* Correct unitary test with Python 3.5
|
||||||
|
* Update Makefile with comments
|
||||||
|
* Update Python minimal requirement for py3nvlm
|
||||||
|
* Update security policy (user can open private issue directly in Github)
|
||||||
|
* Add a simple run script. Entry point for IDE debuger
|
||||||
|
|
||||||
|
Cyber security update:
|
||||||
|
|
||||||
|
* Security alert on ujson < 5.4
|
||||||
|
* Merge pull request #2243 from nicolargo/renovate/nvidia-cuda-12.x
|
||||||
|
* Merge pull request #2244 from nicolargo/renovate/crazy-max-ghaction-docker-meta-4.x
|
||||||
|
* Merge pull request #2228 from nicolargo/renovate/zeroconf-0.x
|
||||||
|
* Merge pull request #2242 from nicolargo/renovate/crazy-max-ghaction-docker-meta-4.x
|
||||||
|
* Merge pull request #2239 from mfridge/action-command-split
|
||||||
|
* Merge pull request #2165 from nicolargo/renovate/zeroconf-0.x
|
||||||
|
* Merge pull request #2199 from nicolargo/renovate/alpine-3.x
|
||||||
|
* Merge pull request #2202 from chncaption/oscs_fix_cdr0ts8au51t49so8c6g
|
||||||
|
* Bump loader-utils from 2.0.0 to 2.0.3 in /glances/outputs/static #2187 - Update Web lib
|
||||||
|
|
||||||
|
Contributors for this version:
|
||||||
|
|
||||||
|
* Nicolargo
|
||||||
|
* renovate[bot]
|
||||||
|
* chncaption
|
||||||
|
* fkwong
|
||||||
|
* *mfridge
|
||||||
|
|
||||||
|
And also a big thanks to @RazCrimson (https://github.com/RazCrimson) for the support to the Glances community !
|
||||||
|
|
||||||
===============
|
===============
|
||||||
Version 3.3.0.4
|
Version 3.3.0.4
|
||||||
|
20
README.rst
20
README.rst
@ -40,16 +40,22 @@ Glances - An eye on your system
|
|||||||
Summary
|
Summary
|
||||||
=======
|
=======
|
||||||
|
|
||||||
**Glances** is a cross-platform monitoring tool which aims to present a
|
**Glances** is an open-source system cross-platform monitoring tool.
|
||||||
large amount of monitoring information through a curses or Web
|
It allows real-time monitoring of various aspects of your system such as
|
||||||
based interface. The information dynamically adapts depending on the
|
CPU, memory, disk, network usage etc. It also allows monitoring of running processes,
|
||||||
size of the user interface.
|
logged in users, temperatures, voltages, fan speeds etc.
|
||||||
|
It also supports container monitoring, it supports different container management
|
||||||
|
systems such as Docker, LXC. The information is presented in an easy to read dashboard
|
||||||
|
and can also be used for remote monitoring of systems via a web interface or command
|
||||||
|
line interface. It is easy to install and use and can be customized to show only
|
||||||
|
the information that you are interested in.
|
||||||
|
|
||||||
.. image:: https://raw.githubusercontent.com/nicolargo/glances/develop/docs/_static/glances-summary.png
|
.. image:: https://raw.githubusercontent.com/nicolargo/glances/develop/docs/_static/glances-summary.png
|
||||||
|
|
||||||
It can also work in client/server mode. Remote monitoring could be done
|
In client/server mode, remote monitoring could be done via terminal,
|
||||||
via terminal, Web interface or API (XML-RPC and RESTful). Stats can also
|
Web interface or API (XML-RPC and RESTful).
|
||||||
be exported to files or external time/value databases.
|
Stats can also be exported to files or external time/value databases, CSV or direct
|
||||||
|
output to STDOUT.
|
||||||
|
|
||||||
.. image:: https://raw.githubusercontent.com/nicolargo/glances/develop/docs/_static/glances-responsive-webdesign.png
|
.. image:: https://raw.githubusercontent.com/nicolargo/glances/develop/docs/_static/glances-responsive-webdesign.png
|
||||||
|
|
||||||
|
@ -307,6 +307,7 @@ battery_critical=95
|
|||||||
#core 0_fans_speed_alias=CPU Core 0 fan
|
#core 0_fans_speed_alias=CPU Core 0 fan
|
||||||
#or
|
#or
|
||||||
#core 0_alias=CPU Core 0
|
#core 0_alias=CPU Core 0
|
||||||
|
#core 1_alias=CPU Core 1
|
||||||
|
|
||||||
[processcount]
|
[processcount]
|
||||||
disable=False
|
disable=False
|
||||||
|
@ -10,8 +10,10 @@ refresh=2
|
|||||||
# Does Glances should check if a newer version is available on PyPI ?
|
# Does Glances should check if a newer version is available on PyPI ?
|
||||||
check_update=false
|
check_update=false
|
||||||
# History size (maximum number of values)
|
# History size (maximum number of values)
|
||||||
# Default is 3600 seconds (1 hour)
|
# Default is 1200 values (~1h with the default refresh rate)
|
||||||
history_size=3600
|
history_size=1200
|
||||||
|
# Set the way Glances should display the date (default is %Y-%m-%d %H:%M:%S %Z)
|
||||||
|
#strftime_format="%Y-%m-%d %H:%M:%S %Z"
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# User interface
|
# User interface
|
||||||
@ -212,7 +214,7 @@ critical=-85
|
|||||||
disable=False
|
disable=False
|
||||||
# Define the list of hidden disks (comma-separated regexp)
|
# Define the list of hidden disks (comma-separated regexp)
|
||||||
#hide=sda2,sda5,loop.*
|
#hide=sda2,sda5,loop.*
|
||||||
hide=loop.*,/dev/loop*
|
hide=loop.*,/dev/loop.*
|
||||||
# Define the list of disks to be show (comma-separated)
|
# Define the list of disks to be show (comma-separated)
|
||||||
#show=sda.*
|
#show=sda.*
|
||||||
# Alias for sda1
|
# Alias for sda1
|
||||||
|
@ -89,6 +89,7 @@ RUN apk add --no-cache \
|
|||||||
python3 \
|
python3 \
|
||||||
py3-packaging \
|
py3-packaging \
|
||||||
py3-dateutil \
|
py3-dateutil \
|
||||||
|
py3-requests \
|
||||||
curl \
|
curl \
|
||||||
lm-sensors \
|
lm-sensors \
|
||||||
wireless-tools \
|
wireless-tools \
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
# Ex: Python 3.10 for Ubuntu 22.04
|
# Ex: Python 3.10 for Ubuntu 22.04
|
||||||
# Note: ENV is for future running containers. ARG for building your Docker image.
|
# Note: ENV is for future running containers. ARG for building your Docker image.
|
||||||
|
|
||||||
ARG IMAGE_VERSION=11.8.0-base-ubuntu22.04
|
ARG IMAGE_VERSION=12.0.0-base-ubuntu22.04
|
||||||
ARG PYTHON_VERSION=3.10
|
ARG PYTHON_VERSION=3.10
|
||||||
ARG PIP_MIRROR=https://mirrors.aliyun.com/pypi/simple/
|
ARG PIP_MIRROR=https://mirrors.aliyun.com/pypi/simple/
|
||||||
FROM nvidia/cuda:${IMAGE_VERSION} as build
|
FROM nvidia/cuda:${IMAGE_VERSION} as build
|
||||||
@ -98,6 +98,7 @@ RUN apt-get update \
|
|||||||
python3 \
|
python3 \
|
||||||
python3-packaging \
|
python3-packaging \
|
||||||
python3-dateutil \
|
python3-dateutil \
|
||||||
|
python3-requests \
|
||||||
curl \
|
curl \
|
||||||
lm-sensors \
|
lm-sensors \
|
||||||
wireless-tools \
|
wireless-tools \
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
Binary file not shown.
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
@ -22,7 +22,9 @@ file under the ``[ip]`` section:
|
|||||||
|
|
||||||
|
|
||||||
**NOTE:** Setting low values for `public_refresh_interval` will result in frequent
|
**NOTE:** Setting low values for `public_refresh_interval` will result in frequent
|
||||||
HTTP requests to the IP detection servers. Recommended range: 120-600 seconds
|
HTTP requests to the IP detection servers. Recommended range: 120-600 seconds.
|
||||||
|
Glances uses online services in order to get the IP addresses. Your IP address could be
|
||||||
|
blocked if too many requests are done.
|
||||||
|
|
||||||
If the Censys options are configured, the public IP address is also analysed (with the same interval)
|
If the Censys options are configured, the public IP address is also analysed (with the same interval)
|
||||||
and additional information is displayed.
|
and additional information is displayed.
|
||||||
|
822
docs/api.rst
822
docs/api.rst
File diff suppressed because it is too large
Load Diff
@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|||||||
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||||
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
||||||
..
|
..
|
||||||
.TH "GLANCES" "1" "Dec 21, 2022" "3.3.1_beta1" "Glances"
|
.TH "GLANCES" "1" "Jan 14, 2023" "3.3.1" "Glances"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
glances \- An eye on your system
|
glances \- An eye on your system
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -258,7 +258,7 @@ set the server cache time [default: 1 sec]
|
|||||||
.UNINDENT
|
.UNINDENT
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
.B open\-web\-browser
|
.B \-\-open\-web\-browser
|
||||||
try to open the Web UI in the default Web browser
|
try to open the Web UI in the default Web browser
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
@ -732,60 +732,60 @@ format):
|
|||||||
.nf
|
.nf
|
||||||
.ft C
|
.ft C
|
||||||
{
|
{
|
||||||
"version": 1,
|
\(dqversion\(dq: 1,
|
||||||
"disable_existing_loggers": "False",
|
\(dqdisable_existing_loggers\(dq: \(dqFalse\(dq,
|
||||||
"root": {
|
\(dqroot\(dq: {
|
||||||
"level": "INFO",
|
\(dqlevel\(dq: \(dqINFO\(dq,
|
||||||
"handlers": ["file", "console"]
|
\(dqhandlers\(dq: [\(dqfile\(dq, \(dqconsole\(dq]
|
||||||
},
|
},
|
||||||
"formatters": {
|
\(dqformatters\(dq: {
|
||||||
"standard": {
|
\(dqstandard\(dq: {
|
||||||
"format": "%(asctime)s \-\- %(levelname)s \-\- %(message)s"
|
\(dqformat\(dq: \(dq%(asctime)s \-\- %(levelname)s \-\- %(message)s\(dq
|
||||||
},
|
},
|
||||||
"short": {
|
\(dqshort\(dq: {
|
||||||
"format": "%(levelname)s: %(message)s"
|
\(dqformat\(dq: \(dq%(levelname)s: %(message)s\(dq
|
||||||
},
|
},
|
||||||
"free": {
|
\(dqfree\(dq: {
|
||||||
"format": "%(message)s"
|
\(dqformat\(dq: \(dq%(message)s\(dq
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"handlers": {
|
\(dqhandlers\(dq: {
|
||||||
"file": {
|
\(dqfile\(dq: {
|
||||||
"level": "DEBUG",
|
\(dqlevel\(dq: \(dqDEBUG\(dq,
|
||||||
"class": "logging.handlers.RotatingFileHandler",
|
\(dqclass\(dq: \(dqlogging.handlers.RotatingFileHandler\(dq,
|
||||||
"formatter": "standard",
|
\(dqformatter\(dq: \(dqstandard\(dq,
|
||||||
"filename": "/var/tmp/glances.log"
|
\(dqfilename\(dq: \(dq/var/tmp/glances.log\(dq
|
||||||
},
|
},
|
||||||
"console": {
|
\(dqconsole\(dq: {
|
||||||
"level": "CRITICAL",
|
\(dqlevel\(dq: \(dqCRITICAL\(dq,
|
||||||
"class": "logging.StreamHandler",
|
\(dqclass\(dq: \(dqlogging.StreamHandler\(dq,
|
||||||
"formatter": "free"
|
\(dqformatter\(dq: \(dqfree\(dq
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"loggers": {
|
\(dqloggers\(dq: {
|
||||||
"debug": {
|
\(dqdebug\(dq: {
|
||||||
"handlers": ["file", "console"],
|
\(dqhandlers\(dq: [\(dqfile\(dq, \(dqconsole\(dq],
|
||||||
"level": "DEBUG"
|
\(dqlevel\(dq: \(dqDEBUG\(dq
|
||||||
},
|
},
|
||||||
"verbose": {
|
\(dqverbose\(dq: {
|
||||||
"handlers": ["file", "console"],
|
\(dqhandlers\(dq: [\(dqfile\(dq, \(dqconsole\(dq],
|
||||||
"level": "INFO"
|
\(dqlevel\(dq: \(dqINFO\(dq
|
||||||
},
|
},
|
||||||
"standard": {
|
\(dqstandard\(dq: {
|
||||||
"handlers": ["file"],
|
\(dqhandlers\(dq: [\(dqfile\(dq],
|
||||||
"level": "INFO"
|
\(dqlevel\(dq: \(dqINFO\(dq
|
||||||
},
|
},
|
||||||
"requests": {
|
\(dqrequests\(dq: {
|
||||||
"handlers": ["file", "console"],
|
\(dqhandlers\(dq: [\(dqfile\(dq, \(dqconsole\(dq],
|
||||||
"level": "ERROR"
|
\(dqlevel\(dq: \(dqERROR\(dq
|
||||||
},
|
},
|
||||||
"elasticsearch": {
|
\(dqelasticsearch\(dq: {
|
||||||
"handlers": ["file", "console"],
|
\(dqhandlers\(dq: [\(dqfile\(dq, \(dqconsole\(dq],
|
||||||
"level": "ERROR"
|
\(dqlevel\(dq: \(dqERROR\(dq
|
||||||
},
|
},
|
||||||
"elasticsearch.trace": {
|
\(dqelasticsearch.trace\(dq: {
|
||||||
"handlers": ["file", "console"],
|
\(dqhandlers\(dq: [\(dqfile\(dq, \(dqconsole\(dq],
|
||||||
"level": "ERROR"
|
\(dqlevel\(dq: \(dqERROR\(dq
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -885,6 +885,6 @@ $ glances –browser
|
|||||||
.sp
|
.sp
|
||||||
Nicolas Hennion aka Nicolargo <\fI\%contact@nicolargo.com\fP>
|
Nicolas Hennion aka Nicolargo <\fI\%contact@nicolargo.com\fP>
|
||||||
.SH COPYRIGHT
|
.SH COPYRIGHT
|
||||||
2022, Nicolas Hennion
|
2023, Nicolas Hennion
|
||||||
.\" Generated by docutils manpage writer.
|
.\" Generated by docutils manpage writer.
|
||||||
.
|
.
|
||||||
|
@ -19,7 +19,7 @@ import sys
|
|||||||
# Global name
|
# Global name
|
||||||
# Version should start and end with a numerical char
|
# Version should start and end with a numerical char
|
||||||
# See https://packaging.python.org/specifications/core-metadata/#version
|
# See https://packaging.python.org/specifications/core-metadata/#version
|
||||||
__version__ = '3.3.1_beta1'
|
__version__ = '3.4.0_beta1'
|
||||||
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
|
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
|
||||||
__license__ = 'LGPLv3'
|
__license__ = 'LGPLv3'
|
||||||
|
|
||||||
|
12
glances/outputs/static/package-lock.json
generated
12
glances/outputs/static/package-lock.json
generated
@ -4527,9 +4527,9 @@
|
|||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/json5": {
|
"node_modules/json5": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
||||||
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
|
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"json5": "lib/cli.js"
|
"json5": "lib/cli.js"
|
||||||
@ -11822,9 +11822,9 @@
|
|||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"json5": {
|
"json5": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
||||||
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
|
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"jsprim": {
|
"jsprim": {
|
||||||
|
@ -29,50 +29,26 @@ import psutil
|
|||||||
# 'key': 'interface_name'}
|
# 'key': 'interface_name'}
|
||||||
# Fields description
|
# Fields description
|
||||||
fields_description = {
|
fields_description = {
|
||||||
'interface_name': {
|
'interface_name': {'description': 'Interface name.', 'unit': 'string'},
|
||||||
'description': 'Interface name.',
|
'alias': {'description': 'Interface alias name (optional).', 'unit': 'string'},
|
||||||
'unit': 'string'
|
'rx': {'description': 'The received/input rate (in bit per second).', 'unit': 'bps'},
|
||||||
},
|
'tx': {'description': 'The sent/output rate (in bit per second).', 'unit': 'bps'},
|
||||||
'alias': {
|
'cx': {'description': 'The cumulative received+sent rate (in bit per second).', 'unit': 'bps'},
|
||||||
'description': 'Interface alias name (optional).',
|
|
||||||
'unit': 'string'
|
|
||||||
},
|
|
||||||
'rx': {
|
|
||||||
'description': 'The received/input rate (in bit per second).',
|
|
||||||
'unit': 'bps'
|
|
||||||
},
|
|
||||||
'tx': {
|
|
||||||
'description': 'The sent/output rate (in bit per second).',
|
|
||||||
'unit': 'bps'
|
|
||||||
},
|
|
||||||
'cx': {
|
|
||||||
'description': 'The cumulative received+sent rate (in bit per second).',
|
|
||||||
'unit': 'bps'
|
|
||||||
},
|
|
||||||
'cumulative_rx': {
|
'cumulative_rx': {
|
||||||
'description': 'The number of bytes received through the interface (cumulative).',
|
'description': 'The number of bytes received through the interface (cumulative).',
|
||||||
'unit': 'bytes',
|
'unit': 'bytes',
|
||||||
},
|
},
|
||||||
'cumulative_tx': {
|
'cumulative_tx': {'description': 'The number of bytes sent through the interface (cumulative).', 'unit': 'bytes'},
|
||||||
'description': 'The number of bytes sent through the interface (cumulative).',
|
|
||||||
'unit': 'bytes'
|
|
||||||
},
|
|
||||||
'cumulative_cx': {
|
'cumulative_cx': {
|
||||||
'description': 'The cumulative number of bytes reveived and sent through the interface (cumulative).',
|
'description': 'The cumulative number of bytes reveived and sent through the interface (cumulative).',
|
||||||
'unit': 'bytes'
|
'unit': 'bytes',
|
||||||
},
|
},
|
||||||
'speed': {
|
'speed': {
|
||||||
'description': 'Maximum interface speed (in bit per second). Can return 0 on some operating-system.',
|
'description': 'Maximum interface speed (in bit per second). Can return 0 on some operating-system.',
|
||||||
'unit': 'bps',
|
'unit': 'bps',
|
||||||
},
|
},
|
||||||
'is_up': {
|
'is_up': {'description': 'Is the interface up ?', 'unit': 'bool'},
|
||||||
'description': 'Is the interface up ?',
|
'time_since_update': {'description': 'Number of seconds since last update.', 'unit': 'seconds'},
|
||||||
'unit': 'bool'
|
|
||||||
},
|
|
||||||
'time_since_update': {
|
|
||||||
'description': 'Number of seconds since last update.',
|
|
||||||
'unit': 'seconds'
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# SNMP OID
|
# SNMP OID
|
||||||
|
@ -288,17 +288,19 @@ class GlancesProcesses(object):
|
|||||||
# Build the processes stats list (it is why we need psutil>=5.3.0)
|
# Build the processes stats list (it is why we need psutil>=5.3.0)
|
||||||
# This is one of the main bottleneck of Glances (see flame graph)
|
# This is one of the main bottleneck of Glances (see flame graph)
|
||||||
# Filter processes
|
# Filter processes
|
||||||
self.processlist = list(filter(lambda p: not (BSD and p.info['name'] == 'idle') and
|
self.processlist = list(
|
||||||
not (WINDOWS and p.info['name'] == 'System Idle Process') and
|
filter(
|
||||||
not (MACOS and p.info['name'] == 'kernel_task') and
|
lambda p: not (BSD and p.info['name'] == 'idle')
|
||||||
not (self.no_kernel_threads and LINUX and p.info['gids'].real == 0),
|
and not (WINDOWS and p.info['name'] == 'System Idle Process')
|
||||||
psutil.process_iter(attrs=sorted_attrs, ad_value=None)))
|
and not (MACOS and p.info['name'] == 'kernel_task')
|
||||||
|
and not (self.no_kernel_threads and LINUX and p.info['gids'].real == 0),
|
||||||
|
psutil.process_iter(attrs=sorted_attrs, ad_value=None),
|
||||||
|
)
|
||||||
|
)
|
||||||
# Only get the info key
|
# Only get the info key
|
||||||
self.processlist = [p.info for p in self.processlist]
|
self.processlist = [p.info for p in self.processlist]
|
||||||
# Sort the processes list by the current sort_key
|
# Sort the processes list by the current sort_key
|
||||||
self.processlist = sort_stats(self.processlist,
|
self.processlist = sort_stats(self.processlist, sorted_by=self.sort_key, reverse=True)
|
||||||
sorted_by=self.sort_key,
|
|
||||||
reverse=True)
|
|
||||||
|
|
||||||
# Update the processcount
|
# Update the processcount
|
||||||
self.update_processcount(self.processlist)
|
self.update_processcount(self.processlist)
|
||||||
@ -409,8 +411,7 @@ class GlancesProcesses(object):
|
|||||||
self.processlist_cache[proc['pid']] = {cached: proc[cached] for cached in cached_attrs}
|
self.processlist_cache[proc['pid']] = {cached: proc[cached] for cached in cached_attrs}
|
||||||
|
|
||||||
# Apply user filter
|
# Apply user filter
|
||||||
self.processlist = list(filter(lambda p: not self._filter.is_filtered(p),
|
self.processlist = list(filter(lambda p: not self._filter.is_filtered(p), self.processlist))
|
||||||
self.processlist))
|
|
||||||
|
|
||||||
# Compute the maximum value for keys in self._max_values_list: CPU, MEM
|
# Compute the maximum value for keys in self._max_values_list: CPU, MEM
|
||||||
# Useful to highlight the processes with maximum values
|
# Useful to highlight the processes with maximum values
|
||||||
|
@ -49,8 +49,9 @@ def __secure_popen(cmd):
|
|||||||
p_last = None
|
p_last = None
|
||||||
# Split by pipe '|'
|
# Split by pipe '|'
|
||||||
for sub_cmd in cmd.split('|'):
|
for sub_cmd in cmd.split('|'):
|
||||||
# Split by space character, but do no split spaces within quotes
|
# Split by space character, but do no split spaces within quotes (remove surrounding quotes, though)
|
||||||
sub_cmd_split = [_ for _ in list(filter(None, re.split(r'(\s+)|(".*?"+?)|(\'.*?\'+?)', sub_cmd))) if _ != ' ']
|
tmp_split = [_ for _ in list(filter(None, re.split(r'(\s+)|(".*?"+?)|(\'.*?\'+?)', sub_cmd))) if _ != ' ']
|
||||||
|
sub_cmd_split = [_[1:-1] if (_[0]==_[-1]=='"') or (_[0]==_[-1]=='\'') else _ for _ in tmp_split]
|
||||||
p = Popen(sub_cmd_split, shell=False, stdin=sub_cmd_stdin, stdout=PIPE, stderr=PIPE)
|
p = Popen(sub_cmd_split, shell=False, stdin=sub_cmd_stdin, stdout=PIPE, stderr=PIPE)
|
||||||
if p_last is not None:
|
if p_last is not None:
|
||||||
# Allow p_last to receive a SIGPIPE if p exits.
|
# Allow p_last to receive a SIGPIPE if p exits.
|
||||||
|
11
setup.py
11
setup.py
@ -41,7 +41,16 @@ def get_data_files():
|
|||||||
|
|
||||||
|
|
||||||
def get_install_requires():
|
def get_install_requires():
|
||||||
requires = ['psutil>=5.3.0', 'defusedxml', 'future', 'packaging']
|
requires = [
|
||||||
|
'psutil>=5.6.7',
|
||||||
|
'defusedxml',
|
||||||
|
'packaging',
|
||||||
|
'future; python_version < "3.0"',
|
||||||
|
'ujson<3; python_version < "3.0"',
|
||||||
|
'ujson<4; python_version >= "3.5" and python_version < "3.6"',
|
||||||
|
'ujson<5; python_version >= "3.6" and python_version < "3.7"',
|
||||||
|
'ujson>=5.4.0; python_version >= "3.7"',
|
||||||
|
]
|
||||||
if sys.platform.startswith('win'):
|
if sys.platform.startswith('win'):
|
||||||
requires.append('bottle')
|
requires.append('bottle')
|
||||||
requires.append('requests')
|
requires.append('requests')
|
||||||
|
Loading…
Reference in New Issue
Block a user