mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-24 05:15:47 +03:00
Quicklook plugin lst is also configurable and taken into account in the WebUI
This commit is contained in:
parent
5092475d7f
commit
1623c27f4e
@ -61,7 +61,7 @@ swap_careful=50
|
||||
swap_warning=70
|
||||
swap_critical=90
|
||||
# Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages
|
||||
# With 1 CPU core, the load should be lower than 1.00 (100%)
|
||||
# With 1 CPU core, the load should be lower than 1.00 ~ 100%
|
||||
load_careful=70
|
||||
load_warning=100
|
||||
load_critical=500
|
||||
|
@ -4,7 +4,7 @@ Quick Look
|
||||
==========
|
||||
|
||||
The ``quicklook`` plugin is only displayed on wide screen and proposes a
|
||||
bar view for CPU and memory (virtual and swap).
|
||||
bar view for cpu, memory, swap and load (this list is configurable).
|
||||
|
||||
In the terminal interface, click on ``3`` to enable/disable it.
|
||||
|
||||
@ -27,10 +27,14 @@ client/server mode (see issue ).
|
||||
Limit values can be overwritten in the configuration file under
|
||||
the ``[quicklook]`` section.
|
||||
|
||||
You can also configure the percentage char used in the terminal user interface.
|
||||
You can also configure the stats list and the bat character used in the
|
||||
user interface.
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[quicklook]
|
||||
# Stats list (default is cpu,mem,load)
|
||||
# Available stats are: cpu,mem,load,swap
|
||||
list=cpu,mem,load
|
||||
# Graphical percentage char used in the terminal user interface (default is |)
|
||||
percentage_char=@
|
||||
bar_char=|
|
||||
|
418
docs/api.rst
418
docs/api.rst
@ -109,16 +109,16 @@ GET alert
|
||||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/alert
|
||||
[{"avg": 75.58190732727591,
|
||||
"begin": 1705242982.0,
|
||||
[{"avg": 81.2863503930515,
|
||||
"begin": 1706434886.0,
|
||||
"count": 1,
|
||||
"desc": "",
|
||||
"end": -1,
|
||||
"max": 75.58190732727591,
|
||||
"min": 75.58190732727591,
|
||||
"max": 81.2863503930515,
|
||||
"min": 81.2863503930515,
|
||||
"sort": "memory_percent",
|
||||
"state": "WARNING",
|
||||
"sum": 75.58190732727591,
|
||||
"sum": 81.2863503930515,
|
||||
"top": [],
|
||||
"type": "MEM"}]
|
||||
|
||||
@ -140,21 +140,21 @@ Fields descriptions:
|
||||
Get a specific field::
|
||||
|
||||
# curl http://localhost:61208/api/4/alert/begin
|
||||
{"begin": [1705242982.0]}
|
||||
{"begin": [1706434886.0]}
|
||||
|
||||
Get a specific item when field matches the given value::
|
||||
|
||||
# curl http://localhost:61208/api/4/alert/begin/1705242982.0
|
||||
{"1705242982.0": [{"avg": 75.58190732727591,
|
||||
"begin": 1705242982.0,
|
||||
# curl http://localhost:61208/api/4/alert/begin/1706434886.0
|
||||
{"1706434886.0": [{"avg": 81.2863503930515,
|
||||
"begin": 1706434886.0,
|
||||
"count": 1,
|
||||
"desc": "",
|
||||
"end": -1,
|
||||
"max": 75.58190732727591,
|
||||
"min": 75.58190732727591,
|
||||
"max": 81.2863503930515,
|
||||
"min": 81.2863503930515,
|
||||
"sort": "memory_percent",
|
||||
"state": "WARNING",
|
||||
"sum": 75.58190732727591,
|
||||
"sum": 81.2863503930515,
|
||||
"top": [],
|
||||
"type": "MEM"}]}
|
||||
|
||||
@ -172,7 +172,7 @@ Get plugin stats::
|
||||
"refresh": 3.0,
|
||||
"regex": True,
|
||||
"result": None,
|
||||
"timer": 0.19934892654418945},
|
||||
"timer": 0.36128687858581543},
|
||||
{"count": 0,
|
||||
"countmax": 20.0,
|
||||
"countmin": None,
|
||||
@ -181,7 +181,7 @@ Get plugin stats::
|
||||
"refresh": 3.0,
|
||||
"regex": True,
|
||||
"result": None,
|
||||
"timer": 0.19925165176391602}]
|
||||
"timer": 0.36110568046569824}]
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
@ -209,7 +209,7 @@ Get a specific item when field matches the given value::
|
||||
"refresh": 3.0,
|
||||
"regex": True,
|
||||
"result": None,
|
||||
"timer": 0.19934892654418945}]}
|
||||
"timer": 0.36128687858581543}]}
|
||||
|
||||
GET connections
|
||||
---------------
|
||||
@ -243,8 +243,8 @@ Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/containers
|
||||
[{"command": "top",
|
||||
"cpu": {"total": 1.8635523677666806e-06},
|
||||
"cpu_percent": 1.8635523677666806e-06,
|
||||
"cpu": {"total": 2.4258436881746593e-06},
|
||||
"cpu_percent": 2.4258436881746593e-06,
|
||||
"created": "2023-12-09T10:45:34.339489876+01:00",
|
||||
"engine": "podman",
|
||||
"id": "481d6ffb7eef284d062628cf350bdd9ce0a803db8a2a505d75565ed24322b714",
|
||||
@ -253,8 +253,8 @@ Get plugin stats::
|
||||
"io_rx": 0.0,
|
||||
"io_wx": 0.0,
|
||||
"key": "name",
|
||||
"memory": {"limit": 7823585280.0, "usage": 1306624.0},
|
||||
"memory_usage": 1306624.0,
|
||||
"memory": {"limit": 7823585280.0, "usage": 1212416.0},
|
||||
"memory_usage": 1212416.0,
|
||||
"name": "sad_darwin",
|
||||
"network": {"rx": 0.0, "time_since_update": 1, "tx": 0.0},
|
||||
"network_rx": 0.0,
|
||||
@ -264,8 +264,8 @@ Get plugin stats::
|
||||
"status": "running",
|
||||
"uptime": "1 months"},
|
||||
{"command": "",
|
||||
"cpu": {"total": 3.4505346487574547e-10},
|
||||
"cpu_percent": 3.4505346487574547e-10,
|
||||
"cpu": {"total": 3.5348550629383954e-10},
|
||||
"cpu_percent": 3.5348550629383954e-10,
|
||||
"created": "2022-10-22T14:23:03.120912374+02:00",
|
||||
"engine": "podman",
|
||||
"id": "9491515251edcd5bb5dc17205d7ee573c0be96fe0b08b0a12a7e2cea874565ea",
|
||||
@ -274,8 +274,8 @@ Get plugin stats::
|
||||
"io_rx": 0.0,
|
||||
"io_wx": 0.0,
|
||||
"key": "name",
|
||||
"memory": {"limit": 7823585280.0, "usage": 290816.0},
|
||||
"memory_usage": 290816.0,
|
||||
"memory": {"limit": 7823585280.0, "usage": 237568.0},
|
||||
"memory_usage": 237568.0,
|
||||
"name": "8d0f1c783def-infra",
|
||||
"network": {"rx": 0.0, "time_since_update": 1, "tx": 0.0},
|
||||
"network_rx": 0.0,
|
||||
@ -313,8 +313,8 @@ Get a specific item when field matches the given value::
|
||||
|
||||
# curl http://localhost:61208/api/4/containers/name/sad_darwin
|
||||
{"sad_darwin": [{"command": "top",
|
||||
"cpu": {"total": 1.8635523677666806e-06},
|
||||
"cpu_percent": 1.8635523677666806e-06,
|
||||
"cpu": {"total": 2.4258436881746593e-06},
|
||||
"cpu_percent": 2.4258436881746593e-06,
|
||||
"created": "2023-12-09T10:45:34.339489876+01:00",
|
||||
"engine": "podman",
|
||||
"id": "481d6ffb7eef284d062628cf350bdd9ce0a803db8a2a505d75565ed24322b714",
|
||||
@ -323,8 +323,8 @@ Get a specific item when field matches the given value::
|
||||
"io_rx": 0.0,
|
||||
"io_wx": 0.0,
|
||||
"key": "name",
|
||||
"memory": {"limit": 7823585280.0, "usage": 1306624.0},
|
||||
"memory_usage": 1306624.0,
|
||||
"memory": {"limit": 7823585280.0, "usage": 1212416.0},
|
||||
"memory_usage": 1212416.0,
|
||||
"name": "sad_darwin",
|
||||
"network": {"rx": 0.0, "time_since_update": 1, "tx": 0.0},
|
||||
"network_rx": 0.0,
|
||||
@ -362,7 +362,7 @@ Get plugin stats::
|
||||
"ctx_switches": 0,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 74.6,
|
||||
"idle": 43.4,
|
||||
"interrupts": 0,
|
||||
"iowait": 0.0,
|
||||
"irq": 0.0,
|
||||
@ -371,10 +371,10 @@ Get plugin stats::
|
||||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"syscalls": 0,
|
||||
"system": 3.3,
|
||||
"system": 7.8,
|
||||
"time_since_update": 1,
|
||||
"total": 25.4,
|
||||
"user": 22.1}
|
||||
"total": 56.6,
|
||||
"user": 48.8}
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
@ -397,7 +397,7 @@ Fields descriptions:
|
||||
Get a specific field::
|
||||
|
||||
# curl http://localhost:61208/api/4/cpu/total
|
||||
{"total": 25.4}
|
||||
{"total": 56.6}
|
||||
|
||||
GET diskio
|
||||
----------
|
||||
@ -454,13 +454,13 @@ Get plugin stats::
|
||||
# curl http://localhost:61208/api/4/fs
|
||||
[{"alias": "Root",
|
||||
"device_name": "/dev/mapper/ubuntu--gnome--vg-root",
|
||||
"free": 19083309056,
|
||||
"free": 17195761664,
|
||||
"fs_type": "ext4",
|
||||
"key": "mnt_point",
|
||||
"mnt_point": "/",
|
||||
"percent": 91.7,
|
||||
"percent": 92.6,
|
||||
"size": 243334156288,
|
||||
"used": 211863392256},
|
||||
"used": 213750939648},
|
||||
{"device_name": "zsfpool",
|
||||
"free": 31195136,
|
||||
"fs_type": "zfs",
|
||||
@ -490,13 +490,13 @@ Get a specific item when field matches the given value::
|
||||
# curl http://localhost:61208/api/4/fs/mnt_point//
|
||||
{"/": [{"alias": "Root",
|
||||
"device_name": "/dev/mapper/ubuntu--gnome--vg-root",
|
||||
"free": 19083309056,
|
||||
"free": 17195761664,
|
||||
"fs_type": "ext4",
|
||||
"key": "mnt_point",
|
||||
"mnt_point": "/",
|
||||
"percent": 91.7,
|
||||
"percent": 92.6,
|
||||
"size": 243334156288,
|
||||
"used": 211863392256}]}
|
||||
"used": 213750939648}]}
|
||||
|
||||
GET ip
|
||||
------
|
||||
@ -504,11 +504,11 @@ GET ip
|
||||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/ip
|
||||
{"address": "192.168.0.32",
|
||||
"gateway": "192.168.0.254",
|
||||
{"address": "192.168.1.14",
|
||||
"gateway": "192.168.1.1",
|
||||
"mask": "255.255.255.0",
|
||||
"mask_cidr": 24,
|
||||
"public_address": "91.166.228.228",
|
||||
"public_address": "92.151.148.66",
|
||||
"public_info_human": ""}
|
||||
|
||||
Fields descriptions:
|
||||
@ -523,7 +523,7 @@ Fields descriptions:
|
||||
Get a specific field::
|
||||
|
||||
# curl http://localhost:61208/api/4/ip/gateway
|
||||
{"gateway": "192.168.0.254"}
|
||||
{"gateway": "192.168.1.1"}
|
||||
|
||||
GET load
|
||||
--------
|
||||
@ -531,10 +531,7 @@ GET load
|
||||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/load
|
||||
{"cpucore": 4,
|
||||
"min1": 1.00927734375,
|
||||
"min15": 0.66259765625,
|
||||
"min5": 0.7548828125}
|
||||
{"cpucore": 4, "min1": 2.142578125, "min15": 2.2412109375, "min5": 2.296875}
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
@ -546,7 +543,7 @@ Fields descriptions:
|
||||
Get a specific field::
|
||||
|
||||
# curl http://localhost:61208/api/4/load/min1
|
||||
{"min1": 1.00927734375}
|
||||
{"min1": 2.142578125}
|
||||
|
||||
GET mem
|
||||
-------
|
||||
@ -554,16 +551,16 @@ GET mem
|
||||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/mem
|
||||
{"active": 2827825152,
|
||||
"available": 1910370304,
|
||||
"buffers": 442753024,
|
||||
"cached": 1887649792,
|
||||
"free": 1910370304,
|
||||
"inactive": 3567714304,
|
||||
"percent": 75.6,
|
||||
"shared": 457003008,
|
||||
{"active": 2943950848,
|
||||
"available": 1464078336,
|
||||
"buffers": 63561728,
|
||||
"cached": 1855676416,
|
||||
"free": 1464078336,
|
||||
"inactive": 3364462592,
|
||||
"percent": 81.3,
|
||||
"shared": 513527808,
|
||||
"total": 7823585280,
|
||||
"used": 5913214976}
|
||||
"used": 6359506944}
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
@ -590,13 +587,13 @@ GET memswap
|
||||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/memswap
|
||||
{"free": 3856048128,
|
||||
"percent": 52.3,
|
||||
"sin": 14772441088,
|
||||
"sout": 22269526016,
|
||||
{"free": 3434184704,
|
||||
"percent": 57.5,
|
||||
"sin": 21763555328,
|
||||
"sout": 30277906432,
|
||||
"time_since_update": 1,
|
||||
"total": 8082419712,
|
||||
"used": 4226371584}
|
||||
"used": 4648235008}
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
@ -620,26 +617,26 @@ Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/network
|
||||
[{"alias": None,
|
||||
"cumulative_cx": 2537577204,
|
||||
"cumulative_rx": 1268788602,
|
||||
"cumulative_tx": 1268788602,
|
||||
"cx": 0,
|
||||
"cumulative_cx": 2734623262,
|
||||
"cumulative_rx": 1367311631,
|
||||
"cumulative_tx": 1367311631,
|
||||
"cx": 576,
|
||||
"interface_name": "lo",
|
||||
"is_up": True,
|
||||
"key": "interface_name",
|
||||
"rx": 0,
|
||||
"rx": 288,
|
||||
"speed": 0,
|
||||
"time_since_update": 1,
|
||||
"tx": 0},
|
||||
"tx": 288},
|
||||
{"alias": "WIFI",
|
||||
"cumulative_cx": 14514673497,
|
||||
"cumulative_rx": 11339647204,
|
||||
"cumulative_tx": 3175026293,
|
||||
"cx": 224,
|
||||
"cumulative_cx": 16571979029,
|
||||
"cumulative_rx": 13260033314,
|
||||
"cumulative_tx": 3311945715,
|
||||
"cx": 186,
|
||||
"interface_name": "wlp2s0",
|
||||
"is_up": True,
|
||||
"key": "interface_name",
|
||||
"rx": 98,
|
||||
"rx": 60,
|
||||
"speed": 0,
|
||||
"time_since_update": 1,
|
||||
"tx": 126}]
|
||||
@ -666,24 +663,24 @@ Get a specific field::
|
||||
"br-40875d2e2716",
|
||||
"docker0",
|
||||
"br_grafana",
|
||||
"veth55598fc",
|
||||
"mpqemubr0"]}
|
||||
"mpqemubr0",
|
||||
"vethbeef843"]}
|
||||
|
||||
Get a specific item when field matches the given value::
|
||||
|
||||
# curl http://localhost:61208/api/4/network/interface_name/lo
|
||||
{"lo": [{"alias": None,
|
||||
"cumulative_cx": 2537577204,
|
||||
"cumulative_rx": 1268788602,
|
||||
"cumulative_tx": 1268788602,
|
||||
"cx": 0,
|
||||
"cumulative_cx": 2734623262,
|
||||
"cumulative_rx": 1367311631,
|
||||
"cumulative_tx": 1367311631,
|
||||
"cx": 576,
|
||||
"interface_name": "lo",
|
||||
"is_up": True,
|
||||
"key": "interface_name",
|
||||
"rx": 0,
|
||||
"rx": 288,
|
||||
"speed": 0,
|
||||
"time_since_update": 1,
|
||||
"tx": 0}]}
|
||||
"tx": 288}]}
|
||||
|
||||
GET now
|
||||
-------
|
||||
@ -691,7 +688,7 @@ GET now
|
||||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/now
|
||||
"2024-01-14 15:36:22 CET"
|
||||
"2024-01-28 10:41:26 CET"
|
||||
|
||||
GET percpu
|
||||
----------
|
||||
@ -700,19 +697,6 @@ Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/percpu
|
||||
[{"cpu_number": 0,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 20.0,
|
||||
"iowait": 0.0,
|
||||
"irq": 0.0,
|
||||
"key": "cpu_number",
|
||||
"nice": 0.0,
|
||||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"system": 2.0,
|
||||
"total": 80.0,
|
||||
"user": 9.0},
|
||||
{"cpu_number": 1,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 23.0,
|
||||
@ -722,9 +706,22 @@ Get plugin stats::
|
||||
"nice": 0.0,
|
||||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"system": 2.0,
|
||||
"system": 5.0,
|
||||
"total": 77.0,
|
||||
"user": 7.0}]
|
||||
"user": 22.0},
|
||||
{"cpu_number": 1,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 16.0,
|
||||
"iowait": 0.0,
|
||||
"irq": 0.0,
|
||||
"key": "cpu_number",
|
||||
"nice": 0.0,
|
||||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"system": 4.0,
|
||||
"total": 84.0,
|
||||
"user": 31.0}]
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
@ -753,12 +750,12 @@ Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/ports
|
||||
[{"description": "DefaultGateway",
|
||||
"host": "192.168.0.254",
|
||||
"host": "192.168.1.1",
|
||||
"indice": "port_0",
|
||||
"port": 0,
|
||||
"refresh": 30,
|
||||
"rtt_warning": None,
|
||||
"status": 0.005277,
|
||||
"status": 0.007028,
|
||||
"timeout": 3}]
|
||||
|
||||
Fields descriptions:
|
||||
@ -775,19 +772,19 @@ Fields descriptions:
|
||||
Get a specific field::
|
||||
|
||||
# curl http://localhost:61208/api/4/ports/host
|
||||
{"host": ["192.168.0.254"]}
|
||||
{"host": ["192.168.1.1"]}
|
||||
|
||||
Get a specific item when field matches the given value::
|
||||
|
||||
# curl http://localhost:61208/api/4/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.005277,
|
||||
"timeout": 3}]}
|
||||
# curl http://localhost:61208/api/4/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.007028,
|
||||
"timeout": 3}]}
|
||||
|
||||
GET processcount
|
||||
----------------
|
||||
@ -795,7 +792,7 @@ GET processcount
|
||||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/processcount
|
||||
{"pid_max": 0, "running": 1, "sleeping": 326, "thread": 1611, "total": 392}
|
||||
{"pid_max": 0, "running": 1, "sleeping": 336, "thread": 1717, "total": 412}
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
@ -808,7 +805,7 @@ Fields descriptions:
|
||||
Get a specific field::
|
||||
|
||||
# curl http://localhost:61208/api/4/processcount/total
|
||||
{"total": 392}
|
||||
{"total": 412}
|
||||
|
||||
GET psutilversion
|
||||
-----------------
|
||||
@ -824,25 +821,14 @@ GET quicklook
|
||||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/quicklook
|
||||
{"cpu": 25.4,
|
||||
"cpu_hz": 3000000000.0,
|
||||
"cpu_hz_current": 2723398750.0000005,
|
||||
{"cpu": 56.6,
|
||||
"cpu_hz": 2025000000.0,
|
||||
"cpu_hz_current": 1723932000.0,
|
||||
"cpu_name": "Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz",
|
||||
"mem": 75.6,
|
||||
"cpucore": 4,
|
||||
"load": 56.0,
|
||||
"mem": 81.3,
|
||||
"percpu": [{"cpu_number": 0,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 20.0,
|
||||
"iowait": 0.0,
|
||||
"irq": 0.0,
|
||||
"key": "cpu_number",
|
||||
"nice": 0.0,
|
||||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"system": 2.0,
|
||||
"total": 80.0,
|
||||
"user": 9.0},
|
||||
{"cpu_number": 1,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 23.0,
|
||||
@ -852,50 +838,64 @@ Get plugin stats::
|
||||
"nice": 0.0,
|
||||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"system": 2.0,
|
||||
"system": 5.0,
|
||||
"total": 77.0,
|
||||
"user": 7.0},
|
||||
"user": 22.0},
|
||||
{"cpu_number": 1,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 16.0,
|
||||
"iowait": 0.0,
|
||||
"irq": 0.0,
|
||||
"key": "cpu_number",
|
||||
"nice": 0.0,
|
||||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"system": 4.0,
|
||||
"total": 84.0,
|
||||
"user": 31.0},
|
||||
{"cpu_number": 2,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 21.0,
|
||||
"idle": 27.0,
|
||||
"iowait": 0.0,
|
||||
"irq": 0.0,
|
||||
"key": "cpu_number",
|
||||
"nice": 0.0,
|
||||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"system": 1.0,
|
||||
"total": 79.0,
|
||||
"user": 9.0},
|
||||
"system": 4.0,
|
||||
"total": 73.0,
|
||||
"user": 21.0},
|
||||
{"cpu_number": 3,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 28.0,
|
||||
"idle": 24.0,
|
||||
"iowait": 0.0,
|
||||
"irq": 0.0,
|
||||
"key": "cpu_number",
|
||||
"nice": 0.0,
|
||||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"system": 1.0,
|
||||
"total": 72.0,
|
||||
"user": 3.0}],
|
||||
"swap": 52.3}
|
||||
"system": 3.0,
|
||||
"total": 76.0,
|
||||
"user": 25.0}],
|
||||
"swap": 57.5}
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
* **cpu**: CPU percent usage (unit is *percent*)
|
||||
* **mem**: MEM percent usage (unit is *percent*)
|
||||
* **swap**: SWAP percent usage (unit is *percent*)
|
||||
* **load**: LOAD percent usage (unit is *percent*)
|
||||
* **cpu_name**: CPU name (unit is *None*)
|
||||
* **cpu_hz_current**: CPU current frequency (unit is *hertz*)
|
||||
* **cpu_hz**: CPU max frequency (unit is *hertz*)
|
||||
|
||||
Get a specific field::
|
||||
|
||||
# curl http://localhost:61208/api/4/quicklook/cpu
|
||||
{"cpu": 25.4}
|
||||
# curl http://localhost:61208/api/4/quicklook/cpu_name
|
||||
{"cpu_name": "Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz"}
|
||||
|
||||
GET sensors
|
||||
-----------
|
||||
@ -984,7 +984,7 @@ GET uptime
|
||||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/uptime
|
||||
"50 days, 6:38:24"
|
||||
"64 days, 1:43:26"
|
||||
|
||||
GET version
|
||||
-----------
|
||||
@ -1009,85 +1009,63 @@ Get top 2 processes of the processlist plugin::
|
||||
|
||||
# curl http://localhost:61208/api/4/processlist/top/2
|
||||
[{"cmdline": ["/usr/share/code/code",
|
||||
"--ms-enable-electron-run-as-node",
|
||||
"/home/nicolargo/.vscode/extensions/vue.volar-1.8.25/server.js",
|
||||
"--node-ipc",
|
||||
"--clientProcessId=391253"],
|
||||
"cpu_percent": 0.0,
|
||||
"cpu_times": {"children_system": 0.0,
|
||||
"children_user": 0.0,
|
||||
"iowait": 0.0,
|
||||
"system": 182.3,
|
||||
"user": 3586.33},
|
||||
"gids": {"effective": 1000, "real": 1000, "saved": 1000},
|
||||
"io_counters": [1702031360, 0, 0, 0, 0],
|
||||
"key": "pid",
|
||||
"memory_info": {"data": 792121344,
|
||||
"dirty": 0,
|
||||
"lib": 0,
|
||||
"rss": 578248704,
|
||||
"shared": 17330176,
|
||||
"text": 120565760,
|
||||
"vms": 1205534920704},
|
||||
"memory_percent": 7.391096067914275,
|
||||
"name": "code",
|
||||
"nice": 0,
|
||||
"num_threads": 8,
|
||||
"pid": 391764,
|
||||
"status": "S",
|
||||
"time_since_update": 1,
|
||||
"username": "nicolargo"},
|
||||
{"cmdline": ["/usr/share/code/code",
|
||||
"--ms-enable-electron-run-as-node",
|
||||
"/home/nicolargo/.vscode/extensions/ms-python.vscode-pylance-2023.12.1/dist/server.bundle.js",
|
||||
"--cancellationReceive=file:810abd06604ca203178b3fa9390087012fbf550dba",
|
||||
"--node-ipc",
|
||||
"--clientProcessId=391253"],
|
||||
"cpu_percent": 0.0,
|
||||
"cpu_times": {"children_system": 0.78,
|
||||
"children_user": 6.15,
|
||||
"cpu_times": {"children_system": 0.85,
|
||||
"children_user": 6.34,
|
||||
"iowait": 0.0,
|
||||
"system": 360.08,
|
||||
"user": 6010.89},
|
||||
"system": 466.27,
|
||||
"user": 7859.93},
|
||||
"gids": {"effective": 1000, "real": 1000, "saved": 1000},
|
||||
"io_counters": [1231159296, 2641920, 0, 0, 0],
|
||||
"io_counters": [2126852096, 2703360, 0, 0, 0],
|
||||
"key": "pid",
|
||||
"memory_info": {"data": 899014656,
|
||||
"memory_info": {"data": 944828416,
|
||||
"dirty": 0,
|
||||
"lib": 0,
|
||||
"rss": 511119360,
|
||||
"shared": 26382336,
|
||||
"rss": 531513344,
|
||||
"shared": 17362944,
|
||||
"text": 120565760,
|
||||
"vms": 1207768694784},
|
||||
"memory_percent": 6.533057948593103,
|
||||
"memory_percent": 6.793731070571267,
|
||||
"name": "code",
|
||||
"nice": 0,
|
||||
"num_threads": 13,
|
||||
"pid": 391817,
|
||||
"status": "S",
|
||||
"time_since_update": 1,
|
||||
"username": "nicolargo"},
|
||||
{"cmdline": ["/usr/share/code/code",
|
||||
"--type=renderer",
|
||||
"--crashpad-handler-pid=391157",
|
||||
"--enable-crash-reporter=721e05a9-6035-4dcb-bd58-68097aa48dd0,no_channel",
|
||||
"--user-data-dir=/home/nicolargo/.config/Code",
|
||||
"--standard-schemes=vscode-webview,vscode-file",
|
||||
"--enable-sandbox",
|
||||
"--secure-schemes=vscode-webview,vscode-file",
|
||||
"--bypasscsp-schemes",
|
||||
"--cors-schemes=vscode-webview,vscode-file",
|
||||
"--fetch-schemes=vscode-webview,vscode-file",
|
||||
"--service-worker-schemes=vscode-webview",
|
||||
"--streaming-schemes",
|
||||
"--app-path=/usr/share/code/resources/app",
|
||||
"--enable-sandbox",
|
||||
"--enable-blink-features=HighlightAPI",
|
||||
"--first-renderer-process",
|
||||
"--lang=en-US",
|
||||
"--num-raster-threads=2",
|
||||
"--enable-main-frame-before-activation",
|
||||
"--renderer-client-id=4",
|
||||
"--time-ticks-at-unix-epoch=-1702561657662203",
|
||||
"--launch-time-ticks=95866298101",
|
||||
"--shared-files=v8_context_snapshot_data:100",
|
||||
"--field-trial-handle=0,i,2865222574050452096,10380804405300286374,262144",
|
||||
"--disable-features=CalculateNativeWinOcclusion,SpareRendererForSitePerProcess",
|
||||
"--vscode-window-config=vscode:a08b576a-4b00-4480-bfc3-390d8aea727c"],
|
||||
"cpu_percent": 0.0,
|
||||
"cpu_times": {"children_system": 0.0,
|
||||
"children_user": 0.0,
|
||||
"iowait": 0.0,
|
||||
"system": 872.37,
|
||||
"user": 12288.82},
|
||||
"gids": {"effective": 1000, "real": 1000, "saved": 1000},
|
||||
"io_counters": [1207435264, 3117056, 0, 0, 0],
|
||||
"key": "pid",
|
||||
"memory_info": {"data": 1501626368,
|
||||
"dirty": 0,
|
||||
"lib": 0,
|
||||
"rss": 484990976,
|
||||
"shared": 76034048,
|
||||
"text": 120565760,
|
||||
"vms": 1220702756864},
|
||||
"memory_percent": 6.199088507922547,
|
||||
"name": "code",
|
||||
"nice": 0,
|
||||
"num_threads": 15,
|
||||
"pid": 391192,
|
||||
"status": "S",
|
||||
"time_since_update": 1,
|
||||
"username": "nicolargo"}]
|
||||
|
||||
Note: Only work for plugin with a list of items
|
||||
@ -1116,34 +1094,34 @@ GET stats history
|
||||
History of a plugin::
|
||||
|
||||
# curl http://localhost:61208/api/4/cpu/history
|
||||
{"system": [["2024-01-14T15:36:24.814316", 3.3],
|
||||
["2024-01-14T15:36:25.828843", 1.8],
|
||||
["2024-01-14T15:36:26.982020", 1.8]],
|
||||
"user": [["2024-01-14T15:36:24.814299", 22.1],
|
||||
["2024-01-14T15:36:25.828836", 9.7],
|
||||
["2024-01-14T15:36:26.982006", 9.7]]}
|
||||
{"system": [["2024-01-28T10:41:28.116797", 7.8],
|
||||
["2024-01-28T10:41:29.140407", 3.1],
|
||||
["2024-01-28T10:41:30.368579", 3.1]],
|
||||
"user": [["2024-01-28T10:41:28.116785", 48.8],
|
||||
["2024-01-28T10:41:29.140398", 17.3],
|
||||
["2024-01-28T10:41:30.368565", 17.3]]}
|
||||
|
||||
Limit history to last 2 values::
|
||||
|
||||
# curl http://localhost:61208/api/4/cpu/history/2
|
||||
{"system": [["2024-01-14T15:36:25.828843", 1.8],
|
||||
["2024-01-14T15:36:26.982020", 1.8]],
|
||||
"user": [["2024-01-14T15:36:25.828836", 9.7],
|
||||
["2024-01-14T15:36:26.982006", 9.7]]}
|
||||
{"system": [["2024-01-28T10:41:29.140407", 3.1],
|
||||
["2024-01-28T10:41:30.368579", 3.1]],
|
||||
"user": [["2024-01-28T10:41:29.140398", 17.3],
|
||||
["2024-01-28T10:41:30.368565", 17.3]]}
|
||||
|
||||
History for a specific field::
|
||||
|
||||
# curl http://localhost:61208/api/4/cpu/system/history
|
||||
{"system": [["2024-01-14T15:36:22.968267", 3.3],
|
||||
["2024-01-14T15:36:24.814316", 3.3],
|
||||
["2024-01-14T15:36:25.828843", 1.8],
|
||||
["2024-01-14T15:36:26.982020", 1.8]]}
|
||||
{"system": [["2024-01-28T10:41:26.512718", 7.8],
|
||||
["2024-01-28T10:41:28.116797", 7.8],
|
||||
["2024-01-28T10:41:29.140407", 3.1],
|
||||
["2024-01-28T10:41:30.368579", 3.1]]}
|
||||
|
||||
Limit history for a specific field to last 2 values::
|
||||
|
||||
# curl http://localhost:61208/api/4/cpu/system/history
|
||||
{"system": [["2024-01-14T15:36:25.828843", 1.8],
|
||||
["2024-01-14T15:36:26.982020", 1.8]]}
|
||||
{"system": [["2024-01-28T10:41:29.140407", 3.1],
|
||||
["2024-01-28T10:41:30.368579", 3.1]]}
|
||||
|
||||
GET limits (used for thresholds)
|
||||
--------------------------------
|
||||
@ -1301,14 +1279,18 @@ All limits/thresholds::
|
||||
"19"]},
|
||||
"psutilversion": {"history_size": 1200.0},
|
||||
"quicklook": {"history_size": 1200.0,
|
||||
"quicklook_bar_char": ["|"],
|
||||
"quicklook_cpu_careful": 50.0,
|
||||
"quicklook_cpu_critical": 90.0,
|
||||
"quicklook_cpu_warning": 70.0,
|
||||
"quicklook_disable": ["False"],
|
||||
"quicklook_list": ["cpu", "mem", "load"],
|
||||
"quicklook_load_careful": 70.0,
|
||||
"quicklook_load_critical": 500.0,
|
||||
"quicklook_load_warning": 100.0,
|
||||
"quicklook_mem_careful": 50.0,
|
||||
"quicklook_mem_critical": 90.0,
|
||||
"quicklook_mem_warning": 70.0,
|
||||
"quicklook_percentage_char": ["|"],
|
||||
"quicklook_swap_careful": 50.0,
|
||||
"quicklook_swap_critical": 90.0,
|
||||
"quicklook_swap_warning": 70.0},
|
||||
|
@ -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" "Jan 14, 2024" "4.0.0_beta01" "Glances"
|
||||
.TH "GLANCES" "1" "Jan 28, 2024" "4.0.0_beta01" "Glances"
|
||||
.SH NAME
|
||||
glances \- An eye on your system
|
||||
.SH SYNOPSIS
|
||||
|
@ -42,41 +42,23 @@
|
||||
<div class="table-cell">{{ percpu.total }}%</div>
|
||||
</div>
|
||||
</template>
|
||||
<div class="table-row">
|
||||
<div class="table-cell text-left">MEM</div>
|
||||
<div class="table-row" v-for="(key) in stats_list_after_cpu">
|
||||
<div class="table-cell text-left">{{ key.toUpperCase() }}</div>
|
||||
<div class="table-cell">
|
||||
<div class="progress">
|
||||
<div
|
||||
:class="`progress-bar progress-bar-${getDecoration('mem')}`"
|
||||
:class="`progress-bar progress-bar-${getDecoration(key)}`"
|
||||
role="progressbar"
|
||||
:aria-valuenow="mem"
|
||||
:aria-valuenow="stats[key]"
|
||||
aria-valuemin="0"
|
||||
aria-valuemax="100"
|
||||
:style="`width: ${mem}%;`"
|
||||
:style="`width: ${stats[key]}%;`"
|
||||
>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-cell">{{ mem }}%</div>
|
||||
</div>
|
||||
<div class="table-row">
|
||||
<div class="table-cell text-left">LOAD</div>
|
||||
<div class="table-cell">
|
||||
<div class="progress">
|
||||
<div
|
||||
:class="`progress-bar progress-bar-${getDecoration('load')}`"
|
||||
role="progressbar"
|
||||
:aria-valuenow="load"
|
||||
aria-valuemin="0"
|
||||
aria-valuemax="100"
|
||||
:style="`width: ${load}%;`"
|
||||
>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-cell">{{ load }}%</div>
|
||||
<div class="table-cell">{{ stats[key] }}%</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -106,12 +88,6 @@ export default {
|
||||
view() {
|
||||
return this.data.views['quicklook'];
|
||||
},
|
||||
mem() {
|
||||
return this.stats.mem;
|
||||
},
|
||||
load() {
|
||||
return this.stats.load;
|
||||
},
|
||||
cpu() {
|
||||
return this.stats.cpu;
|
||||
},
|
||||
@ -124,15 +100,15 @@ export default {
|
||||
cpu_hz() {
|
||||
return this.stats.cpu_hz;
|
||||
},
|
||||
swap() {
|
||||
return this.stats.swap;
|
||||
},
|
||||
percpus() {
|
||||
return this.stats.percpu.map(({ cpu_number: number, total }) => ({
|
||||
number,
|
||||
total
|
||||
}));
|
||||
}
|
||||
},
|
||||
stats_list_after_cpu() {
|
||||
return this.view.list.filter((key) => !key.includes('cpu'));
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getDecoration(value) {
|
||||
|
12
glances/outputs/static/package-lock.json
generated
12
glances/outputs/static/package-lock.json
generated
@ -2336,9 +2336,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
||||
"version": "1.15.5",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz",
|
||||
"integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@ -7584,9 +7584,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
||||
"version": "1.15.5",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz",
|
||||
"integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==",
|
||||
"dev": true
|
||||
},
|
||||
"forwarded": {
|
||||
|
2
glances/outputs/static/public/glances.js
vendored
2
glances/outputs/static/public/glances.js
vendored
File diff suppressed because one or more lines are too long
@ -153,6 +153,9 @@ class PluginModel(GlancesPluginModel):
|
||||
self.stats['load'], header='load'
|
||||
)
|
||||
|
||||
# Define the list of stats to display
|
||||
self.views['list'] = self.stats_list
|
||||
|
||||
def msg_curse(self, args=None, max_width=10):
|
||||
"""Return the list to display in the UI."""
|
||||
# Init the return message
|
||||
|
Loading…
Reference in New Issue
Block a user