diff options
author | nicolargo <nicolas@nicolargo.com> | 2024-02-17 17:01:08 +0100 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2024-02-17 17:01:08 +0100 |
commit | 4ab96a72a746ddfe94bd9ec8479cd622bce6935d (patch) | |
tree | 90e382fbaef87860bc7400c6ae42509b88b0e4c7 | |
parent | c9285be686070f2e984feeb567e0d1b774a9c39f (diff) | |
parent | eb7d3d28c2bf5538e5d2b8db223b072d05fc3b36 (diff) |
Merge branch 'feature/issue2414' into develop
-rw-r--r-- | conf/glances.conf | 4 | ||||
-rw-r--r-- | docs/api.rst | 626 | ||||
-rw-r--r-- | docs/man/glances.1 | 2 | ||||
-rw-r--r-- | glances/amps_list.py | 2 | ||||
-rw-r--r-- | glances/events.py | 2 | ||||
-rw-r--r-- | glances/outputs/glances_stdout_apidoc.py | 34 | ||||
-rw-r--r-- | glances/outputs/static/js/components/plugin-network.vue | 25 | ||||
-rw-r--r-- | glances/outputs/static/public/glances.js | 2 | ||||
-rw-r--r-- | glances/plugins/cpu/__init__.py | 37 | ||||
-rw-r--r-- | glances/plugins/diskio/__init__.py | 172 | ||||
-rw-r--r-- | glances/plugins/network/__init__.py | 330 | ||||
-rw-r--r-- | glances/plugins/plugin/model.py | 160 | ||||
-rw-r--r-- | glances/plugins/processcount/__init__.py | 14 | ||||
-rw-r--r-- | glances/plugins/processlist/__init__.py | 100 | ||||
-rw-r--r-- | glances/processes.py | 13 |
15 files changed, 860 insertions, 663 deletions
diff --git a/conf/glances.conf b/conf/glances.conf index 8072baf0..e8911d25 100644 --- a/conf/glances.conf +++ b/conf/glances.conf @@ -179,7 +179,7 @@ tx_careful=70 tx_warning=80 tx_critical=90 # Define the list of hidden network interfaces (comma-separated regexp) -#hide=docker.*,lo +hide=docker.*,lo # Define the list of wireless network interfaces to be show (comma-separated) #show=docker.* # It is possible to overwrite the bitrate thresholds per interface @@ -234,7 +234,7 @@ hide=loop.*,/dev/loop.* # Define the list of disks to be show (comma-separated) #show=sda.* # Alias for sda1 and sdb1 -#alias=sda1:InternalDisk,sdb1:ExternalDisk +#alias=sda1:SystemDisk,sdb1:DataDisk [fs] disable=False diff --git a/docs/api.rst b/docs/api.rst index 2b897e58..0b718bef 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -109,16 +109,16 @@ GET alert Get plugin stats:: # curl http://localhost:61208/api/4/alert - [{"avg": 85.80019947069587, - "begin": 1706456153.0, + [{"avg": 70.51750423548678, + "begin": 1707665810.0, "count": 1, "desc": "", "end": -1, - "max": 85.80019947069587, - "min": 85.80019947069587, + "max": 70.51750423548678, + "min": 70.51750423548678, "sort": "memory_percent", "state": "WARNING", - "sum": 85.80019947069587, + "sum": 70.51750423548678, "top": [], "type": "MEM"}] @@ -140,21 +140,21 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/alert/begin - {"begin": [1706456153.0]} + {"begin": [1707665810.0]} Get a specific item when field matches the given value:: - # curl http://localhost:61208/api/4/alert/begin/1706456153.0 - {"1706456153.0": [{"avg": 85.80019947069587, - "begin": 1706456153.0, + # curl http://localhost:61208/api/4/alert/begin/1707665810.0 + {"1707665810.0": [{"avg": 70.51750423548678, + "begin": 1707665810.0, "count": 1, "desc": "", "end": -1, - "max": 85.80019947069587, - "min": 85.80019947069587, + "max": 70.51750423548678, + "min": 70.51750423548678, "sort": "memory_percent", "state": "WARNING", - "sum": 85.80019947069587, + "sum": 70.51750423548678, "top": [], "type": "MEM"}]} @@ -172,7 +172,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.30731725692749023}, + "timer": 0.9168691635131836}, {"count": 0, "countmax": 20.0, "countmin": None, @@ -181,7 +181,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.30716705322265625}] + "timer": 0.9165229797363281}] Fields descriptions: @@ -209,7 +209,15 @@ Get a specific item when field matches the given value:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.30731725692749023}]} + "timer": 0.9168691635131836}]} + +GET cloud +--------- + +Get plugin stats:: + + # curl http://localhost:61208/api/4/cloud + {} GET connections --------------- @@ -249,39 +257,18 @@ Get plugin stats:: "engine": "docker", "id": "3abd51c615968482d9ccff5afc629f267f6dda113ed68b75b432615fae3b49fb", "image": ["portainer/portainer-ce:2.9.3"], - "io": {"cumulative_ior": 385024, "cumulative_iow": 1277952}, + "io": {"cumulative_ior": 37814272, "cumulative_iow": 3383296}, "key": "name", "memory": {"cache": None, - "limit": 7823585280, + "limit": 7823572992, "max_usage": None, "rss": None, - "usage": 13754368}, - "memory_usage": 13754368, + "usage": 31096832}, + "memory_usage": 31096832, "name": "portainer", - "network": {"cumulative_rx": 1326520, "cumulative_tx": 0}, + "network": {"cumulative_rx": 397434, "cumulative_tx": 0}, "status": "running", - "uptime": "yesterday"}, - {"command": "top", - "cpu": {"total": 2.556258881997374e-06}, - "cpu_percent": 2.556258881997374e-06, - "created": "2023-12-09T10:45:34.339489876+01:00", - "engine": "podman", - "id": "481d6ffb7eef284d062628cf350bdd9ce0a803db8a2a505d75565ed24322b714", - "image": "docker.io/library/ubuntu:latest", - "io": {"ior": 0.0, "iow": 0.0, "time_since_update": 1}, - "io_rx": 0.0, - "io_wx": 0.0, - "key": "name", - "memory": {"limit": 7823585280.0, "usage": 1216512.0}, - "memory_usage": 1216512.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", - "status": "running", - "uptime": "1 months"}] + "uptime": "an hour"}] Fields descriptions: @@ -305,7 +292,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/containers/name - {"name": ["portainer", "sad_darwin", "8d0f1c783def-infra"]} + {"name": ["portainer"]} Get a specific item when field matches the given value:: @@ -317,18 +304,18 @@ Get a specific item when field matches the given value:: "engine": "docker", "id": "3abd51c615968482d9ccff5afc629f267f6dda113ed68b75b432615fae3b49fb", "image": ["portainer/portainer-ce:2.9.3"], - "io": {"cumulative_ior": 385024, "cumulative_iow": 1277952}, + "io": {"cumulative_ior": 37814272, "cumulative_iow": 3383296}, "key": "name", "memory": {"cache": None, - "limit": 7823585280, + "limit": 7823572992, "max_usage": None, "rss": None, - "usage": 13754368}, - "memory_usage": 13754368, + "usage": 31096832}, + "memory_usage": 31096832, "name": "portainer", - "network": {"cumulative_rx": 1326520, "cumulative_tx": 0}, + "network": {"cumulative_rx": 397434, "cumulative_tx": 0}, "status": "running", - "uptime": "yesterday"}]} + "uptime": "an hour"}]} GET core -------- @@ -355,22 +342,19 @@ Get plugin stats:: # curl http://localhost:61208/api/4/cpu {"cpucore": 4, - "ctx_switches": 0, + "ctx_switches": 17299194, "guest": 0.0, - "guest_nice": 0.0, - "idle": 75.3, - "interrupts": 0, - "iowait": 0.0, + "idle": 64.0, + "interrupts": 9016401, + "iowait": 0.4, "irq": 0.0, "nice": 0.0, - "soft_interrupts": 0, - "softirq": 0.0, + "soft_interrupts": 6148123, "steal": 0.0, "syscalls": 0, - "system": 1.6, - "time_since_update": 1, - "total": 24.7, - "user": 23.1} + "system": 5.5, + "total": 35.6, + "user": 29.9} Fields descriptions: @@ -385,16 +369,25 @@ Fields descriptions: * **steal**: *(Linux)*: percentage of time a virtual CPU waits for a real CPU while the hypervisor is servicing another virtual processor (unit is *percent*) * **guest**: *(Linux)*: time spent running a virtual CPU for guest operating systems under the control of the Linux kernel (unit is *percent*) * **ctx_switches**: number of context switches (voluntary + involuntary) per second. A context switch is a procedure that a computer's CPU (central processing unit) follows to change from one task (or process) to another while ensuring that the tasks do not conflict (unit is *number*) +* **ctx_switches_rate_per_sec**: number of context switches (voluntary + involuntary) per second. A context switch is a procedure that a computer's CPU (central processing unit) follows to change from one task (or process) to another while ensuring that the tasks do not conflict per second (unit is *number* per second) +* **ctx_switches_gauge**: number of context switches (voluntary + involuntary) per second. A context switch is a procedure that a computer's CPU (central processing unit) follows to change from one task (or process) to another while ensuring that the tasks do not conflict (cumulative) (unit is *number*) * **interrupts**: number of interrupts per second (unit is *number*) +* **interrupts_rate_per_sec**: number of interrupts per second per second (unit is *number* per second) +* **interrupts_gauge**: number of interrupts per second (cumulative) (unit is *number*) * **soft_interrupts**: number of software interrupts per second. Always set to 0 on Windows and SunOS (unit is *number*) +* **soft_interrupts_rate_per_sec**: number of software interrupts per second. Always set to 0 on Windows and SunOS per second (unit is *number* per second) +* **soft_interrupts_gauge**: number of software interrupts per second. Always set to 0 on Windows and SunOS (cumulative) (unit is *number*) * **syscalls**: number of system calls per second. Always 0 on Linux OS (unit is *number*) +* **syscalls_rate_per_sec**: number of system calls per second. Always 0 on Linux OS per second (unit is *number* per second) +* **syscalls_gauge**: number of system calls per second. Always 0 on Linux OS (cumulative) (unit is *number*) * **cpucore**: Total number of CPU core (unit is *number*) * **time_since_update**: Number of seconds since last update (unit is *seconds*) +* **time_since_update**: Number of seconds since last update (unit is *seconds*) Get a specific field:: # curl http://localhost:61208/api/4/cpu/total - {"total": 24.7} + {"total": 35.6} GET diskio ---------- @@ -404,28 +397,33 @@ Get plugin stats:: # curl http://localhost:61208/api/4/diskio [{"disk_name": "sda", "key": "disk_name", - "read_bytes": 0, - "read_count": 0, - "time_since_update": 1, - "write_bytes": 0, - "write_count": 0}, - {"alias": "InternalDisk", - "disk_name": "sda1", + "read_bytes": 4754307584, + "read_count": 182653, + "write_bytes": 2751705088, + "write_count": 89403}, + {"disk_name": "sda1", "key": "disk_name", - "read_bytes": 0, - "read_count": 0, - "time_since_update": 1, + "read_bytes": 3387392, + "read_count": 91, "write_bytes": 0, - "write_count": 0}] + "write_count": 3}] Fields descriptions: * **disk_name**: Disk name (unit is *None*) -* **read_count**: Number of reads since last request (unit is *number*) -* **write_count**: Number of writes since last request (unit is *number*) -* **read_bytes**: Number of bytes read since last request (unit is *byte*) -* **write_bytes**: Number of bytes written since last request (unit is *byte*) -* **time_since_update**: Time since last request (unit is *second*) +* **read_count**: Number of reads (unit is *number*) +* **read_count_rate_per_sec**: Number of reads per second (unit is *number* per second) +* **read_count_gauge**: Number of reads (cumulative) (unit is *number*) +* **write_count**: Number of writes (unit is *number*) +* **write_count_rate_per_sec**: Number of writes per second (unit is *number* per second) +* **write_count_gauge**: Number of writes (cumulative) (unit is *number*) +* **read_bytes**: Number of bytes read (unit is *byte*) +* **read_bytes_rate_per_sec**: Number of bytes read per second (unit is *byte* per second) +* **read_bytes_gauge**: Number of bytes read (cumulative) (unit is *byte*) +* **write_bytes**: Number of bytes written (unit is *byte*) +* **write_bytes_rate_per_sec**: Number of bytes written per second (unit is *byte* per second) +* **write_bytes_gauge**: Number of bytes written (cumulative) (unit is *byte*) +* **time_since_update**: Number of seconds since last update (unit is *seconds*) Get a specific field:: @@ -437,11 +435,28 @@ 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": 0, - "read_count": 0, - "time_since_update": 1, - "write_bytes": 0, - "write_count": 0}]} + "read_bytes": 4754307584, + "read_count": 182653, + "write_bytes": 2751705088, + "write_count": 89403}]} + +GET folders +----------- + +Get plugin stats:: + + # curl http://localhost:61208/api/4/folders + [] + +Fields descriptions: + +* **path**: Absolute path (unit is *None*) +* **size**: Folder size in bytes (unit is *byte*) +* **refresh**: Refresh interval in seconds (unit is *second*) +* **errno**: Return code when retrieving folder size (0 is no error) (unit is *number*) +* **careful**: Careful threshold in MB (unit is *megabyte*) +* **warning**: Warning threshold in MB (unit is *megabyte*) +* **critical**: Critical threshold in MB (unit is *megabyte*) GET fs ------ @@ -451,13 +466,13 @@ Get plugin stats:: # curl http://localhost:61208/api/4/fs [{"alias": "Root", "device_name": "/dev/mapper/ubuntu--gnome--vg-root", - "free": 18033704960, + "free": 11497181184, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", - "percent": 92.2, + "percent": 95.0, "size": 243334156288, - "used": 212912996352}, + "used": 219449520128}, {"device_name": "zsfpool", "free": 31195136, "fs_type": "zfs", @@ -487,13 +502,38 @@ 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": 18033704960, + "free": 11497181184, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", - "percent": 92.2, + "percent": 95.0, "size": 243334156288, - "used": 212912996352}]} + "used": 219449520128}]} + +GET gpu +------- + +Get plugin stats:: + + # curl http://localhost:61208/api/4/gpu + [] + +Fields descriptions: + +* **gpu_id**: GPU identification (unit is *None*) +* **name**: GPU name (unit is *None*) +* **mem**: Memory consumption (unit is *percent*) +* **proc**: GPU processor consumption (unit is *percent*) +* **temperature**: GPU temperature (unit is *celsius*) +* **fan_speed**: GPU fan speed (unit is *roundperminute*) + +GET help +-------- + +Get plugin stats:: + + # curl http://localhost:61208/api/4/help + None GET ip ------ @@ -522,13 +562,29 @@ Get a specific field:: # curl http://localhost:61208/api/4/ip/gateway {"gateway": "192.168.0.254"} +GET irq +------- + +Get plugin stats:: + + # curl http://localhost:61208/api/4/irq + [] + +Fields descriptions: + +* **irq_line**: IRQ line name (unit is *None*) +* **irq_rate**: IRQ rate per second (unit is *numberpersecond*) + GET load -------- Get plugin stats:: # curl http://localhost:61208/api/4/load - {"cpucore": 4, "min1": 1.65625, "min15": 1.88916015625, "min5": 2.0087890625} + {"cpucore": 4, + "min1": 1.64794921875, + "min15": 1.22802734375, + "min5": 0.76611328125} Fields descriptions: @@ -540,7 +596,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/load/min1 - {"min1": 1.65625} + {"min1": 1.64794921875} GET mem ------- @@ -548,16 +604,16 @@ GET mem Get plugin stats:: # curl http://localhost:61208/api/4/mem - {"active": 3381714944, - "available": 1110933504, - "buffers": 68694016, - "cached": 1759178752, - "free": 1110933504, - "inactive": 3169775616, - "percent": 85.8, - "shared": 557879296, - "total": 7823585280, - "used": 6712651776} + {"active": 1361960960, + "available": 2306584576, + "buffers": 197697536, + "cached": 2881425408, + "free": 2306584576, + "inactive": 4967518208, + "percent": 70.5, + "shared": 721412096, + "total": 7823572992, + "used": 5516988416} Fields descriptions: @@ -576,7 +632,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/mem/total - {"total": 7823585280} + {"total": 7823572992} GET memswap ----------- @@ -584,13 +640,13 @@ GET memswap Get plugin stats:: # curl http://localhost:61208/api/4/memswap - {"free": 3847774208, - "percent": 52.4, - "sin": 23322181632, - "sout": 31649878016, + {"free": 7979921408, + "percent": 1.3, + "sin": 18857984, + "sout": 118067200, "time_since_update": 1, "total": 8082419712, - "used": 4234645504} + "used": 102498304} Fields descriptions: @@ -614,40 +670,41 @@ Get plugin stats:: # curl http://localhost:61208/api/4/network [{"alias": None, - "cumulative_cx": 2792570108, - "cumulative_rx": 1396285054, - "cumulative_tx": 1396285054, - "cx": 740, - "interface_name": "lo", - "is_up": True, + "bytes_all": 0, + "bytes_all_gauge": 167597511, + "bytes_recv": 0, + "bytes_recv_gauge": 148823417, + "bytes_sent": 0, + "bytes_sent_gauge": 18774094, + "interface_name": "wlp2s0", "key": "interface_name", - "rx": 370, "speed": 0, - "time_since_update": 1, - "tx": 370}, - {"alias": "WIFI", - "cumulative_cx": 16757011163, - "cumulative_rx": 13419035684, - "cumulative_tx": 3337975479, - "cx": 126, - "interface_name": "wlp2s0", - "is_up": True, + "time_since_update": 0.6788613796234131}, + {"alias": None, + "bytes_all": 0, + "bytes_all_gauge": 0, + "bytes_recv": 0, + "bytes_recv_gauge": 0, + "bytes_sent": 0, + "bytes_sent_gauge": 0, + "interface_name": "br_grafana", "key": "interface_name", - "rx": 0, "speed": 0, - "time_since_update": 1, - "tx": 126}] + "time_since_update": 0.6788613796234131}] Fields descriptions: -* **interface_name**: Interface name (unit is *string*) -* **alias**: Interface alias name (optional) (unit is *string*) -* **rx**: The received/input rate (unit is *bitpersecond*) -* **tx**: The sent/output rate (unit is *bitpersecond*) -* **cx**: The cumulative received+sent rate (unit is *bitpersecond*) -* **cumulative_rx**: The number of bytes received through the interface (cumulative) (unit is *byte*) -* **cumulative_tx**: The number of bytes sent through the interface (cumulative) (unit is *byte*) -* **cumulative_cx**: The cumulative number of bytes reveived and sent through the interface (cumulative) (unit is *byte*) +* **interface_name**: Interface name (unit is *None*) +* **alias**: Interface alias name (optional) (unit is *None*) +* **bytes_recv**: Number of bytes received (unit is *byte*) +* **bytes_recv_rate_per_sec**: Number of bytes received per second (unit is *byte* per second) +* **bytes_recv_gauge**: Number of bytes received (cumulative) (unit is *byte*) +* **bytes_sent**: Number of bytes sent (unit is *byte*) +* **bytes_sent_rate_per_sec**: Number of bytes sent per second (unit is *byte* per second) +* **bytes_sent_gauge**: Number of bytes sent (cumulative) (unit is *byte*) +* **bytes_all**: Number of bytes received and sent (unit is *byte*) +* **bytes_all_rate_per_sec**: Number of bytes received and sent per second (unit is *byte* per second) +* **bytes_all_gauge**: Number of bytes received and sent (cumulative) (unit is *byte*) * **speed**: Maximum interface speed (in bit per second). Can return 0 on some operating-system (unit is *bitpersecond*) * **is_up**: Is the interface up ? (unit is *bool*) * **time_since_update**: Number of seconds since last update (unit is *seconds*) @@ -655,29 +712,28 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/network/interface_name - {"interface_name": ["lo", - "wlp2s0", - "br-40875d2e2716", - "docker0", + {"interface_name": ["wlp2s0", "br_grafana", + "br-40875d2e2716", + "vethb940339", "mpqemubr0", - "vethbeef843"]} + "lxdbr0", + "veth56613b7f"]} 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": 2792570108, - "cumulative_rx": 1396285054, - "cumulative_tx": 1396285054, - "cx": 740, - "interface_name": "lo", - "is_up": True, - "key": "interface_name", - "rx": 370, - "speed": 0, - "time_since_update": 1, - "tx": 370}]} + # curl http://localhost:61208/api/4/network/interface_name/wlp2s0 + {"wlp2s0": [{"alias": None, + "bytes_all": 0, + "bytes_all_gauge": 167597511, + "bytes_recv": 0, + "bytes_recv_gauge": 148823417, + "bytes_sent": 0, + "bytes_sent_gauge": 18774094, + "interface_name": "wlp2s0", + "key": "interface_name", + "speed": 0, + "time_since_update": 0.6788613796234131}]} GET now ------- @@ -685,7 +741,7 @@ GET now Get plugin stats:: # curl http://localhost:61208/api/4/now - "2024-01-28 16:35:53 CET" + "2024-02-11 16:36:50 CET" GET percpu ---------- @@ -696,29 +752,29 @@ Get plugin stats:: [{"cpu_number": 0, "guest": 0.0, "guest_nice": 0.0, - "idle": 17.0, + "idle": 80.5, "iowait": 0.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 3.0, - "total": 83.0, - "user": 28.0}, + "system": 3.1, + "total": 19.5, + "user": 16.4}, {"cpu_number": 1, "guest": 0.0, "guest_nice": 0.0, - "idle": 34.0, - "iowait": 0.0, + "idle": 83.5, + "iowait": 0.8, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 0.0, - "total": 66.0, - "user": 13.0}] + "system": 6.3, + "total": 16.5, + "user": 9.4}] Fields descriptions: @@ -752,7 +808,7 @@ Get plugin stats:: "port": 0, "refresh": 30, "rtt_warning": None, - "status": 0.003972, + "status": 0.006275, "timeout": 3}] Fields descriptions: @@ -780,7 +836,7 @@ Get a specific item when field matches the given value:: "port": 0, "refresh": 30, "rtt_warning": None, - "status": 0.003972, + "status": 0.006275, "timeout": 3}]} GET processcount @@ -789,7 +845,7 @@ GET processcount Get plugin stats:: # curl http://localhost:61208/api/4/processcount - {"pid_max": 0, "running": 1, "sleeping": 331, "thread": 1658, "total": 398} + {"pid_max": 0, "running": 1, "sleeping": 312, "thread": 1430, "total": 378} Fields descriptions: @@ -802,7 +858,31 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/processcount/total - {"total": 398} + {"total": 378} + +GET processlist +--------------- + +Get plugin stats:: + + # curl http://localhost:61208/api/4/processlist + [] + +Fields descriptions: + +* **pid**: Process identifier (ID) (unit is *number*) +* **name**: Process name (unit is *string*) +* **cmdline**: Command line with arguments (unit is *list*) +* **username**: Process owner (unit is *string*) +* **num_threads**: Number of threads (unit is *number*) +* **cpu_percent**: Process CPU consumption (unit is *percent*) +* **memory_percent**: Process memory consumption (unit is *percent*) +* **memory_info**: Process memory information (dict with rss, vms, shared, text, lib, data, dirty keys) (unit is *byte*) +* **status**: Process status (unit is *string*) +* **nice**: Process nice value (unit is *number*) +* **cpu_times**: Process CPU times (dict with user, system, iowait keys) (unit is *second*) +* **gids**: Process group IDs (dict with real, effective, saved keys) (unit is *number*) +* **io_counters**: Process IO counters (list with read_count, write_count, read_bytes, write_bytes, io_tag keys) (unit is *byte*) GET psutilversion ----------------- @@ -818,66 +898,66 @@ GET quicklook Get plugin stats:: # curl http://localhost:61208/api/4/quicklook - {"cpu": 24.7, - "cpu_hz": 2025000000.0, - "cpu_hz_current": 1689263000.0, + {"cpu": 35.6, + "cpu_hz": 3000000000.0, + "cpu_hz_current": 1899561500.0, "cpu_name": "Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz", "cpucore": 4, - "load": 47.2, - "mem": 85.8, + "load": 30.7, + "mem": 70.5, "percpu": [{"cpu_number": 0, "guest": 0.0, "guest_nice": 0.0, - "idle": 17.0, + "idle": 80.5, "iowait": 0.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 3.0, - "total": 83.0, - "user": 28.0}, + "system": 3.1, + "total": 19.5, + "user": 16.4}, {"cpu_number": 1, "guest": 0.0, "guest_nice": 0.0, - "idle": 34.0, - "iowait": 0.0, + "idle": 83.5, + "iowait": 0.8, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 0.0, - "total": 66.0, - "user": 13.0}, + "system": 6.3, + "total": 16.5, + "user": 9.4}, {"cpu_number": 2, "guest": 0.0, "guest_nice": 0.0, - "idle": 44.0, + "idle": 72.2, "iowait": 0.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 1.0, - "total": 56.0, - "user": 2.0}, + "system": 4.0, + "total": 27.8, + "user": 23.8}, {"cpu_number": 3, "guest": 0.0, "guest_nice": 0.0, - "idle": 45.0, + "idle": 23.3, "iowait": 0.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 0.0, - "total": 55.0, - "user": 1.0}], - "swap": 52.4} + "system": 8.5, + "total": 76.7, + "user": 68.2}], + "swap": 1.3} Fields descriptions: @@ -894,6 +974,14 @@ Get a specific field:: # curl http://localhost:61208/api/4/quicklook/cpu_name {"cpu_name": "Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz"} +GET raid +-------- + +Get plugin stats:: + + # curl http://localhost:61208/api/4/raid + {} + GET sensors ----------- @@ -948,6 +1036,14 @@ Get a specific item when field matches the given value:: "value": 27, "warning": 105}]} +GET smart +--------- + +Get plugin stats:: + + # curl http://localhost:61208/api/4/smart + {} + GET system ---------- @@ -958,7 +1054,7 @@ Get plugin stats:: "hr_name": "Ubuntu 22.04 64bit", "linux_distro": "Ubuntu 22.04", "os_name": "Linux", - "os_version": "5.15.0-88-generic", + "os_version": "5.15.0-94-generic", "platform": "64bit"} Fields descriptions: @@ -981,7 +1077,7 @@ GET uptime Get plugin stats:: # curl http://localhost:61208/api/4/uptime - "64 days, 7:37:53" + "1:44:31" GET version ----------- @@ -991,6 +1087,14 @@ Get plugin stats:: # curl http://localhost:61208/api/4/version "4.0.0_beta01" +GET wifi +-------- + +Get plugin stats:: + + # curl http://localhost:61208/api/4/wifi + [] + GET all stats ------------- @@ -1006,78 +1110,75 @@ Get top 2 processes of the proce |