summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yml3
-rw-r--r--Makefile25
-rw-r--r--README.rst10
-rw-r--r--conf/glances.conf34
-rw-r--r--doc-requirements.txt1
-rwxr-xr-xdocker-compose/glances.conf38
-rw-r--r--docker-files/ubuntu.Dockerfile2
-rw-r--r--docs/Makefile2
-rw-r--r--docs/aoa/cpu.rst13
-rw-r--r--docs/aoa/wifi.rst4
-rw-r--r--docs/api.rst769
-rw-r--r--docs/man/glances.16
-rw-r--r--docs/quickstart.rst6
-rw-r--r--glances/__init__.py4
-rw-r--r--glances/exports/export.py2
-rw-r--r--glances/exports/glances_influxdb/__init__.py9
-rw-r--r--glances/exports/glances_influxdb2/__init__.py9
-rw-r--r--glances/globals.py6
-rw-r--r--glances/main.py17
-rw-r--r--glances/outputs/glances_bars.py2
-rw-r--r--glances/outputs/glances_curses.py80
-rw-r--r--glances/outputs/glances_restful_api.py57
-rw-r--r--glances/outputs/glances_stdout.py46
-rw-r--r--glances/outputs/static/README.md4
-rw-r--r--glances/outputs/static/js/components/plugin-alert.vue5
-rw-r--r--glances/outputs/static/js/components/plugin-ip.vue15
-rw-r--r--glances/outputs/static/js/components/plugin-now.vue11
-rw-r--r--glances/outputs/static/js/components/plugin-percpu.vue91
-rw-r--r--glances/outputs/static/js/components/plugin-quicklook.vue23
-rw-r--r--glances/outputs/static/js/components/plugin-wifi.vue10
-rw-r--r--glances/outputs/static/public/glances.js2
-rw-r--r--glances/plugins/alert/__init__.py10
-rw-r--r--glances/plugins/containers/engines/docker.py5
-rw-r--r--glances/plugins/containers/engines/podman.py7
-rw-r--r--glances/plugins/ip/__init__.py16
-rw-r--r--glances/plugins/network/__init__.py8
-rw-r--r--glances/plugins/now/__init__.py50
-rw-r--r--glances/plugins/percpu/__init__.py48
-rw-r--r--glances/plugins/plugin/model.py4
-rw-r--r--glances/plugins/plugin/view.py443
-rw-r--r--glances/plugins/processcount/__init__.py1
-rw-r--r--glances/plugins/processlist/__init__.py6
-rw-r--r--glances/plugins/quicklook/__init__.py90
-rw-r--r--glances/plugins/sensors/__init__.py8
-rw-r--r--glances/plugins/wifi/__init__.py134
-rw-r--r--glances/processes.py24
-rw-r--r--glances/standalone.py2
-rw-r--r--glances/webserver.py1
-rw-r--r--optional-requirements.txt3
49 files changed, 1054 insertions, 1112 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 36fc816f..541c2336 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -8,7 +8,8 @@ env:
DEFAULT_DOCKER_IMAGE: nicolargo/glances
NODE_ENV: ${{ (contains('refs/heads/master', github.ref) || startsWith(github.ref, 'refs/tags/v')) && 'prod' || 'dev' }}
PUSH_BRANCH: ${{ 'refs/heads/develop' == github.ref || 'refs/heads/master' == github.ref || startsWith(github.ref, 'refs/tags/v') }}
- DOCKER_PLATFORMS: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386
+ # Alpine image do not support linux/arm/v6 and linux/arm/v6 - See issue #2735
+ DOCKER_PLATFORMS: linux/amd64,linux/arm64,linux/386
# Ubuntu image only support linux/amd64 and linux/arm64 - See issue #2185
DOCKER_PLATFORMS_UBUNTU: linux/amd64,linux/arm64
diff --git a/Makefile b/Makefile
index b5aa1388..e49c5301 100644
--- a/Makefile
+++ b/Makefile
@@ -188,14 +188,26 @@ snapcraft:
docker: docker-alpine docker-ubuntu ## Generate local docker images
-docker-alpine: ## Generate local docker images (Alpine)
+docker-alpine: docker-alpine-full docker-alpine-minimal docker-alpine-dev ## Generate local docker images (Alpine)
+
+docker-alpine-full: ## Generate local docker image (Alpine full)
docker build --target full -f ./docker-files/alpine.Dockerfile -t glances:local-alpine-full .
+
+docker-alpine-minimal: ## Generate local docker image (Alpine minimal)
docker build --target minimal -f ./docker-files/alpine.Dockerfile -t glances:local-alpine-minimal .
+
+docker-alpine-dev: ## Generate local docker image (Alpine dev)
docker build --target dev -f ./docker-files/alpine.Dockerfile -t glances:local-alpine-dev .
-docker-ubuntu: ## Generate local docker images (Ubuntu)
+docker-ubuntu: docker-ubuntu-full docker-ubuntu-minimal docker-ubuntu-dev ## Generate local docker images (Ubuntu)
+
+docker-ubuntu-full: ## Generate local docker image (Ubuntu full)
docker build --target full -f ./docker-files/ubuntu.Dockerfile -t glances:local-ubuntu-full .
+
+docker-ubuntu-minimal: ## Generate local docker image (Ubuntu minimal)
docker build --target minimal -f ./docker-files/ubuntu.Dockerfile -t glances:local-ubuntu-minimal .
+
+docker-ubuntu-dev: ## Generate local docker image (Ubuntu dev)
docker build --target dev -f ./docker-files/ubuntu.Dockerfile -t glances:local-ubuntu-dev .
# ===================================================================
@@ -211,6 +223,9 @@ run-debug: ## Start Glances in debug console mode (also called standalone)
run-local-conf: ## Start Glances in console mode with the system conf file
./venv/bin/python -m glances
+run-local-conf-hide-public: ## Start Glances in console mode with the system conf file and hide public information
+ ./venv/bin/python -m glances --hide-public-info
+
run-min: ## Start minimal Glances in console mode (also called standalone)
./venv-min/bin/python -m glances -C ./conf/glances.conf
@@ -241,6 +256,12 @@ run-docker-ubuntu-dev: ## Start Glances Ubuntu Docker dev in console mode
run-webserver: ## Start Glances in Web server mode
./venv/bin/python -m glances -C ./conf/glances.conf -w
+run-webserver-local-conf: ## Start Glances in Web server mode with the system conf file
+ ./venv/bin/python -m glances -w
+
+run-webserver-local-conf-hide-public: ## Start Glances in Web server mode with the system conf file and hide public info
+ ./venv/bin/python -m glances -w --hide-public-info
+
run-restapiserver: ## Start Glances in REST API server mode
./venv/bin/python -m glances -C ./conf/glances.conf -w --disable-webui
diff --git a/README.rst b/README.rst
index 5c86f7dc..4d80de92 100644
--- a/README.rst
+++ b/README.rst
@@ -201,8 +201,8 @@ or
*Note*: This is only supported on some GNU/Linux distributions and Mac OS X.
If you want to support other distributions, please contribute to `glancesautoinstall`_.
-Docker: the fun way
--------------------
+Docker: the cloudy way
+----------------------
Glances Docker images are availables. You can use it to monitor your
server and all your containers !
@@ -268,7 +268,8 @@ may not be the latest version and only basics plugins are enabled.
Note: The Debian package (and all other Debian-based distributions) do
not include anymore the JS statics files used by the Web interface
(see ``issue2021``). If you want to add it to your Glances installation,
-follow the instructions: ``issue2021comment``.
+follow the instructions: ``issue2021comment``. In Glances version 4 and
+higher, the path to the statics file is configurable (see ``issue2612``).
FreeBSD
-------
@@ -490,6 +491,7 @@ Glances is distributed under the LGPL version 3 license. See ``COPYING`` for mor
.. _package: https://repology.org/project/glances/versions
.. _sponsors: https://github.com/sponsors/nicolargo
.. _wishlist: https://www.amazon.fr/hz/wishlist/ls/BWAAQKWFR3FI?ref_=wl_share
-.. _issue2021: https://github.com/nicolargo/glances/issues/2021#issuecomment-1197831157
+.. _issue2021: https://github.com/nicolargo/glances/issues/2021
.. _issue2021comment: https://github.com/nicolargo/glances/issues/2021#issuecomment-1197831157
+.. _issue2612: https://github.com/nicolargo/glances/issues/2612
.. _Docker: https://github.com/nicolargo/glances/blob/develop/docs/docker.rst
diff --git a/conf/glances.conf b/conf/glances.conf
index e11d3448..10f48a6d 100644
--- a/conf/glances.conf
+++ b/conf/glances.conf
@@ -27,13 +27,20 @@ history_size=1200
separator=True
# Set the the Curses and WebUI interface left menu plugin list (comma-separated)
#left_menu=network,wifi,connections,ports,diskio,fs,irq,folders,raid,smart,sensors,now
-# Limit the number of processes to display (for the WebUI)
+# Limit the number of processes to display (in the WebUI)
max_processes_display=25
-# Set the URL prefix (for the WebUI and the API)
+# Set URL prefix for the WebUI and the API
# Example: url_prefix=/glances/ => http://localhost/glances/
-# The final / is mandatory
+# Note: The final / is mandatory
# Default is no prefix (/)
#url_prefix=/glances/
+# Set root path for WebUI statics files
+# Why ? On Debian system, WebUI statics files are not provided.
+# You can download it in a specific folder
+# thanks to https://github.com/nicolargo/glances/issues/2021
+# then configure this folder with the webui_root_path key
+# Default is folder where glances_restfull_api.py is hosted
+#webui_root_path=
##############################################################################
# plugins
@@ -110,13 +117,18 @@ steal_critical=90
#steal_log=True
#
# Context switch limit (core / second)
-# Leave commented to just use the default config (critical is 50000*# (Logical CPU cores)
+# Leave commented to just use the default config critical is 50000*(Logical CPU cores)
#ctx_switches_careful=10000
#ctx_switches_warning=12000
#ctx_switches_critical=14000
[percpu]
disable=False
+# Define the maximum number of CPU displayed at a time
+# If the number of CPU is higher than the one configured in max_cpu_display then:
+# - display top 'max_cpu_display' (sorted by CPU consumption)
+# - a last line will be added with the mean of all other CPUs
+max_cpu_display=4
# Define CPU thresholds in %
# Default values if not defined: 50/70/90
user_careful=50
@@ -236,7 +248,7 @@ nf_conntrack_percent_critical=90
[wifi]
disable=False
-# Define SIGNAL thresholds in db (lower is better...)
+# Define SIGNAL thresholds in dBm (lower is better...)
# Based on: http://serverfault.com/questions/501025/industry-standard-for-minimum-wifi-signal-strength
careful=-65
warning=-75
@@ -255,7 +267,7 @@ hide=loop.*,/dev/loop.*
[fs]
disable=False
# Define the list of file system to hide (comma-separated regexp)
-hide=/boot.*,/snap.*
+hide=/boot.*,.*/snap.*
# Define the list of file system to show (comma-separated regexp)
#show=/,/srv
# Define filesystem space thresholds in %
@@ -323,8 +335,10 @@ port=7634
disable=False
# By default refresh every refresh time * 2
#refresh=6
-# Hide some sensors
-#hide=ambient
+# Hide some sensors (comma separated list of regexp)
+hide=unknown.*
+# Show only the following sensors (comma separated list of regexp)
+#show=CPU.*
# Sensors core thresholds (in Celsius...)
# Default values are grabbed from the system
#temperature_core_careful=45
@@ -536,7 +550,7 @@ db=glances
#prefix=foo
# Following tags will be added for all measurements
# You can also use dynamic values.
-# Note: hostname is always added as a tag
+# Note: hostname and name (for process) are always added as a tag
#tags=foo:bar,spam:eggs,domain:`domainname`
[influxdb2]
@@ -559,7 +573,7 @@ token=EjFUTWe8U-MIseEAkaVIgVnej_TrnbdvEcRkaB1imstW7gapSqy6_6-8XD-yd51V0zUUpDy-kA
#prefix=foo
# Following tags will be added for all measurements
# You can also use dynamic values.
-# Note: hostname is always added as a tag
+# Note: hostname and name (for process) are always added as a tag
#tags=foo:bar,spam:eggs,domain:`domainname`
[cassandra]
diff --git a/doc-requirements.txt b/doc-requirements.txt
index f5d4f9f4..65a52334 100644
--- a/doc-requirements.txt
+++ b/doc-requirements.txt
@@ -1,4 +1,5 @@
sphinx
sphinx_rtd_theme
+ujson
reuse
setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability \ No newline at end of file
diff --git a/docker-compose/glances.conf b/docker-compose/glances.conf
index 5efb266e..24868117 100755
--- a/docker-compose/glances.conf
+++ b/docker-compose/glances.conf
@@ -27,13 +27,20 @@ history_size=1200
separator=True
# Set the the Curses and WebUI interface left menu plugin list (comma-separated)
#left_menu=network,wifi,connections,ports,diskio,fs,irq,folders,raid,smart,sensors,now
-# Limit the number of processes to display (for the WebUI)
+# Limit the number of processes to display (in the WebUI)
max_processes_display=25
-# Set the URL prefix (for the WebUI and the API)
+# Set URL prefix for the WebUI and the API
# Example: url_prefix=/glances/ => http://localhost/glances/
-# The final / is mandatory
+# Note: The final / is mandatory
# Default is no prefix (/)
#url_prefix=/glances/
+# Set root path for WebUI statics files
+# Why ? On Debian system, WebUI statics files are not provided.
+# You can download it in a specific folder
+# thanks to https://github.com/nicolargo/glances/issues/2021
+# then configure this folder with the webui_root_path key
+# Default is folder where glances_restfull_api.py is hosted
+#webui_root_path=
##############################################################################
# plugins
@@ -110,13 +117,18 @@ steal_critical=90
#steal_log=True
#
# Context switch limit (core / second)
-# Leave commented to just use the default config (critical is 50000*# (Logical CPU cores)
+# Leave commented to just use the default config critical is 50000*(Logical CPU cores)
#ctx_switches_careful=10000
#ctx_switches_warning=12000
#ctx_switches_critical=14000
[percpu]
disable=False
+# Define the maximum number of CPU displayed at a time
+# If the number of CPU is higher than the one configured in max_cpu_display then:
+# - display top 'max_cpu_display' (sorted by CPU consumption)
+# - a last line will be added with the mean of all other CPUs
+max_cpu_display=4
# Define CPU thresholds in %
# Default values if not defined: 50/70/90
user_careful=50
@@ -236,7 +248,7 @@ nf_conntrack_percent_critical=90
[wifi]
disable=False
-# Define SIGNAL thresholds in db (lower is better...)
+# Define SIGNAL thresholds in dBm (lower is better...)
# Based on: http://serverfault.com/questions/501025/industry-standard-for-minimum-wifi-signal-strength
careful=-65
warning=-75
@@ -249,13 +261,13 @@ disable=False
hide=loop.*,/dev/loop.*
# Define the list of disks to be show (comma-separated)
#show=sda.*
-# Alias for sda1
-#sda1_alias=InternalDisk
+# Alias for sda1 and sdb1
+#alias=sda1:SystemDisk,sdb1:DataDisk
[fs]
disable=False
# Define the list of file system to hide (comma-separated regexp)
-hide=/boot.*,/snap.*
+hide=/boot.*,.*/snap.*
# Define the list of file system to show (comma-separated regexp)
#show=/,/srv
# Define filesystem space thresholds in %
@@ -323,8 +335,10 @@ port=7634
disable=False
# By default refresh every refresh time * 2
#refresh=6
-# Hide some sensors
-#hide=ambient
+# Hide some sensors (comma separated list of regexp)
+hide=unknown.*
+# Show only the following sensors (comma separated list of regexp)
+#show=CPU.*
# Sensors core thresholds (in Celsius...)
# Default values are grabbed from the system
#temperature_core_careful=45
@@ -536,7 +550,7 @@ db=glances
#prefix=foo
# Following tags will be added for all measurements
# You can also use dynamic values.
-# Note: hostname is always added as a tag
+# Note: hostname and name (for process) are always added as a tag
#tags=foo:bar,spam:eggs,domain:`domainname`
[influxdb2]
@@ -559,7 +573,7 @@ token=EjFUTWe8U-MIseEAkaVIgVnej_TrnbdvEcRkaB1imstW7gapSqy6_6-8XD-yd51V0zUUpDy-kA
#prefix=foo
# Following tags will be added for all measurements
# You can also use dynamic values.
-# Note: hostname is always added as a tag
+# Note: hostname and name (for process) are always added as a tag
#tags=foo:bar,spam:eggs,domain:`domainname`
[cassandra]
diff --git a/docker-files/ubuntu.Dockerfile b/docker-files/ubuntu.Dockerfile
index 4067d93d..19bcc39c 100644
--- a/docker-files/ubuntu.Dockerfile
+++ b/docker-files/ubuntu.Dockerfile
@@ -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=23.04
+ARG IMAGE_VERSION=23.10
ARG PYTHON_VERSION=3.11
##############################################################################
diff --git a/docs/Makefile b/docs/Makefile
index 75bae57f..637331bd 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -3,7 +3,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
-SPHINXBUILD = ../venv/bin/sphinx-build
+SPHINXBUILD = ../venv-dev/bin/sphinx-build
PAPER =
BUILDDIR = _build
diff --git a/docs/aoa/cpu.rst b/docs/aoa/cpu.rst
index 0d221643..1124663c 100644
--- a/docs/aoa/cpu.rst
+++ b/docs/aoa/cpu.rst
@@ -53,6 +53,19 @@ To switch to per-CPU stats, just hit the ``1`` key:
.. image:: ../_static/per-cpu.png
In this case, Glances will show on line per logical CPU on the system.
+If you have multiple core, it is possible to define the maximun number
+of CPU to display. The top 'max_cpu_display' will be display and an
+extra line with the mean of all others CPU will be added.
+
+.. code-block:: ini
+
+ [percpu]
+ # Define the maximum number of CPU display at a time
+ # If the number of CPU is higher than:
+ # - display the top 'max_cpu_display' (sorted by CPU consumption)
+ # - a last line will be added with the sum of all other CPUs
+ max_cpu_display=4
+
Logical cores means the number of physical cores multiplied by the number
of threads that can run on each core (this is known as Hyper Threading).
diff --git a/docs/aoa/wifi.rst b/docs/aoa/wifi.rst
index 2624b083..31222290 100644
--- a/docs/aoa/wifi.rst
+++ b/docs/aoa/wifi.rst
@@ -3,9 +3,7 @@
Wi-Fi
=====
-*Availability: Linux only*
-
-*Dependency: this plugin uses the optional wifi Python lib*
+*Availability: Linux (with an /proc/net/wireless file) only*
.. image:: ../_static/wifi.png
diff --git a/docs/api.rst b/docs/api.rst
index f1fd5a5b..e5774d95 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -141,7 +141,7 @@ Get plugin stats::
"refresh": 3.0,
"regex": True,
"result": None,
- "timer": 1.0572876930236816},
+ "timer": 0.4298982620239258},
{"count": 0,
"countmax": 20.0,
"countmin": None,
@@ -150,7 +150,7 @@ Get plugin stats::
"refresh": 3.0,
"regex": True,
"result": None,
- "timer": 1.0569162368774414}]
+ "timer": 0.42979884147644043}]
Fields descriptions:
@@ -178,7 +178,7 @@ Get a specific item when field matches the given value::
"refresh": 3.0,
"regex": True,
"result": None,
- "timer": 1.0572876930236816}]}
+ "timer": 0.4298982620239258}]}
GET cloud
---------
@@ -219,25 +219,7 @@ GET containers
Get plugin stats::
# curl http://localhost:61208/api/4/containers
- [{"command": "/portainer",
- "cpu": {"total": 0.0},
- "cpu_percent": 0.0,
- "created": "2022-10-29T14:59:10.266701439Z",
- "engine": "docker",
- "id": "3abd51c615968482d9ccff5afc629f267f6dda113ed68b75b432615fae3b49fb",
- "image": ["portainer/portainer-ce:2.9.3"],
- "io": {"cumulative_ior": 31543296, "cumulative_iow": 6189056},
- "key": "name",
- "memory": {"cache": None,
- "limit": 7823499264,
- "max_usage": None,
- "rss": None,
- "usage": 21929984},
- "memory_usage": 21929984,
- "name": "portainer",
- "network": {"cumulative_rx": 809260, "cumulative_tx": 0},
- "status": "running",
- "uptime": "yesterday"}]
+ []
Fields descriptions:
@@ -258,41 +240,13 @@ Fields descriptions:
* **pod_name**: Pod name (only with Podman) (unit is *None*)
* **pod_id**: Pod ID (only with Podman) (unit is *None*)
-Get a specific field::
-
- # curl http://localhost:61208/api/4/containers/name
- {"name": ["portainer"]}
-
-Get a specific item when field matches the given value::
-
- # curl http://localhost:61208/api/4/containers/name/portainer
- {"portainer": [{"command": "/portainer",
- "cpu": {"total": 0.0},
- "cpu_percent": 0.0,
- "created": "2022-10-29T14:59:10.266701439Z",
- "engine": "docker",
- "id": "3abd51c615968482d9ccff5afc629f267f6dda113ed68b75b432615fae3b49fb",
- "image": ["portainer/portainer-ce:2.9.3"],
- "io": {"cumulative_ior": 31543296, "cumulative_iow": 6189056},
- "key": "name",
- "memory": {"cache": None,
- "limit": 7823499264,
- "max_usage": None,
- "rss": None,
- "usage": 21929984},
- "memory_usage": 21929984,
- "name": "portainer",
- "network": {"cumulative_rx": 809260, "cumulative_tx": 0},
- "status": "running",
- "uptime": "yesterday"}]}
-
GET core
--------
Get plugin stats::
# curl http://localhost:61208/api/4/core
- {"log": 4, "phys": 2}
+ {"log": 16, "phys": 10}
Fields descriptions:
@@ -302,7 +256,7 @@ Fields descriptions:
Get a specific field::
# curl http://localhost:61208/api/4/core/phys
- {"phys": 2}
+ {"phys": 10}
GET cpu
-------
@@ -310,20 +264,20 @@ GET cpu
Get plugin stats::
# curl http://localhost:61208/api/4/cpu
- {"cpucore": 4,
- "ctx_switches": 49762424,
+ {"cpucore": 16,
+ "ctx_switches": 60035404,
"guest": 0.0,
- "idle": 69.2,
- "interrupts": 21528778,
- "iowait": 1.7,
+ "idle": 93.2,
+ "interrupts": 52181153,
+ "iowait": 0.2,
"irq": 0.0,
"nice": 0.0,
- "soft_interrupts": 14048210,
+ "soft_interrupts": 18620599,
"steal": 0.0,
"syscalls": 0,
- "system": 5.6,
- "total": 29.1,
- "user": 23.2}
+ "system": 3.3,
+ "total": 6.6,
+ "user": 3.4}
Fields descriptions:
@@ -356,7 +310,7 @@ Fields descriptions:
Get a specific field::
# curl http://localhost:61208/api/4/cpu/total
- {"total": 29.1}
+ {"total": 6.6}
GET diskio
----------
@@ -364,18 +318,18 @@ GET diskio
Get plugin stats::
# curl http://localhost:61208/api/4/diskio
- [{"disk_name": "sda",
+ [{"disk_name": "nvme0n1",
"key": "disk_name",
- "read_bytes": 5258122240,
- "read_count": 180256,
- "write_bytes": 4720267264,
- "write_count": 137068},
- {"disk_name": "sda1",
+ "read_bytes": 4044614144,
+ "read_count": 131487,
+ "write_bytes": 62513415168,
+ "write_count": 580555},
+ {"disk_name": "nvme0n1p1",
"key": "disk_name",
- "read_bytes": 3715072,
- "read_count": 123,
- "write_bytes": 0,
- "write_count": 19}]
+ "read_bytes": 7476224,
+ "read_count": 576,
+ "write_bytes": 1024,
+ "write_count": 2}]
Fields descriptions:
@@ -397,17 +351,22 @@ Fields descriptions:
Get a specific field::
# curl http://localhost:61208/api/4/diskio/disk_name
- {"disk_name": ["sda", "sda1", "sda2", "sda5", "dm-0", "dm-1"]}
+ {"disk_name": ["nvme0n1",
+ "nvme0n1p1",
+ "nvme0n1p2",
+ "nvme0n1p3",
+ "dm-0",
+ "dm-1"]}
Get a specific item when field matches the given value::
- # curl http://localhost:61208/api/4/diskio/disk_name/sda
- {"sda": [{"disk_name": "sda",
- "key": "disk_name",
- "read_bytes": 5258122240,
- "read_count": 180256,
- "write_bytes": 4720267264,
- "write_count": 137068}]}
+ # curl http://localhost:61208/api/4/diskio/disk_name/nvme0n1
+ {"nvme0n1": [{"disk_name": "nvme0n1",
+ "key": "disk_name",
+ "read_bytes": 4044614144,
+ "read_count": 131487,
+ "write_bytes": 62513415168,
+ "write_count": 580555}]}
GET folders
-----------
@@ -433,22 +392,14 @@ GET fs
Get plugin stats::
# curl http://localhost:61208/api/4/fs
- [{"device_name": "/dev/mapper/ubuntu--gnome--vg-root",
- "free": 36169797632,
+ [{"device_name": "/dev/mapper/ubuntu--vg-ubuntu--lv",
+ "free": 929623175168,
"fs_type": "ext4",
"key": "mnt_point",
"mnt_point": "/",
- "percent": 84.3,
- "size": 243334156288,
- "used": 194776903680},
- {"device_name": "zsfpool",
- "free": 31195136,
- "fs_type": "zfs",
- "key": "mnt_point",
- "mnt_point": "/zsfpool",
- "percent": 25.4,
- "size": 41811968,
- "used": 10616832}]
+ "percent": 2.4,
+ "size": 1003736440832,
+ "used": 23050760192}]
Fields descriptions:
@@ -463,19 +414,19 @@ Fields descriptions:
Get a specific field::
# curl http://localhost:61208/api/4/fs/mnt_point
- {"mnt_point": ["/", "/zsfpool", "/var/snap/firefox/common/host-hunspell"]}
+ {"mnt_point": ["/"]}
Get a specific item when field matc