summaryrefslogtreecommitdiffstats
path: root/docs/api.rst
diff options
context:
space:
mode:
authornicolargo <nicolashennion@gmail.com>2024-05-12 10:45:03 +0200
committernicolargo <nicolashennion@gmail.com>2024-05-12 10:45:03 +0200
commitd9056e6027082b43e4437bbdead34e7871ffd59f (patch)
tree714184303cc20128f0edf4f74bf7faa4b096ae64 /docs/api.rst
parent562780f7f0a24d93073dbd1f5591594107241552 (diff)
Glances version 4.0.0
Diffstat (limited to 'docs/api.rst')
-rw-r--r--docs/api.rst181
1 files changed, 89 insertions, 92 deletions
diff --git a/docs/api.rst b/docs/api.rst
index e7285669..96e58afb 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -141,7 +141,7 @@ Get plugin stats::
"refresh": 3.0,
"regex": True,
"result": None,
- "timer": 0.3663492202758789},
+ "timer": 0.3743629455566406},
{"count": 0,
"countmax": 20.0,
"countmin": None,
@@ -150,7 +150,7 @@ Get plugin stats::
"refresh": 3.0,
"regex": True,
"result": None,
- "timer": 0.36623501777648926}]
+ "timer": 0.37424492835998535}]
Fields descriptions:
@@ -178,7 +178,7 @@ Get a specific item when field matches the given value::
"refresh": 3.0,
"regex": True,
"result": None,
- "timer": 0.3663492202758789}]}
+ "timer": 0.3743629455566406}]}
GET cloud
---------
@@ -311,18 +311,18 @@ Get plugin stats::
# curl http://localhost:61208/api/4/cpu
{"cpucore": 16,
- "ctx_switches": 417599944,
+ "ctx_switches": 426500065,
"guest": 0.0,
- "idle": 4.0,
- "interrupts": 374317125,
+ "idle": 2.0,
+ "interrupts": 383116320,
"iowait": 0.0,
"irq": 0.0,
"nice": 0.0,
- "soft_interrupts": 133208497,
+ "soft_interrupts": 136368548,
"steal": 0.0,
"syscalls": 0,
- "system": 0.0,
- "total": 25.0,
+ "system": 1.0,
+ "total": 0.0,
"user": 0.0}
Fields descriptions:
@@ -356,7 +356,7 @@ Fields descriptions:
Get a specific field::
# curl http://localhost:61208/api/4/cpu/total
- {"total": 25.0}
+ {"total": 0.0}
GET diskio
----------
@@ -366,10 +366,10 @@ Get plugin stats::
# curl http://localhost:61208/api/4/diskio
[{"disk_name": "nvme0n1",
"key": "disk_name",
- "read_bytes": 7890098688,
- "read_count": 344619,
- "write_bytes": 24110978048,
- "write_count": 1078819},
+ "read_bytes": 7908215296,
+ "read_count": 345603,
+ "write_bytes": 24704496640,
+ "write_count": 1125490},
{"disk_name": "nvme0n1p1",
"key": "disk_name",
"read_bytes": 7484416,
@@ -409,10 +409,10 @@ Get a specific item when field matches the given value::
# curl http://localhost:61208/api/4/diskio/disk_name/nvme0n1
{"nvme0n1": [{"disk_name": "nvme0n1",
"key": "disk_name",
- "read_bytes": 7890098688,
- "read_count": 344619,
- "write_bytes": 24110978048,
- "write_count": 1078819}]}
+ "read_bytes": 7908215296,
+ "read_count": 345603,
+ "write_bytes": 24704496640,
+ "write_count": 1125490}]}
GET folders
-----------
@@ -439,13 +439,13 @@ Get plugin stats::
# curl http://localhost:61208/api/4/fs
[{"device_name": "/dev/mapper/ubuntu--vg-ubuntu--lv",
- "free": 905225412608,
+ "free": 905216729088,
"fs_type": "ext4",
"key": "mnt_point",
"mnt_point": "/",
"percent": 5.0,
"size": 1003736440832,
- "used": 47448522752}]
+ "used": 47457206272}]
Fields descriptions:
@@ -466,13 +466,13 @@ Get a specific item when field matches the given value::
# curl http://localhost:61208/api/4/fs/mnt_point//
{"/": [{"device_name": "/dev/mapper/ubuntu--vg-ubuntu--lv",
- "free": 905225412608,
+ "free": 905216729088,
"fs_type": "ext4",
"key": "mnt_point",
"mnt_point": "/",
"percent": 5.0,
"size": 1003736440832,
- "used": 47448522752}]}
+ "used": 47457206272}]}
GET gpu
-------
@@ -545,10 +545,7 @@ GET load
Get plugin stats::
# curl http://localhost:61208/api/4/load
- {"cpucore": 16,
- "min1": 1.19580078125,
- "min15": 0.728515625,
- "min5": 0.9990234375}
+ {"cpucore": 16, "min1": 1.33740234375, "min15": 0.984375, "min5": 1.2060546875}
Fields descriptions:
@@ -560,7 +557,7 @@ Fields descriptions:
Get a specific field::
# curl http://localhost:61208/api/4/load/min1
- {"min1": 1.19580078125}
+ {"min1": 1.33740234375}
GET mem
-------
@@ -568,16 +565,16 @@ GET mem
Get plugin stats::
# curl http://localhost:61208/api/4/mem
- {"active": 8123240448,
- "available": 7505043456,
- "buffers": 322965504,
- "cached": 7686283264,
- "free": 7505043456,
- "inactive": 5349273600,
- "percent": 54.3,
- "shared": 1051676672,
+ {"active": 7930138624,
+ "available": 7938781184,
+ "buffers": 336519168,
+ "cached": 7680049152,
+ "free": 7938781184,
+ "inactive": 5387632640,
+ "percent": 51.7,
+ "shared": 1048281088,
"total": 16422473728,
- "used": 8917430272}
+ "used": 8483692544}
Fields descriptions:
@@ -604,13 +601,13 @@ GET memswap
Get plugin stats::
# curl http://localhost:61208/api/4/memswap
- {"free": 4288409600,
+ {"free": 4288147456,
"percent": 0.2,
"sin": 4096,
- "sout": 4055040,
+ "sout": 4153344,
"time_since_update": 1,
"total": 4294963200,
- "used": 6553600}
+ "used": 6815744}
Fields descriptions:
@@ -635,15 +632,15 @@ Get plugin stats::
# curl http://localhost:61208/api/4/network
[{"alias": None,
"bytes_all": 0,
- "bytes_all_gauge": 5895221761,
+ "bytes_all_gauge": 5920633766,
"bytes_recv": 0,
- "bytes_recv_gauge": 5571082392,
+ "bytes_recv_gauge": 5591813676,
"bytes_sent": 0,
- "bytes_sent_gauge": 324139369,
+ "bytes_sent_gauge": 328820090,
"interface_name": "wlp0s20f3",
"key": "interface_name",
"speed": 0,
- "time_since_update": 0.37969160079956055}]
+ "time_since_update": 0.38811731338500977}]
Fields descriptions:
@@ -672,15 +669,15 @@ Get a specific item when field matches the given value::
# curl http://localhost:61208/api/4/network/interface_name/wlp0s20f3
{"wlp0s20f3": [{"alias": None,
"bytes_all": 0,
- "bytes_all_gauge": 5895221761,
+ "bytes_all_gauge": 5920633766,
"bytes_recv": 0,
- "bytes_recv_gauge": 5571082392,
+ "bytes_recv_gauge": 5591813676,
"bytes_sent": 0,
- "bytes_sent_gauge": 324139369,
+ "bytes_sent_gauge": 328820090,
"interface_name": "wlp0s20f3",
"key": "interface_name",
"speed": 0,
- "time_since_update": 0.37969160079956055}]}
+ "time_since_update": 0.38811731338500977}]}
GET now
-------
@@ -688,7 +685,7 @@ GET now
Get plugin stats::
# curl http://localhost:61208/api/4/now
- {"custom": "2024-05-12 09:32:48 CEST", "iso": "2024-05-12T09:32:48+02:00"}
+ {"custom": "2024-05-12 10:03:54 CEST", "iso": "2024-05-12T10:03:54+02:00"}
Fields descriptions:
@@ -698,7 +695,7 @@ Fields descriptions:
Get a specific field::
# curl http://localhost:61208/api/4/now/iso
- {"iso": "2024-05-12T09:32:48+02:00"}
+ {"iso": "2024-05-12T10:03:54+02:00"}
GET percpu
----------
@@ -718,11 +715,11 @@ Get plugin stats::
"steal": 0.0,
"system": 0.0,
"total": 100.0,
- "user": 1.0},
+ "user": 0.0},
{"cpu_number": 1,
"guest": 0.0,
"guest_nice": 0.0,
- "idle": 1.0,
+ "idle": 0.0,
"iowait": 0.0,
"irq": 0.0,
"key": "cpu_number",
@@ -730,7 +727,7 @@ Get plugin stats::
"softirq": 0.0,
"steal": 0.0,
"system": 0.0,
- "total": 99.0,
+ "total": 100.0,
"user": 0.0}]
Fields descriptions:
@@ -765,7 +762,7 @@ Get plugin stats::
"port": 0,
"refresh": 30,
"rtt_warning": None,
- "status": 0.00664,
+ "status": 0.007825,
"timeout": 3}]
Fields descriptions:
@@ -793,7 +790,7 @@ Get a specific item when field matches the given value::
"port": 0,
"refresh": 30,
"rtt_warning": None,
- "status": 0.00664,
+ "status": 0.007825,
"timeout": 3}]}
GET processcount
@@ -802,7 +799,7 @@ GET processcount
Get plugin stats::
# curl http://localhost:61208/api/4/processcount
- {"pid_max": 0, "running": 1, "sleeping": 290, "thread": 1643, "total": 432}
+ {"pid_max": 0, "running": 1, "sleeping": 290, "thread": 1672, "total": 433}
Fields descriptions:
@@ -815,7 +812,7 @@ Fields descriptions:
Get a specific field::
# curl http://localhost:61208/api/4/processcount/total
- {"total": 432}
+ {"total": 433}
GET processlist
---------------
@@ -855,14 +852,14 @@ GET quicklook
Get plugin stats::
# curl http://localhost:61208/api/4/quicklook
- {"cpu": 25.0,
+ {"cpu": 0.0,
"cpu_hz": 4475000000.0,
- "cpu_hz_current": 1170889250.0,
+ "cpu_hz_current": 1287681187.5,
"cpu_log_core": 16,
"cpu_name": "13th Gen Intel(R) Core(TM) i7-13620H",
"cpu_phys_core": 10,
- "load": 4.6,
- "mem": 54.3,
+ "load": 6.2,
+ "mem": 51.7,
"percpu": [{"cpu_number": 0,
"guest": 0.0,
"guest_nice": 0.0,
@@ -875,11 +872,11 @@ Get plugin stats::
"steal": 0.0,
"system": 0.0,
"total": 100.0,
- "user": 1.0},
+ "user": 0.0},
{"cpu_number": 1,
"guest": 0.0,
"guest_nice": 0.0,
- "idle": 1.0,
+ "idle": 0.0,
"iowait": 0.0,
"irq": 0.0,
"key": "cpu_number",
@@ -887,12 +884,12 @@ Get plugin stats::
"softirq": 0.0,
"steal": 0.0,
"system": 0.0,
- "total": 99.0,
+ "total": 100.0,
"user": 0.0},
{"cpu_number": 2,
"guest": 0.0,
"guest_nice": 0.0,
- "idle": 0.0,
+ "idle": 1.0,
"iowait": 0.0,
"irq": 0.0,
"key": "cpu_number",
@@ -900,7 +897,7 @@ Get plugin stats::
"softirq": 0.0,
"steal": 0.0,
"system": 0.0,
- "total": 100.0,
+ "total": 99.0,
"user": 0.0},
{"cpu_number": 3,
"guest": 0.0,
@@ -970,7 +967,7 @@ Get plugin stats::
{"cpu_number": 8,
"guest": 0.0,
"guest_nice": 0.0,
- "idle": 1.0,
+ "idle": 0.0,
"iowait": 0.0,
"irq": 0.0,
"key": "cpu_number",
@@ -978,7 +975,7 @@ Get plugin stats::
"softirq": 0.0,
"steal": 0.0,
"system": 0.0,
- "total": 99.0,
+ "total": 100.0,
"user": 0.0},
{"cpu_number": 9,
"guest": 0.0,
@@ -1109,14 +1106,14 @@ Get plugin stats::
"label": "Ambient",
"type": "temperature_core",
"unit": "C",
- "value": 32,
+ "value": 35,
"warning": 0},
{"critical": None,
"key": "label",
"label": "Ambient 3",
"type": "temperature_core",
"unit": "C",
- "value": 26,
+ "value": 29,
"warning": 0}]
Fields descriptions:
@@ -1177,7 +1174,7 @@ Get a specific item when field matches the given value::
"label": "Ambient",
"type": "temperature_core",
"unit": "C",
- "value": 32,
+ "value": 35,
"warning": 0}]}
GET smart
@@ -1221,7 +1218,7 @@ GET uptime
Get plugin stats::
# curl http://localhost:61208/api/4/uptime
- "6 days, 0:09:01"
+ "6 days, 0:40:06"
GET version
-----------
@@ -1229,7 +1226,7 @@ GET version
Get plugin stats::
# curl http://localhost:61208/api/4/version
- "4.0.0_rc03"
+ "4.0.0"
GET wifi
--------
@@ -1238,8 +1235,8 @@ Get plugin stats::
# curl http://localhost:61208/api/4/wifi
[{"key": "ssid",
- "quality_level": -63.0,
- "quality_link": 47.0,
+ "quality_level": -60.0,
+ "quality_link": 50.0,
"ssid": "wlp0s20f3"}]
Get a specific field::
@@ -1251,8 +1248,8 @@ Get a specific item when field matches the given value::
# curl http://localhost:61208/api/4/wifi/ssid/wlp0s20f3
{"wlp0s20f3": [{"key": "ssid",
- "quality_level": -63.0,
- "quality_link": 47.0,
+ "quality_level": -60.0,
+ "quality_link": 50.0,
"ssid": "wlp0s20f3"}]}
GET all stats
@@ -1297,34 +1294,34 @@ GET stats history
History of a plugin::
# curl http://localhost:61208/api/4/cpu/history
- {"system": [["2024-05-12T09:32:49.897081", 0.0],
- ["2024-05-12T09:32:50.949869", 0.0],
- ["2024-05-12T09:32:52.026236", 0.0]],
- "user": [["2024-05-12T09:32:49.897070", 0.0],
- ["2024-05-12T09:32:50.949864", 0.0],
- ["2024-05-12T09:32:52.026226", 0.0]]}
+ {"system": [["2024-05-12T10:03:56.177540", 1.0],
+ ["2024-05-12T10:03:57.232143", 0.0],
+ ["2024-05-12T10:03:58.309333", 0.0]],
+ "user": [["2024-05-12T10:03:56.177529", 0.0],
+ ["2024-05-12T10:03:57.232137", 1.0],
+ ["2024-05-12T10:03:58.309316", 1.0]]}
Limit history to last 2 values::
# curl http://localhost:61208/api/4/cpu/history/2
- {"system": [["2024-05-12T09:32:50.949869", 0.0],
- ["2024-05-12T09:32:52.026236", 0.0]],
- "user": [["2024-05-12T09:32:50.949864", 0.0],
- ["2024-05-12T09:32:52.026226", 0.0]]}
+ {"system": [["2024-05-12T10:03:57.232143", 0.0],
+ ["2024-05-12T10:03:58.309333", 0.0]],
+ "user": [["2024-05-12T10:03:57.232137", 1.0],
+ ["2024-05-12T10:03:58.309316", 1.0]]}
History for a specific field::
# curl http://localhost:61208/api/4/cpu/system/history
- {"system": [["2024-05-12T09:32:48.680666", 0.0],
- ["2024-05-12T09:32:49.897081", 0.0],
- ["2024-05-12T09:32:50.949869", 0.0],
- ["2024-05-12T09:32:52.026236", 0.0]]}
+ {"system": [["2024-05-12T10:03:54.950945", 1.0],
+ ["2024-05-12T10:03:56.177540", 1.0],
+ ["2024-05-12T10:03:57.232143", 0.0],
+ ["2024-05-12T10:03:58.309333", 0.0]]}
Limit history for a specific field to last 2 values::
# curl http://localhost:61208/api/4/cpu/system/history
- {"system": [["2024-05-12T09:32:50.949869", 0.0],
- ["2024-05-12T09:32:52.026236", 0.0]]}
+ {"system": [["2024-05-12T10:03:57.232143", 0.0],
+ ["2024-05-12T10:03:58.309333", 0.0]]}
GET limits (used for thresholds)
--------------------------------