mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-13 10:07:36 +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
|
||||
id: docker_meta
|
||||
uses: crazy-max/ghaction-docker-meta@v4.2.0
|
||||
uses: crazy-max/ghaction-docker-meta@v4.3.0
|
||||
with:
|
||||
images: ${{ env.DEFAULT_DOCKER_IMAGE }}
|
||||
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
|
||||
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
|
||||
./venv/bin/python -m glances -C ./conf/glances.conf -w
|
||||
|
||||
|
73
NEWS.rst
73
NEWS.rst
@ -2,11 +2,82 @@
|
||||
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
|
||||
===============
|
||||
|
||||
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
|
||||
|
20
README.rst
20
README.rst
@ -40,16 +40,22 @@ Glances - An eye on your system
|
||||
Summary
|
||||
=======
|
||||
|
||||
**Glances** is a cross-platform monitoring tool which aims to present a
|
||||
large amount of monitoring information through a curses or Web
|
||||
based interface. The information dynamically adapts depending on the
|
||||
size of the user interface.
|
||||
**Glances** is an open-source system cross-platform monitoring tool.
|
||||
It allows real-time monitoring of various aspects of your system such as
|
||||
CPU, memory, disk, network usage etc. It also allows monitoring of running processes,
|
||||
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
|
||||
|
||||
It can also work in client/server mode. Remote monitoring could be done
|
||||
via terminal, Web interface or API (XML-RPC and RESTful). Stats can also
|
||||
be exported to files or external time/value databases.
|
||||
In client/server mode, remote monitoring could be done via terminal,
|
||||
Web interface or API (XML-RPC and RESTful).
|
||||
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
|
||||
|
||||
|
@ -307,6 +307,7 @@ battery_critical=95
|
||||
#core 0_fans_speed_alias=CPU Core 0 fan
|
||||
#or
|
||||
#core 0_alias=CPU Core 0
|
||||
#core 1_alias=CPU Core 1
|
||||
|
||||
[processcount]
|
||||
disable=False
|
||||
|
@ -10,8 +10,10 @@ refresh=2
|
||||
# Does Glances should check if a newer version is available on PyPI ?
|
||||
check_update=false
|
||||
# History size (maximum number of values)
|
||||
# Default is 3600 seconds (1 hour)
|
||||
history_size=3600
|
||||
# Default is 1200 values (~1h with the default refresh rate)
|
||||
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
|
||||
@ -212,7 +214,7 @@ critical=-85
|
||||
disable=False
|
||||
# Define the list of hidden disks (comma-separated regexp)
|
||||
#hide=sda2,sda5,loop.*
|
||||
hide=loop.*,/dev/loop*
|
||||
hide=loop.*,/dev/loop.*
|
||||
# Define the list of disks to be show (comma-separated)
|
||||
#show=sda.*
|
||||
# Alias for sda1
|
||||
|
@ -89,6 +89,7 @@ RUN apk add --no-cache \
|
||||
python3 \
|
||||
py3-packaging \
|
||||
py3-dateutil \
|
||||
py3-requests \
|
||||
curl \
|
||||
lm-sensors \
|
||||
wireless-tools \
|
||||
|
@ -8,7 +8,7 @@
|
||||
# Ex: Python 3.10 for Ubuntu 22.04
|
||||
# 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 PIP_MIRROR=https://mirrors.aliyun.com/pypi/simple/
|
||||
FROM nvidia/cuda:${IMAGE_VERSION} as build
|
||||
@ -98,6 +98,7 @@ RUN apt-get update \
|
||||
python3 \
|
||||
python3-packaging \
|
||||
python3-dateutil \
|
||||
python3-requests \
|
||||
curl \
|
||||
lm-sensors \
|
||||
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
|
||||
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)
|
||||
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]]
|
||||
.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
|
||||
glances \- An eye on your system
|
||||
.SH SYNOPSIS
|
||||
@ -258,7 +258,7 @@ set the server cache time [default: 1 sec]
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B open\-web\-browser
|
||||
.B \-\-open\-web\-browser
|
||||
try to open the Web UI in the default Web browser
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
@ -732,60 +732,60 @@ format):
|
||||
.nf
|
||||
.ft C
|
||||
{
|
||||
"version": 1,
|
||||
"disable_existing_loggers": "False",
|
||||
"root": {
|
||||
"level": "INFO",
|
||||
"handlers": ["file", "console"]
|
||||
\(dqversion\(dq: 1,
|
||||
\(dqdisable_existing_loggers\(dq: \(dqFalse\(dq,
|
||||
\(dqroot\(dq: {
|
||||
\(dqlevel\(dq: \(dqINFO\(dq,
|
||||
\(dqhandlers\(dq: [\(dqfile\(dq, \(dqconsole\(dq]
|
||||
},
|
||||
"formatters": {
|
||||
"standard": {
|
||||
"format": "%(asctime)s \-\- %(levelname)s \-\- %(message)s"
|
||||
\(dqformatters\(dq: {
|
||||
\(dqstandard\(dq: {
|
||||
\(dqformat\(dq: \(dq%(asctime)s \-\- %(levelname)s \-\- %(message)s\(dq
|
||||
},
|
||||
"short": {
|
||||
"format": "%(levelname)s: %(message)s"
|
||||
\(dqshort\(dq: {
|
||||
\(dqformat\(dq: \(dq%(levelname)s: %(message)s\(dq
|
||||
},
|
||||
"free": {
|
||||
"format": "%(message)s"
|
||||
\(dqfree\(dq: {
|
||||
\(dqformat\(dq: \(dq%(message)s\(dq
|
||||
}
|
||||
},
|
||||
"handlers": {
|
||||
"file": {
|
||||
"level": "DEBUG",
|
||||
"class": "logging.handlers.RotatingFileHandler",
|
||||
"formatter": "standard",
|
||||
"filename": "/var/tmp/glances.log"
|
||||
\(dqhandlers\(dq: {
|
||||
\(dqfile\(dq: {
|
||||
\(dqlevel\(dq: \(dqDEBUG\(dq,
|
||||
\(dqclass\(dq: \(dqlogging.handlers.RotatingFileHandler\(dq,
|
||||
\(dqformatter\(dq: \(dqstandard\(dq,
|
||||
\(dqfilename\(dq: \(dq/var/tmp/glances.log\(dq
|
||||
},
|
||||
"console": {
|
||||
"level": "CRITICAL",
|
||||
"class": "logging.StreamHandler",
|
||||
"formatter": "free"
|
||||
\(dqconsole\(dq: {
|
||||
\(dqlevel\(dq: \(dqCRITICAL\(dq,
|
||||
\(dqclass\(dq: \(dqlogging.StreamHandler\(dq,
|
||||
\(dqformatter\(dq: \(dqfree\(dq
|
||||
}
|
||||
},
|
||||
"loggers": {
|
||||
"debug": {
|
||||
"handlers": ["file", "console"],
|
||||
"level": "DEBUG"
|
||||
\(dqloggers\(dq: {
|
||||
\(dqdebug\(dq: {
|
||||
\(dqhandlers\(dq: [\(dqfile\(dq, \(dqconsole\(dq],
|
||||
\(dqlevel\(dq: \(dqDEBUG\(dq
|
||||
},
|
||||
"verbose": {
|
||||
"handlers": ["file", "console"],
|
||||
"level": "INFO"
|
||||
\(dqverbose\(dq: {
|
||||
\(dqhandlers\(dq: [\(dqfile\(dq, \(dqconsole\(dq],
|
||||
\(dqlevel\(dq: \(dqINFO\(dq
|
||||
},
|
||||
"standard": {
|
||||
"handlers": ["file"],
|
||||
"level": "INFO"
|
||||
\(dqstandard\(dq: {
|
||||
\(dqhandlers\(dq: [\(dqfile\(dq],
|
||||
\(dqlevel\(dq: \(dqINFO\(dq
|
||||
},
|
||||
"requests": {
|
||||
"handlers": ["file", "console"],
|
||||
"level": "ERROR"
|
||||
\(dqrequests\(dq: {
|
||||
\(dqhandlers\(dq: [\(dqfile\(dq, \(dqconsole\(dq],
|
||||
\(dqlevel\(dq: \(dqERROR\(dq
|
||||
},
|
||||
"elasticsearch": {
|
||||
"handlers": ["file", "console"],
|
||||
"level": "ERROR"
|
||||
\(dqelasticsearch\(dq: {
|
||||
\(dqhandlers\(dq: [\(dqfile\(dq, \(dqconsole\(dq],
|
||||
\(dqlevel\(dq: \(dqERROR\(dq
|
||||
},
|
||||
"elasticsearch.trace": {
|
||||
"handlers": ["file", "console"],
|
||||
"level": "ERROR"
|
||||
\(dqelasticsearch.trace\(dq: {
|
||||
\(dqhandlers\(dq: [\(dqfile\(dq, \(dqconsole\(dq],
|
||||
\(dqlevel\(dq: \(dqERROR\(dq
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -885,6 +885,6 @@ $ glances –browser
|
||||
.sp
|
||||
Nicolas Hennion aka Nicolargo <\fI\%contact@nicolargo.com\fP>
|
||||
.SH COPYRIGHT
|
||||
2022, Nicolas Hennion
|
||||
2023, Nicolas Hennion
|
||||
.\" Generated by docutils manpage writer.
|
||||
.
|
||||
|
@ -19,7 +19,7 @@ import sys
|
||||
# Global name
|
||||
# Version should start and end with a numerical char
|
||||
# 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>'
|
||||
__license__ = 'LGPLv3'
|
||||
|
||||
|
12
glances/outputs/static/package-lock.json
generated
12
glances/outputs/static/package-lock.json
generated
@ -4527,9 +4527,9 @@
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/json5": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
|
||||
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
||||
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"json5": "lib/cli.js"
|
||||
@ -11822,9 +11822,9 @@
|
||||
"peer": true
|
||||
},
|
||||
"json5": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
|
||||
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
||||
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||
"dev": true
|
||||
},
|
||||
"jsprim": {
|
||||
|
@ -29,50 +29,26 @@ import psutil
|
||||
# 'key': 'interface_name'}
|
||||
# Fields description
|
||||
fields_description = {
|
||||
'interface_name': {
|
||||
'description': 'Interface name.',
|
||||
'unit': 'string'
|
||||
},
|
||||
'alias': {
|
||||
'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'
|
||||
},
|
||||
'interface_name': {'description': 'Interface name.', 'unit': 'string'},
|
||||
'alias': {'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': {
|
||||
'description': 'The number of bytes received through the interface (cumulative).',
|
||||
'unit': 'bytes',
|
||||
},
|
||||
'cumulative_tx': {
|
||||
'description': 'The number of bytes sent through the interface (cumulative).',
|
||||
'unit': 'bytes'
|
||||
},
|
||||
'cumulative_tx': {'description': 'The number of bytes sent through the interface (cumulative).', 'unit': 'bytes'},
|
||||
'cumulative_cx': {
|
||||
'description': 'The cumulative number of bytes reveived and sent through the interface (cumulative).',
|
||||
'unit': 'bytes'
|
||||
'unit': 'bytes',
|
||||
},
|
||||
'speed': {
|
||||
'description': 'Maximum interface speed (in bit per second). Can return 0 on some operating-system.',
|
||||
'unit': 'bps',
|
||||
},
|
||||
'is_up': {
|
||||
'description': 'Is the interface up ?',
|
||||
'unit': 'bool'
|
||||
},
|
||||
'time_since_update': {
|
||||
'description': 'Number of seconds since last update.',
|
||||
'unit': 'seconds'
|
||||
},
|
||||
'is_up': {'description': 'Is the interface up ?', 'unit': 'bool'},
|
||||
'time_since_update': {'description': 'Number of seconds since last update.', 'unit': 'seconds'},
|
||||
}
|
||||
|
||||
# SNMP OID
|
||||
|
@ -288,17 +288,19 @@ class GlancesProcesses(object):
|
||||
# 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)
|
||||
# Filter processes
|
||||
self.processlist = list(filter(lambda p: 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
|
||||
not (self.no_kernel_threads and LINUX and p.info['gids'].real == 0),
|
||||
psutil.process_iter(attrs=sorted_attrs, ad_value=None)))
|
||||
self.processlist = list(
|
||||
filter(
|
||||
lambda p: 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 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
|
||||
self.processlist = [p.info for p in self.processlist]
|
||||
# Sort the processes list by the current sort_key
|
||||
self.processlist = sort_stats(self.processlist,
|
||||
sorted_by=self.sort_key,
|
||||
reverse=True)
|
||||
self.processlist = sort_stats(self.processlist, sorted_by=self.sort_key, reverse=True)
|
||||
|
||||
# Update the processcount
|
||||
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}
|
||||
|
||||
# Apply user filter
|
||||
self.processlist = list(filter(lambda p: not self._filter.is_filtered(p),
|
||||
self.processlist))
|
||||
self.processlist = list(filter(lambda p: not self._filter.is_filtered(p), self.processlist))
|
||||
|
||||
# Compute the maximum value for keys in self._max_values_list: CPU, MEM
|
||||
# Useful to highlight the processes with maximum values
|
||||
|
@ -49,8 +49,9 @@ def __secure_popen(cmd):
|
||||
p_last = None
|
||||
# Split by pipe '|'
|
||||
for sub_cmd in cmd.split('|'):
|
||||
# Split by space character, but do no split spaces within quotes
|
||||
sub_cmd_split = [_ for _ in list(filter(None, re.split(r'(\s+)|(".*?"+?)|(\'.*?\'+?)', sub_cmd))) if _ != ' ']
|
||||
# Split by space character, but do no split spaces within quotes (remove surrounding quotes, though)
|
||||
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)
|
||||
if p_last is not None:
|
||||
# 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():
|
||||
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'):
|
||||
requires.append('bottle')
|
||||
requires.append('requests')
|
||||
|
Loading…
Reference in New Issue
Block a user