summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2023-12-10 20:12:21 +0100
committernicolargo <nicolas@nicolargo.com>2023-12-10 20:12:21 +0100
commita3e08966b5e3aa4063e756b074a47b10a6b99866 (patch)
tree0602fae6624d7c24c72f894ba36f091c496b3e1b
parent1f1622a625c4d66a100cdb09654f0f56934b2742 (diff)
parent4a41c76953cbfc1e930af2f3793beac438f6a2cd (diff)
:Merge branch 'develop' into issue2181
-rw-r--r--.github/workflows/build.yml8
-rw-r--r--Makefile6
-rw-r--r--NEWS.rst2
-rw-r--r--conf/glances.conf6
-rw-r--r--docker-compose/glances.conf6
-rw-r--r--docker-requirements.txt4
-rw-r--r--docs/aoa/containers.rst6
-rw-r--r--docs/aoa/ps.rst2
-rw-r--r--docs/api.rst369
-rw-r--r--docs/cmds.rst44
-rw-r--r--docs/config.rst41
-rw-r--r--docs/docker.rst14
-rw-r--r--docs/glances.rst21
-rw-r--r--docs/index.rst12
-rw-r--r--docs/install.rst16
-rw-r--r--docs/man/glances.1108
-rw-r--r--docs/quickstart.rst24
-rw-r--r--docs/support.rst2
-rw-r--r--glances/exports/export.py2
-rw-r--r--glances/main.py26
-rw-r--r--glances/plugins/plugin/model.py4
21 files changed, 397 insertions, 326 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index ddd66c67..f5e4565d 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -44,16 +44,16 @@ jobs:
--outdir dist/
- name: Publish distribution package to Test PyPI
- uses: pypa/gh-action-pypi-publish@master
+ uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
- repository_url: https://test.pypi.org/legacy/
- skip_existing: true
+ repository-url: https://test.pypi.org/legacy/
+ skip-existing: true
- name: Publish distribution package to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
- uses: pypa/gh-action-pypi-publish@master
+ uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
diff --git a/Makefile b/Makefile
index 18c0958b..1963c931 100644
--- a/Makefile
+++ b/Makefile
@@ -84,7 +84,7 @@ test-restful-api: ## Run unit tests of the RESTful API
./venv/bin/python ./unitest-restful.py
# ===================================================================
-# Linters and profilers
+# Linters, profilers and cyber security
# ===================================================================
format: ## Format the code
@@ -126,6 +126,10 @@ memory-profiling: ## Profile memory usage
./venv-dev/bin/mprof plot --output ./docs/_static/glances-memory-profiling-without-history.png
rm -f mprofile_*.dat
+# Trivy installation: https://aquasecurity.github.io/trivy/latest/getting-started/installation/
+trivy: ## Run Trivy to find vulnerabilities in container images
+ trivy fs .
+
# ===================================================================
# Docs
# ===================================================================
diff --git a/NEWS.rst b/NEWS.rst
index e40a63c1..3b7ef9ed 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -899,7 +899,7 @@ Processes list Nice value:
[processlist]
# Nice priorities range from -20 to 19.
- # Configure nice levels using a comma separated list.
+ # Configure nice levels using a comma-separated list.
#
# Nice: Example 1, non-zero is warning (default behavior)
nice_warning=-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
diff --git a/conf/glances.conf b/conf/glances.conf
index 1a59587a..2ab073e2 100644
--- a/conf/glances.conf
+++ b/conf/glances.conf
@@ -336,7 +336,7 @@ mem_warning=70
mem_critical=90
#
# Nice priorities range from -20 to 19.
-# Configure nice levels using a comma separated list.
+# Configure nice levels using a comma-separated list.
#
# Nice: Example 1, non-zero is warning (default behavior)
nice_warning=-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
@@ -394,10 +394,10 @@ port_default_gateway=True
[containers]
disable=False
-# Only show specific containers (comma separated 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 separated 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)
diff --git a/docker-compose/glances.conf b/docker-compose/glances.conf
index ed44d51b..9f91be17 100644
--- a/docker-compose/glances.conf
+++ b/docker-compose/glances.conf
@@ -340,7 +340,7 @@ mem_warning=70
mem_critical=90
#
# Nice priorities range from -20 to 19.
-# Configure nice levels using a comma separated list.
+# Configure nice levels using a comma-separated list.
#
# Nice: Example 1, non-zero is warning (default behavior)
nice_warning=-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
@@ -398,10 +398,10 @@ port_default_gateway=True
[containers]
disable=False
-# Only show specific containers (comma separated 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 separated 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)
diff --git a/docker-requirements.txt b/docker-requirements.txt
index 0792572a..c93beffe 100644
--- a/docker-requirements.txt
+++ b/docker-requirements.txt
@@ -6,5 +6,5 @@ podman; python_version >= "3.6"
packaging; python_version >= "3.7"
python-dateutil
six
-urllib3<2.0 # See issue https://github.com/nicolargo/glances/issues/2392
-requests # See issue - https://github.com/nicolargo/glances/issues/2233
+urllib3<2.0 # See issue https://github.com/nicolargo/glances/issues/2617
+requests
diff --git a/docs/aoa/containers.rst b/docs/aoa/containers.rst
index c969b1e8..3750d3cf 100644
--- a/docs/aoa/containers.rst
+++ b/docs/aoa/containers.rst
@@ -21,11 +21,11 @@ under the ``[containers]`` section:
[containers]
disable=False
- # Only show specific containers (comma separated 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 separated 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 separated 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 containers size name (default is 20 chars)
max_name_size=20
diff --git a/docs/aoa/ps.rst b/docs/aoa/ps.rst
index 310c8cd5..7b5d8cf8 100644
--- a/docs/aoa/ps.rst
+++ b/docs/aoa/ps.rst
@@ -190,7 +190,7 @@ In curses/standalone mode, you can select a process using ``UP`` and ``DOWN`` an
.. note::
Limit for CPU and MEM percent values can be overwritten in the
configuration file under the ``[processlist]`` section. It is also
- possible to define limit for Nice values (comma separated list).
+ possible to define limit for Nice values (comma-separated list).
For example: nice_warning=-20,-19,-18
Accumulated per program — key 'j'
diff --git a/docs/api.rst b/docs/api.rst
index b4b1523b..2889f469 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -78,6 +78,25 @@ Get the plugins list::
"uptime",
"wifi"]
+GET alert
+---------
+
+Get plugin stats::
+
+ # curl http://localhost:61208/api/3/alert
+ [[1702235377.0,
+ -1,
+ "WARNING",
+ "MEM",
+ 80.7320208056836,
+ 80.7320208056836,
+ 80.7320208056836,
+ 80.7320208056836,
+ 1,
+ [],
+ "",
+ "memory_percent"]]
+
GET amps
--------
@@ -92,7 +111,7 @@ Get plugin stats::
"refresh": 3.0,
"regex": True,
"result": None,
- "timer": 0.16420912742614746},
+ "timer": 0.39360761642456055},
{"count": 0,
"countmax": 20.0,
"countmin": None,
@@ -101,7 +120,7 @@ Get plugin stats::
"refresh": 3.0,
"regex": True,
"result": None,
- "timer": 0.16410183906555176}]
+ "timer": 0.39345741271972656}]
Get a specific field::
@@ -119,7 +138,7 @@ Get a specific item when field matches the given value::
"refresh": 3.0,
"regex": True,
"result": None,
- "timer": 0.16420912742614746}]}
+ "timer": 0.39360761642456055}]}
GET connections
---------------
@@ -140,12 +159,54 @@ GET containers
Get plugin stats::
# curl http://localhost:61208/api/3/containers
- {"containers": [{"Command": ["/portainer"],
+ {"containers": [{"Command": ["top"],
+ "Created": "2023-12-09T10:45:34.339489876+01:00",
+ "Id": "481d6ffb7eef284d062628cf350bdd9ce0a803db8a2a505d75565ed24322b714",
+ "Image": "["docker.io/library/ubuntu:latest"]",
+ "Status": "running",
+ "Uptime": "yesterday",
+ "cpu": {"total": 2.756671645021486e-07},
+ "cpu_percent": 2.756671645021486e-07,
+ "engine": "podman",
+ "io": {"ior": 0.0, "iow": 0.0, "time_since_update": 1},
+ "io_r": 0.0,
+ "io_w": 0.0,
+ "key": "name",
+ "memory": {"limit": 7823585280.0, "usage": 1974272.0},
+ "memory_usage": 1974272.0,
+ "name": "sad_darwin",
+ "network": {"rx": 0.0, "time_since_update": 1, "tx": 0.0},
+ "network_rx": 0.0,
+ "network_tx": 0.0,
+ "pod_id": "8d0f1c783def",
+ "pod_name": "sad_darwin"},
+ {"Command": [],
+ "Created": "2022-10-22T14:23:03.120912374+02:00",
+ "Id": "9491515251edcd5bb5dc17205d7ee573c0be96fe0b08b0a12a7e2cea874565ea",
+ "Image": "["k8s.gcr.io/pause:3.5"]",
+ "Status": "running",
+ "Uptime": "yesterday",
+ "cpu": {"total": 3.1294144561318065e-10},
+ "cpu_percent": 3.1294144561318065e-10,
+ "engine": "podman",
+ "io": {"ior": 0.0, "iow": 0.0, "time_since_update": 1},
+ "io_r": 0.0,
+ "io_w": 0.0,
+ "key": "name",
+ "memory": {"limit": 7823585280.0, "usage": 692224.0},
+ "memory_usage": 692224.0,
+ "name": "8d0f1c783def-infra",
+ "network": {"rx": 0.0, "time_since_update": 1, "tx": 0.0},
+ "network_rx": 0.0,
+ "network_tx": 0.0,
+ "pod_id": "8d0f1c783def",
+ "pod_name": "8d0f1c783def-infra"},
+ {"Command": ["/portainer"],
"Created": "2022-10-29T14:59:10.266701439Z",
"Id": "3abd51c615968482d9ccff5afc629f267f6dda113ed68b75b432615fae3b49fb",
"Image": ["portainer/portainer-ce:2.9.3"],
"Status": "running",
- "Uptime": "6 mins",
+ "Uptime": "2 weeks",
"cpu": {"total": 0.0},
"cpu_percent": 0.0,
"engine": "docker",
@@ -190,19 +251,19 @@ Get plugin stats::
"ctx_switches": 0,
"guest": 0.0,
"guest_nice": 0.0,
- "idle": 73.9,
+ "idle": 55.5,
"interrupts": 0,
- "iowait": 0.9,
+ "iowait": 1.2,
"irq": 0.0,
"nice": 0.0,
"soft_interrupts": 0,
- "softirq": 0.0,
+ "softirq": 0.4,
"steal": 0.0,
"syscalls": 0,
- "system": 4.5,
+ "system": 6.5,
"time_since_update": 1,
- "total": 25.2,
- "user": 20.7}
+ "total": 43.0,
+ "user": 36.3}
Fields descriptions:
@@ -225,7 +286,7 @@ Fields descriptions:
Get a specific field::
# curl http://localhost:61208/api/3/cpu/total
- {"total": 25.2}
+ {"total": 43.0}
GET diskio
----------
@@ -251,7 +312,7 @@ Get plugin stats::
Get a specific field::
# curl http://localhost:61208/api/3/diskio/disk_name
- {"disk_name": ["sda", "sda1", "sda2", "sda5", "dm-0", "dm-1", "sdb", "sdb1"]}
+ {"disk_name": ["sda", "sda1", "sda2", "sda5", "dm-0", "dm-1"]}
Get a specific item when field matches the given value::
@@ -271,13 +332,13 @@ Get plugin stats::
# curl http://localhost:61208/api/3/fs
[{"device_name": "/dev/mapper/ubuntu--gnome--vg-root",
- "free": 30865014784,
+ "free": 24783605760,
"fs_type": "ext4",
"key": "mnt_point",
"mnt_point": "/",
- "percent": 86.6,
+ "percent": 89.3,
"size": 243334156288,
- "used": 200081686528},
+ "used": 206163095552},
{"device_name": "zsfpool",
"free": 41811968,
"fs_type": "zfs",
@@ -296,13 +357,13 @@ 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",
- "free": 30865014784,
+ "free": 24783605760,
"fs_type": "ext4",
"key": "mnt_point",
"mnt_point": "/",
- "percent": 86.6,
+ "percent": 89.3,
"size": 243334156288,
- "used": 200081686528}]}
+ "used": 206163095552}]}
GET ip
------
@@ -310,17 +371,17 @@ GET ip
Get plugin stats::
# curl http://localhost:61208/api/3/ip
- {"address": "192.168.1.14",
- "gateway": "192.168.1.1",
+ {"address": "192.168.0.32",
+ "gateway": "192.168.0.254",
"mask": "255.255.255.0",
"mask_cidr": 24,
- "public_address": "92.151.148.66",
+ "public_address": "91.166.228.228",
"public_info_human": ""}
Get a specific field::
# curl http://localhost:61208/api/3/ip/gateway
- {"gateway": "192.168.1.1"}
+ {"gateway": "192.168.0.254"}
GET load
--------
@@ -329,9 +390,9 @@ Get plugin stats::
# curl http://localhost:61208/api/3/load
{"cpucore": 4,
- "min1": 1.16650390625,
- "min15": 1.2255859375,
- "min5": 1.3173828125}
+ "min1": 1.86572265625,
+ "min15": 1.49169921875,
+ "min5": 1.7294921875}
Fields descriptions:
@@ -343,7 +404,7 @@ Fields descriptions:
Get a specific field::
# curl http://localhost:61208/api/3/load/min1
- {"min1": 1.16650390625}
+ {"min1": 1.86572265625}
GET mem
-------
@@ -351,16 +412,16 @@ GET mem
Get plugin stats::
# curl http://localhost:61208/api/3/mem
- {"active": 2796564480,
- "available": 2493652992,
- "buffers": 401641472,
- "cached": 2819747840,
- "free": 2493652992,
- "inactive": 3942461440,
- "percent": 68.1,
- "shared": 551772160,
+ {"active": 2548203520,
+ "available": 1507446784,
+ "buffers": 83345408,
+ "cached": 1794064384,
+ "free": 1507446784,
+ "inactive": 3827736576,
+ "percent": 80.7,
+ "shared": 454299648,
"total": 7823585280,
- "used": 5329932288}
+ "used": 6316138496}
Fields descriptions:
@@ -387,13 +448,13 @@ GET memswap
Get plugin stats::
# curl http://localhost:61208/api/3/memswap
- {"free": 5963968512,
- "percent": 26.2,
- "sin": 513867776,
- "sout": 2566475776,
+ {"free": 5210046464,
+ "percent": 35.5,
+ "sin": 2560524288,
+ "sout": 5443428352,
"time_since_update": 1,
"total": 8082419712,
- "used": 2118451200}
+ "used": 2872373248}
Fields descriptions:
@@ -417,26 +478,26 @@ Get plugin stats::
# curl http://localhost:61208/api/3/network
[{"alias": None,
- "cumulative_cx": 31635408,
- "cumulative_rx": 15817704,
- "cumulative_tx": 15817704,
- "cx": 0,
+ "cumulative_cx": 355930708,
+ "cumulative_rx": 177965354,
+ "cumulative_tx": 177965354,
+ "cx": 16048,
"interface_name": "lo",
"is_up": True,
"key": "interface_name",
- "rx": 0,
+ "rx": 8024,
"speed": 0,
"time_since_update": 1,
- "tx": 0},
+ "tx": 8024},
{"alias": None,
- "cumulative_cx": 23666156944,
- "cumulative_rx": 23525021295,
- "cumulative_tx": 141135649,
- "cx": 126,
+ "cumulative_cx": 4299682624,
+ "cumulative_rx": 4046511475,
+ "cumulative_tx": 253171149,
+ "cx": 224,
"interface_name": "wlp2s0",
"is_up": True,
"key": "interface_name",
- "rx": 0,
+ "rx": 98,
"speed": 0,
"time_since_update": 1,
"tx": 126}]
@@ -460,27 +521,27 @@ Get a specific field::
# curl http://localhost:61208/api/3/network/interface_name
{"interface_name": ["lo",
"wlp2s0",
- "br_grafana",
"br-40875d2e2716",
"docker0",
- "mpqemubr0",
- "vethe1b1351"]}
+ "br_grafana",
+ "veth55598fc",
+ "mpqemubr0"]}
Get a specific item when field matches the given value::
# curl http://localhost:61208/api/3/network/interface_name/lo
{"lo": [{"alias": None,
- "cumulative_cx": 31635408,
- "cumulative_rx": 15817704,
- "cumulative_tx": 15817704,
- "cx": 0,
+ "cumulative_cx": 355930708,
+ "cumulative_rx": 177965354,
+ "cumulative_tx": 177965354,
+ "cx": 16048,
"interface_name": "lo",
"is_up": True,
"key": "interface_name",
- "rx": 0,
+ "rx": 8024,
"speed": 0,
"time_since_update": 1,
- "tx": 0}]}
+ "tx": 8024}]}
GET now
-------
@@ -488,7 +549,7 @@ GET now
Get plugin stats::
# curl http://localhost:61208/api/3/now
- "2023-11-01 08:51:27 CET"
+ "2023-12-10 20:09:37 CET"
GET percpu
----------
@@ -499,29 +560,29 @@ Get plugin stats::
[{"cpu_number": 0,
"guest": 0.0,
"guest_nice": 0.0,
- "idle": 16.0,
+ "idle": 41.0,
"iowait": 0.0,
"irq": 0.0,
"key": "cpu_number",
"nice": 0.0,
"softirq": 0.0,
"steal": 0.0,
- "system": 2.0,
- "total": 84.0,
- "user": 9.0},
+ "system": 4.0,
+ "total": 59.0,
+ "user": 15.0},
{"cpu_number": 1,
"guest": 0.0,
"guest_nice": 0.0,
- "idle": 15.0,
+ "idle": 41.0,
"iowait": 0.0,
"irq": 0.0,
"key": "cpu_number",
"nice": 0.0,
"softirq": 0.0,
"steal": 0.0,
- "system": 1.0,
- "total": 85.0,
- "user": 13.0}]
+ "system": 4.0,
+ "total": 59.0,
+ "user": 19.0}]
Get a specific field::
@@ -535,30 +596,30 @@ Get plugin stats::
# curl http://localhost:61208/api/3/ports
[{"description": "DefaultGateway",
- "host": "192.168.1.1",
+ "host": "192.168.0.254",
"indice": "port_0",
"port": 0,
"refresh": 30,
"rtt_warning": None,
- "status": 0.01277,
+ "status": 0.003594,
"timeout": 3}]
Get a specific field::
# curl http://localhost:61208/api/3/ports/host
- {"host": ["192.168.1.1"]}
+ {"host": ["192.168.0.254"]}
Get a specific item when field matches the given value::
- # curl http://localhost:61208/api/3/ports/host/192.168.1.1
- {"192.168.1.1": [{"description": "DefaultGateway",
- "host": "192.168.1.1",
- "indice": "port_0",
- "port": 0,
- "refresh": 30,
- "rtt_warning": None,
- "status": 0.01277,
- "timeout": 3}]}
+ # curl http://localhost:61208/api/3/ports/host/192.168.0.254
+ {"192.168.0.254": [{"description": "DefaultGateway",
+ "host": "192.168.0.254",
+ "indice": "port_0",
+ "port": 0,
+ "refresh": 30,
+ "rtt_warning": None,
+ "status": 0.003594,
+ "timeout": 3}]}
GET processcount
----------------
@@ -566,12 +627,12 @@ GET processcount
Get plugin stats::
# curl http://localhost:61208/api/3/processcount
- {"pid_max": 0, "running": 1, "sleeping": 314, "thread": 1662, "total": 386}
+ {"pid_max": 0, "running": 1, "sleeping": 319, "thread": 1720, "total": 385}
Get a specific field::
# curl http://localhost:61208/api/3/processcount/total
- {"total": 386}
+ {"total": 385}
GET psutilversion
-----------------
@@ -579,7 +640,7 @@ GET psutilversion
Get plugin stats::
# curl http://localhost:61208/api/3/psutilversion
- [5, 9, 5]
+ [5, 9, 6]
GET quicklook
-------------
@@ -587,69 +648,69 @@ GET quicklook
Get plugin stats::
# curl http://localhost:61208/api/3/quicklook
- {"cpu": 25.2,
- "cpu_hz": 3000000000.0,
- "cpu_hz_current": 2844080000.0,
+ {"cpu": 43.0,
+ "cpu_hz": 2025000000.0,
+ "cpu_hz_current": 1747868750.0,
"cpu_name": "Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz",
- "mem": 68.1,
+ "mem": 80.7,
"percpu": [{"cpu_number": 0,
"guest": 0.0,
"guest_nice": 0.0,
- "idle": 16.0,
+ "idle": 41.0,
"iowait": 0.0,
"irq": 0.0,
"key": "cpu_number",
"nice": 0.0,
"softirq": 0.0,
"steal": 0.0,
- "system": 2.0,
- "total": 84.0,
- "user": 9.0},
+ "system": 4.0,
+ "total": 59.0,
+ "user": 15.0},
{"cpu_number": 1,
"guest": 0.0,
"guest_nice": 0.0,
- "idle": 15.0,
+ "idle": 41.0,
"iowait": 0.0,
"irq": 0.0,
"key": "cpu_number",
"nice": 0.0,
"softirq": 0.0,
"steal": 0.0,
- "system": 1.0,
- "total": 85.0,
- "user": 13.0},
+ "system": 4.0,
+ "total": 59.0,
+ "user": 19.0},
{"cpu_number": 2,
"guest": 0.0,
"guest_nice": 0.0,
- "idle": 26.0,
- "iowait": 0.0,
+ "idle": 33.0,
+ "iowait": 1.0,
"irq": 0.0,
"key": "cpu_number",
"nice": 0.0,
- "softirq": 0.0,
+ "softirq": 1.0,
"steal": 0.0,
- "system": 1.0,
- "total": 74.0,
- "user": 1.0},
+ "system": 5.0,
+ "total": 67.0,
+ "user": 22.0},
{"cpu_number": 3,
"guest": 0.0,
"guest_nice": 0.0,
- "idle": 26.0,
- "iowait": 0.0,
+ "idle": 21.0,
+ "iowait": 1.0,
"irq": 0.0,
"key": "cpu_number",
"nice": 0.0,
"softirq": 0.0,
"steal": 0.0,
- "system": 1.0,
- "total": 74.0,
- "user": 1.0}],
- "swap": 26.2}
+ "system": 3.0,
+ "total": 79.0,
+ "user": 35.0}],
+ "swap": 35.5}
Get a specific field::
# curl http://localhost:61208/api/3/quicklook/cpu
- {"cpu": 25.2}
+ {"cpu": 43.0}
GET sensors
-----------
@@ -706,7 +767,7 @@ Get plugin stats::
"hr_name": "Ubuntu 22.04 64bit",
"linux_distro": "Ubuntu 22.04",
"os_name": "Linux",
- "os_version": "5.15.0-86-generic",
+ "os_version": "5.15.0-88-generic",
"platform": "64bit"}
Get a specific field::
@@ -720,7 +781,7 @@ GET uptime
Get plugin stats::
# curl http://localhost:61208/api/3/uptime
- "10 days, 23:38:54"
+ "15 days, 11:11:48"
GET all stats
-------------
@@ -736,15 +797,30 @@ GET top n items of a specific plugin
Get top 2 processes of the processlist plugin::
# curl http://localhost:61208/api/3/processlist/top/2
- [{"cmdline": ["/snap/firefox/3206/usr/lib/firefox/firefox",
+ [{"cmdline": ["/snap/firefox/3206/usr/lib/firefox/firefox"],
+ "cpu_percent": 0.0,
+ "cpu_times": pcputimes(user=5861.59, system=1737.38, children_user=4938.06, children_system=709.56, iowait=0.0),
+ "gids": pgids(real=1000, effective=1000, saved=1000),
+ "io_counters": [3402736640, 6576906240, 0, 0, 0],
+ "key": "pid",
+ "memory_info": pmem(rss=584544256, vms=14091272192, shared=108994560, text=643072, lib=0, data=1779023872, dirty=0),
+ "memory_percent": 7.471564954935853,
+ "name": "firefox",
+ "nice": 0,
+ "num_threads": 177,
+ "pid": 7195,
+ "status": "S",
+ "time_since_update": 1,
+ "username": "nicolargo"},
+ {"cmdline": ["/snap/firefox/3206/usr/lib/firefox/firefox",
"-contentproc",
"-childID",
- "2",
+ "3",
"-isForBrowser",
"-prefsLen",
- "35837",
+ "41102",
"-prefMapSize",
- "231968",
+ "234514",
"-jsInitLen",
"234236",
"-parentBuildID",
@@ -755,36 +831,21 @@ Get top 2 processes of the processlist plugin::
"/snap/firefox/3206/usr/lib/firefox/browser/omni.ja",
"-appDir",
"/snap/firefox/3206/usr/lib/firefox/browser",
- "{e8cdf5ea-b126-4cf3-8a2c-4ecf8bfa42cb}",
- "6779",
+ "{912ef42c-455b-4ef1-acbb-dbd1bb6d42d4}",
+ "7195",
"true",
"tab"],
"cpu_percent": 0.0,
- "cpu_times": pcputimes(user=223.59, system=25.59, children_user=0.0, children_system=0.0, iowait=0.0),
+ "cpu_times": pcputimes(user=2650.06, system=226.04, children_user=0.0, children_system=0.0, iowait=0.0),
"gids": pgids(real=1000, effective=1000, saved=1000),
- "io_counters": [159959040, 0, 0, 0, 0],
+ "io_counters": [230234112, 0, 0, 0, 0],
"key": "pid",
- "memory_info": pmem(rss=512262144, vms=3362086912, shared=29282304, text=643072, lib=0, data=803278848, dirty=0),
- "memory_percent": 6.547664857818231,
+ "memory_info": pmem(rss=502042624, vms=3629031424, shared=67194880, text=643072, lib=0, data=1036189696, dirty=0),
+ "memory_percent": 6.417040347005715,
"name": "WebExtensions",
"nice": 0,
"num_threads": 20,
- "pid": 7049,
- "status": "S",
-