From b67c717b3af357f72bef8f4847dca4af84576389 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sun, 22 Jan 2023 11:14:59 +0100 Subject: [PATCH] Improve documentation regarding regexp in configuration file --- docs/aoa/diskio.rst | 6 + docs/aoa/docker.rst | 5 + docs/aoa/fs.rst | 6 + docs/aoa/network.rst | 6 + docs/api.rst | 999 ++++++++++++++++++++++--------------------- docs/man/glances.1 | 2 +- 6 files changed, 526 insertions(+), 498 deletions(-) diff --git a/docs/aoa/diskio.rst b/docs/aoa/diskio.rst index 9a1e87d7..85125481 100644 --- a/docs/aoa/diskio.rst +++ b/docs/aoa/diskio.rst @@ -37,3 +37,9 @@ or another example: [diskio] show=sda.* + +Filtering is based on regular expression. Please be sure that your regular +expression works as expected. You can use an online tool like `regex101`_ in +order to test your regular expression. + +.. _regex101: https://regex101.com/ \ No newline at end of file diff --git a/docs/aoa/docker.rst b/docs/aoa/docker.rst index cc8c485b..568978d1 100644 --- a/docs/aoa/docker.rst +++ b/docs/aoa/docker.rst @@ -47,4 +47,9 @@ under the ``[docker]`` section: You can use all the variables ({{foo}}) available in the Docker plugin. +Filtering (for hide or show) is based on regular expression. Please be sure that your regular +expression works as expected. You can use an online tool like `regex101`_ in +order to test your regular expression. + +.. _regex101: https://regex101.com/ .. _docker-py: https://github.com/docker/docker-py diff --git a/docs/aoa/fs.rst b/docs/aoa/fs.rst index 8123bf1d..4d5dc100 100644 --- a/docs/aoa/fs.rst +++ b/docs/aoa/fs.rst @@ -53,3 +53,9 @@ Example to only show /dev/sdb mount points: [fs] show=/dev/sdb.* + +Filtering is based on regular expression. Please be sure that your regular +expression works as expected. You can use an online tool like `regex101`_ in +order to test your regular expression. + +.. _regex101: https://regex101.com/ \ No newline at end of file diff --git a/docs/aoa/network.rst b/docs/aoa/network.rst index 27ad1581..a1f116ac 100644 --- a/docs/aoa/network.rst +++ b/docs/aoa/network.rst @@ -53,3 +53,9 @@ virtual docker interface (docker0, docker1, ...): wlan0_tx_warning=900000 wlan0_tx_critical=1000000 wlan0_tx_log=True + +Filtering is based on regular expression. Please be sure that your regular +expression works as expected. You can use an online tool like `regex101`_ in +order to test your regular expression. + +.. _regex101: https://regex101.com/ \ No newline at end of file diff --git a/docs/api.rst b/docs/api.rst index d60c548f..443af5f8 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -60,6 +60,25 @@ Get the plugins list:: "uptime", "wifi"] +GET alert +--------- + +Get plugin stats:: + + # curl http://localhost:61208/api/3/alert + [[1674381772.0, + -1, + "WARNING", + "CPU_TOTAL", + 78.1, + 78.1, + 78.1, + 78.1, + 1, + [], + "", + "cpu_percent"]] + GET amps -------- @@ -74,7 +93,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.8425271511077881}, + "timer": 1.1751177310943604}, {"count": 0, "countmax": 20.0, "countmin": None, @@ -83,7 +102,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.8423657417297363}] + "timer": 1.1748502254486084}] Get a specific field:: @@ -101,7 +120,7 @@ Get a specific item when field matchs the given value:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.8425271511077881}]} + "timer": 1.1751177310943604}]} GET core -------- @@ -131,19 +150,19 @@ Get plugin stats:: "ctx_switches": 0, "guest": 0.0, "guest_nice": 0.0, - "idle": 58.6, + "idle": 14.7, "interrupts": 0, - "iowait": 0.0, + "iowait": 7.4, "irq": 0.0, "nice": 0.0, "soft_interrupts": 0, - "softirq": 0.0, + "softirq": 0.9, "steal": 0.0, "syscalls": 0, - "system": 6.7, + "system": 19.4, "time_since_update": 1, - "total": 38.2, - "user": 34.7} + "total": 78.1, + "user": 57.6} Fields descriptions: @@ -166,7 +185,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/3/cpu/total - {"total": 38.2} + {"total": 78.1} GET diskio ---------- @@ -215,7 +234,7 @@ Get plugin stats:: "Id": "3abd51c615968482d9ccff5afc629f267f6dda113ed68b75b432615fae3b49fb", "Image": ["portainer/portainer-ce:2.9.3"], "Status": "running", - "Uptime": "36 mins", + "Uptime": "23 hours", "cpu": {"total": 0.0}, "cpu_percent": 0.0, "io": {}, @@ -230,18 +249,18 @@ Get plugin stats:: "network_tx": None}], "version": {"ApiVersion": "1.41", "Arch": "amd64", - "BuildTime": "2022-12-15T22:25:58.000000000+00:00", + "BuildTime": "2023-01-19T17:34:14.000000000+00:00", "Components": [{"Details": {"ApiVersion": "1.41", "Arch": "amd64", - "BuildTime": "2022-12-15T22:25:58.000000000+00:00", + "BuildTime": "2023-01-19T17:34:14.000000000+00:00", "Experimental": "false", - "GitCommit": "42c8b31", - "GoVersion": "go1.18.9", - "KernelVersion": "5.15.0-56-generic", + "GitCommit": "6051f14", + "GoVersion": "go1.18.10", + "KernelVersion": "5.15.0-58-generic", "MinAPIVersion": "1.12", "Os": "linux"}, "Name": "Engine", - "Version": "20.10.22"}, + "Version": "20.10.23"}, {"Details": {"GitCommit": "5b842e528e99d4d4c1686467debf2bd4b88ecd86"}, "Name": "containerd", "Version": "1.6.15"}, @@ -251,13 +270,13 @@ Get plugin stats:: {"Details": {"GitCommit": "de40ad0"}, "Name": "docker-init", "Version": "0.19.0"}], - "GitCommit": "42c8b31", - "GoVersion": "go1.18.9", - "KernelVersion": "5.15.0-56-generic", + "GitCommit": "6051f14", + "GoVersion": "go1.18.10", + "KernelVersion": "5.15.0-58-generic", "MinAPIVersion": "1.12", "Os": "linux", "Platform": {"Name": "Docker Engine - Community"}, - "Version": "20.10.22"}} + "Version": "20.10.23"}} GET fs ------ @@ -266,13 +285,13 @@ Get plugin stats:: # curl http://localhost:61208/api/3/fs [{"device_name": "/dev/mapper/ubuntu--gnome--vg-root", - "free": 50442330112, + "free": 63000883200, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", - "percent": 78.2, + "percent": 72.7, "size": 243334156288, - "used": 180504371200}, + "used": 167945818112}, {"device_name": "zsfpool", "free": 41811968, "fs_type": "zfs", @@ -291,13 +310,13 @@ Get a specific item when field matchs the given value:: # curl http://localhost:61208/api/3/fs/mnt_point// {"/": [{"device_name": "/dev/mapper/ubuntu--gnome--vg-root", - "free": 50442330112, + "free": 63000883200, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", - "percent": 78.2, + "percent": 72.7, "size": 243334156288, - "used": 180504371200}]} + "used": 167945818112}]} GET ip ------ @@ -305,17 +324,17 @@ GET ip Get plugin stats:: # curl http://localhost:61208/api/3/ip - {"address": "192.168.1.14", - "gateway": "192.168.1.1", + {"address": "192.168.0.32", + "gateway": "192.168.0.254", "mask": "255.255.255.0", "mask_cidr": 24, - "public_address": "109.210.93.150", + "public_address": "91.166.228.228", "public_info_human": ""} Get a specific field:: # curl http://localhost:61208/api/3/ip/gateway - {"gateway": "192.168.1.1"} + {"gateway": "192.168.0.254"} GET load -------- @@ -323,7 +342,10 @@ GET load Get plugin stats:: # curl http://localhost:61208/api/3/load - {"cpucore": 4, "min1": 1.31591796875, "min15": 1.9091796875, "min5": 1.6796875} + {"cpucore": 4, + "min1": 2.79248046875, + "min15": 0.6044921875, + "min5": 1.24951171875} Fields descriptions: @@ -335,7 +357,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/3/load/min1 - {"min1": 1.31591796875} + {"min1": 2.79248046875} GET mem ------- @@ -343,16 +365,16 @@ GET mem Get plugin stats:: # curl http://localhost:61208/api/3/mem - {"active": 2804523008, - "available": 2706178048, - "buffers": 264335360, - "cached": 3114909696, - "free": 2706178048, - "inactive": 3516907520, - "percent": 65.5, - "shared": 591532032, - "total": 7836188672, - "used": 5130010624} + {"active": 3232829440, + "available": 2574643200, + "buffers": 482086912, + "cached": 2828992512, + "free": 2574643200, + "inactive": 3375968256, + "percent": 67.1, + "shared": 610131968, + "total": 7836196864, + "used": 5261553664} Fields descriptions: @@ -371,7 +393,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/3/mem/total - {"total": 7836188672} + {"total": 7836196864} GET memswap ----------- @@ -379,13 +401,13 @@ GET memswap Get plugin stats:: # curl http://localhost:61208/api/3/memswap - {"free": 2626473984, - "percent": 67.5, - "sin": 4755005440, - "sout": 11063549952, + {"free": 6393114624, + "percent": 20.9, + "sin": 1016889344, + "sout": 2570014720, "time_since_update": 1, "total": 8082419712, - "used": 5455945728} + "used": 1689305088} Fields descriptions: @@ -409,29 +431,29 @@ Get plugin stats:: # curl http://localhost:61208/api/3/network [{"alias": None, - "cumulative_cx": 398215554, - "cumulative_rx": 199107777, - "cumulative_tx": 199107777, - "cx": 3314, + "cumulative_cx": 104446528, + "cumulative_rx": 52223264, + "cumulative_tx": 52223264, + "cx": 2384, "interface_name": "lo", "is_up": True, "key": "interface_name", - "rx": 1657, + "rx": 1192, "speed": 0, "time_since_update": 1, - "tx": 1657}, + "tx": 1192}, {"alias": None, - "cumulative_cx": 39497892918, - "cumulative_rx": 38949809930, - "cumulative_tx": 548082988, - "cx": 27720, + "cumulative_cx": 12191054510, + "cumulative_rx": 11933885504, + "cumulative_tx": 257169006, + "cx": 29422, "interface_name": "wlp2s0", "is_up": True, "key": "interface_name", - "rx": 21708, + "rx": 22777, "speed": 0, "time_since_update": 1, - "tx": 6012}] + "tx": 6645}] Fields descriptions: @@ -452,29 +474,29 @@ Get a specific field:: # curl http://localhost:61208/api/3/network/interface_name {"interface_name": ["lo", "wlp2s0", - "docker0", - "br-119e6ee04e05", - "br-87386b77b676", "br_grafana", + "br-119e6ee04e05", + "docker0", + "br-87386b77b676", "mpqemubr0", - "tap-1e376645a40", - "veth57bdacb"]} + "vethf503072", + "tap-1e376645a40"]} Get a specific item when field matchs the given value:: # curl http://localhost:61208/api/3/network/interface_name/lo {"lo": [{"alias": None, - "cumulative_cx": 398215554, - "cumulative_rx": 199107777, - "cumulative_tx": 199107777, - "cx": 3314, + "cumulative_cx": 104446528, + "cumulative_rx": 52223264, + "cumulative_tx": 52223264, + "cx": 2384, "interface_name": "lo", "is_up": True, "key": "interface_name", - "rx": 1657, + "rx": 1192, "speed": 0, "time_since_update": 1, - "tx": 1657}]} + "tx": 1192}]} GET now ------- @@ -482,7 +504,7 @@ GET now Get plugin stats:: # curl http://localhost:61208/api/3/now - "2023-01-14 09:45:44 CET" + "2023-01-22 11:02:51 CET" GET percpu ---------- @@ -493,29 +515,29 @@ Get plugin stats:: [{"cpu_number": 0, "guest": 0.0, "guest_nice": 0.0, - "idle": 56.1, - "iowait": 0.0, + "idle": 20.3, + "iowait": 12.3, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 4.7, - "total": 43.9, - "user": 39.3}, + "system": 24.6, + "total": 79.7, + "user": 42.8}, {"cpu_number": 1, "guest": 0.0, "guest_nice": 0.0, - "idle": 28.2, - "iowait": 0.0, + "idle": 16.4, + "iowait": 6.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 3.9, - "total": 71.8, - "user": 68.0}] + "system": 12.7, + "total": 83.6, + "user": 64.9}] Get a specific field:: @@ -529,30 +551,30 @@ Get plugin stats:: # curl http://localhost:61208/api/3/ports [{"description": "DefaultGateway", - "host": "192.168.1.1", + "host": "192.168.0.254", "indice": "port_0", "port": 0, "refresh": 30, "rtt_warning": None, - "status": 0.007094, + "status": 0.01009, "timeout": 3}] Get a specific field:: # curl http://localhost:61208/api/3/ports/host - {"host": ["192.168.1.1"]} + {"host": ["192.168.0.254"]} Get a specific item when field matchs the given value:: - # curl http://localhost:61208/api/3/ports/host/192.168.1.1 - {"192.168.1.1": [{"description": "DefaultGateway", - "host": "192.168.1.1", - "indice": "port_0", - "port": 0, - "refresh": 30, - "rtt_warning": None, - "status": 0.007094, - "timeout": 3}]} + # curl http://localhost:61208/api/3/ports/host/192.168.0.254 + {"192.168.0.254": [{"description": "DefaultGateway", + "host": "192.168.0.254", + "indice": "port_0", + "port": 0, + "refresh": 30, + "rtt_warning": None, + "status": 0.01009, + "timeout": 3}]} GET processcount ---------------- @@ -560,12 +582,12 @@ GET processcount Get plugin stats:: # curl http://localhost:61208/api/3/processcount - {"pid_max": 0, "running": 2, "sleeping": 334, "thread": 1765, "total": 403} + {"pid_max": 0, "running": 2, "sleeping": 311, "thread": 1523, "total": 386} Get a specific field:: # curl http://localhost:61208/api/3/processcount/total - {"total": 403} + {"total": 386} GET processlist --------------- @@ -573,51 +595,51 @@ GET processlist Get plugin stats:: # curl http://localhost:61208/api/3/processlist - [{"cmdline": ["/snap/firefox/2154/usr/lib/firefox/firefox"], + [{"cmdline": ["/snap/firefox/2263/usr/lib/firefox/firefox"], "cpu_percent": 0.0, - "cpu_times": [8504.75, 2803.93, 8401.36, 1489.57, 0.0], + "cpu_times": [2122.86, 658.23, 1239.16, 210.94, 0.0], "gids": [1000, 1000, 1000], - "io_counters": [6360911872, 11858505728, 0, 0, 0], + "io_counters": [1674662912, 3749654528, 0, 0, 0], "key": "pid", - "memory_info": [484036608, 22242152448, 100323328, 659456, 0, 1409527808, 0], - "memory_percent": 6.176939176178121, + "memory_info": [584667136, 21991870464, 132120576, 647168, 0, 1149304832, 0], + "memory_percent": 7.461108317556428, "name": "firefox", "nice": 0, - "num_threads": 187, - "pid": 4674, + "num_threads": 146, + "pid": 5040, "status": "S", "time_since_update": 1, "username": "nicolargo"}, - {"cmdline": ["/snap/firefox/2154/usr/lib/firefox/firefox", + {"cmdline": ["/snap/firefox/2263/usr/lib/firefox/firefox", "-contentproc", "-childID", "1", "-isForBrowser", "-prefsLen", - "31799", + "32129", "-prefMapSize", - "234979", + "236410", "-jsInitLen", - "246704", + "246772", "-parentBuildID", - "20221128185858", + "20230104235612", "-appDir", - "/snap/firefox/2154/usr/lib/firefox/browser", - "{8ed7e0e9-5dcf-4c35-9523-65d5178968f5}", - "4674", + "/snap/firefox/2263/usr/lib/firefox/browser", + "{152fde2c-5751-4719-9edb-ff980730fbac}", + "5040", "true", "tab"], "cpu_percent": 0.0, - "cpu_times": [1878.88, 294.96, 0.0, 0.0, 0.0], + "cpu_times": [467.87, 83.56, 0.0, 0.0, 0.0], "gids": [1000, 1000, 1000], - "io_counters": [446676992, 0, 0, 0, 0], + "io_counters": [213443584, 0, 0, 0, 0], "key": "pid", - "memory_info": [379330560, 3766951936, 44253184, 659456, 0, 1161146368, 0], - "memory_percent": 4.840753277871052, + "memory_info": [397238272, 3228049408, 70422528, 647168, 0, 639614976, 0], + "memory_percent": 5.069273767545818, "name": "WebExtensions", "nice": 0, "num_threads": 20, - "pid": 4980, + "pid": 5246, "status": "S", "time_since_update": 1, "username": "nicolargo"}] @@ -625,240 +647,217 @@ Get plugin stats:: Get a specific field:: # curl http://localhost:61208/api/3/processlist/pid - {"pid": [4674, - 4980, - 5110, - 527830, - 173709, - 3699, - 5464, - 431554, - 495017, - 5113, - 173765, - 174093, - 87518, - 10140, - 93773, - 5000, - 173645, - 534445, - 511174, - 173751, - 534543, - 9953, - 534732, - 535113, - 284680, - 128927, - 173679, - 535159, - 4050, - 3586, - 4426, - 173949, - 493657, - 511164, - 2510, - 3351, - 173688, - 173781, - 496818, - 496817, - 408152, - 493678, - 4206, - 511549, - 427, - 173973, - 3820, - 5730, - 17316, - 174051, - 1616, - 3512, - 493683, + {"pid": [5040, + 5246, + 5369, + 5752, + 10873, + 5365, + 10653, + 90446, + 4150, + 10724, + 109138, + 4519, + 422, + 109284, + 95798, + 22179, + 11307, + 36722, + 110258, + 5261, + 62850, + 10547, + 110317, + 10709, + 109762, + 110036, + 109882, + 10612, + 6074, + 96478, + 42687, + 4035, + 110285, + 2512, + 11033, + 1672, + 4473, + 5179, + 6020, + 10732, + 6022, + 4585, + 4544, + 10632, + 23231, + 23230, + 11251, + 4248, + 4413, + 11252, + 3955, + 4223, + 2721, + 4932, + 1816, + 90918, + 1635, + 14455, + 10848, + 43005, + 90973, + 4332, + 4263, + 4625, + 2239, + 1806, + 4325, + 14458, 1, - 5690, - 3903, - 4008, - 165775, - 3792, - 174314, - 493699, - 94498, - 2702, - 1662, - 1641, - 87895, - 87994, - 4158, - 87995, - 174313, - 4433, - 87753, - 3897, - 5691, - 4458, - 87853, - 94497, - 4903, - 3902, - 17315, - 3829, - 173649, - 87454, - 3273, - 1838, - 3676, - 3783, - 3695, - 10499, - 87474, - 3907, - 2209, - 3730, - 3486, - 3915, - 3901, - 3910, - 10649, - 533610, - 10551, - 511526, - 10082, - 87412, - 1615, - 173650, - 4005, - 3904, - 10318, - 165937, - 1663, - 1777, - 2417, - 2626, - 10319, - 3805, - 10094, - 3956, - 1837, - 17467, - 1636, - 2688, - 4049, - 4089, - 3521, - 87413, - 87779, - 3861, - 1416, - 102131, - 10032, - 1782, - 1598, - 115869, - 17484, - 3970, - 1659, - 3524, - 465, - 2159, - 3898, - 3527, - 3802, - 5024, - 3743, - 1626, - 10033, - 3908, - 4036, - 3697, - 4170, - 10048, - 1642, - 3906, - 1654, - 3717, - 173849, - 3591, - 3896, - 3726, - 3909, - 3722, - 3900, - 3781, - 3994, - 10381, - 3748, - 87429, - 3584, - 3905, - 1868, - 1612, - 3891, - 112675, - 1607, + 96102, + 4331, + 4182, + 102364, + 2701, + 91003, + 1681, + 4214, + 1876, + 1655, + 2640, + 2455, + 10557, + 1885, + 4561, 1660, - 3533, - 3510, - 98474, - 10372, - 3508, - 1648, - 1652, - 3706, - 3664, - 1629, - 1999, - 1614, - 1415, - 535105, - 1419, + 4445, + 1442, + 4130, + 4261, + 4339, + 4352, + 3944, + 1682, + 3934, + 4485, + 10558, + 4659, + 4328, + 4330, + 4137, + 4327, + 4334, + 4233, + 1777, + 3351, + 1873, + 59511, + 2179, + 1617, + 4050, + 17205, + 4192, + 4348, + 4166, + 4392, + 3700, + 1634, + 3966, + 17189, + 4573, + 4155, + 3968, + 3971, + 1675, + 4347, + 4329, + 1661, + 4377, + 6095, + 4229, 1666, - 4187, - 2680, - 173665, - 1432, - 17364, - 2681, - 1430, - 2428, + 5299, + 2683, + 4314, + 1673, + 1643, + 1676, + 46760, + 10911, + 4452, + 468, + 4335, + 4324, + 4524, + 2684, + 4443, + 4173, + 4337, + 4201, + 4212, + 42986, + 4178, + 1631, + 1670, + 3952, + 4045, + 3976, + 1443, + 3701, + 3953, + 1626, + 4119, + 4162, + 1646, + 2020, + 1441, + 1633, 3354, - 142951, - 1609, - 98475, - 1599, - 535158, - 5769, - 10035, - 173652, - 87415, - 3895, - 2483, - 511483, - 3572, - 511504, - 191811, - 98353, - 98484, - 511512, - 532452, - 98346, - 511490, - 4546, - 3487, - 2430, - 2492, - 2465, - 1431, - 1669, + 9703, + 49191, + 110201, + 14505, + 49179, + 10591, + 1449, + 4579, + 1685, + 1450, + 3774, + 10560, + 49194, + 2472, + 42952, + 1804, + 1803, + 42937, + 42964, + 42969, + 49182, + 3945, + 1618, + 110284, + 3707, + 4018, + 4323, + 4820, + 2480, + 104481, + 1695, + 2503, + 2475, + 2485, + 1447, + 1628, + 49185, 2, 3, 4, 5, - 7, - 9, + 6, + 8, 10, 11, 12, @@ -901,19 +900,21 @@ Get a specific field:: 100, 101, 104, - 105, - 108, + 106, + 107, + 109, 110, 112, - 113, + 117, 118, - 119, - 120, - 121, + 128, 131, - 135, - 141, - 204, + 137, + 171, + 175, + 201, + 205, + 217, 218, 219, 220, @@ -921,39 +922,33 @@ Get a specific field:: 222, 223, 224, - 225, + 248, 249, - 250, + 254, 255, - 256, - 313, - 366, - 367, + 312, + 361, + 362, + 442, 447, - 448, - 545, - 614, - 685, - 686, - 687, - 694, - 950, - 951, - 952, - 953, - 956, - 957, - 958, - 959, - 960, - 961, + 577, + 601, + 676, + 677, + 678, + 693, + 963, + 964, + 965, 966, 967, - 1021, - 1022, - 1023, - 1024, - 1025, + 968, + 969, + 970, + 971, + 972, + 973, + 974, 1026, 1027, 1028, @@ -968,88 +963,98 @@ Get a specific field:: 1037, 1038, 1039, - 1056, - 1057, - 1065, - 1066, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 2491, - 2527, - 2539, - 2586, - 2587, - 2589, - 2590, - 2592, + 1040, + 1041, + 1042, + 1043, + 1044, + 1071, + 1072, + 1080, + 1081, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 2504, + 2521, + 2531, + 2597, 2598, 2599, - 2606, - 3780, - 4620, - 10063, - 87445, - 282372, - 284747, - 284755, - 284756, - 284759, - 284760, - 445439, - 445440, - 445441, - 491085, - 493353, - 493435, - 493436, - 493437, - 493438, - 493440, - 493488, - 525438, - 526723, - 527334, - 529501, - 532606, - 532692, - 532694, - 532700, - 532986, - 533409, - 533601, - 533685, - 533744, - 533796, - 533986, - 534098, - 534679]} + 2600, + 2602, + 2604, + 2609, + 2610, + 4034, + 18603, + 62912, + 62921, + 62922, + 62923, + 62924, + 62925, + 78135, + 78136, + 78138, + 90658, + 90659, + 90662, + 90663, + 90665, + 90718, + 90731, + 107066, + 107228, + 107746, + 107747, + 108008, + 108340, + 108486, + 108619, + 108834, + 108931, + 109106, + 109124, + 109329, + 110081, + 110221, + 110262, + 110263, + 110268, + 110269, + 110311, + 110375, + 110376, + 110377, + 110378, + 110379]} Get a specific item when field matchs the given value:: - # curl http://localhost:61208/api/3/processlist/pid/4674 - {"4674": [{"cmdline": ["/snap/firefox/2154/usr/lib/firefox/firefox"], + # curl http://localhost:61208/api/3/processlist/pid/5040 + {"5040": [{"cmdline": ["/snap/firefox/2263/usr/lib/firefox/firefox"], "cpu_percent": 0.0, - "cpu_times": [8504.75, 2803.93, 8401.36, 1489.57, 0.0], + "cpu_times": [2122.86, 658.23, 1239.16, 210.94, 0.0], "gids": [1000, 1000, 1000], - "io_counters": [6360911872, 11858505728, 0, 0, 0], + "io_counters": [1674662912, 3749654528, 0, 0, 0], "key": "pid", - "memory_info": [484036608, - 22242152448, - 100323328, - 659456, + "memory_info": [584667136, + 21991870464, + 132120576, + 647168, 0, - 1409527808, + 1149304832, 0], - "memory_percent": 6.176939176178121, + "memory_percent": 7.461108317556428, "name": "firefox", "nice": 0, - "num_threads": 187, - "pid": 4674, + "num_threads": 146, + "pid": 5040, "status": "S", "time_since_update": 1, "username": "nicolargo"}]} @@ -1068,69 +1073,69 @@ GET quicklook Get plugin stats:: # curl http://localhost:61208/api/3/quicklook - {"cpu": 38.2, + {"cpu": 78.1, "cpu_hz": 2025000000.0, - "cpu_hz_current": 1247640750.0, + "cpu_hz_current": 1728936749.9999998, "cpu_name": "Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz", - "mem": 65.5, + "mem": 67.1, "percpu": [{"cpu_number": 0, "guest": 0.0, "guest_nice": 0.0, - "idle": 56.1, - "iowait": 0.0, + "idle": 20.3, + "iowait": 12.3, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 4.7, - "total": 43.9, - "user": 39.3}, + "system": 24.6, + "total": 79.7, + "user": 42.8}, {"cpu_number": 1, "guest": 0.0, "guest_nice": 0.0, - "idle": 28.2, - "iowait": 0.0, + "idle": 16.4, + "iowait": 6.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 3.9, - "total": 71.8, - "user": 68.0}, + "system": 12.7, + "total": 83.6, + "user": 64.9}, {"cpu_number": 2, "guest": 0.0, "guest_nice": 0.0, - "idle": 82.4, - "iowait": 0.0, + "idle": 9.2, + "iowait": 7.7, "irq": 0.0, "key": "cpu_number", "nice": 0.0, - "softirq": 0.0, + "softirq": 2.1, "steal": 0.0, - "system": 2.9, - "total": 17.6, - "user": 14.7}, + "system": 18.3, + "total": 90.8, + "user": 62.7}, {"cpu_number": 3, "guest": 0.0, "guest_nice": 0.0, - "idle": 80.4, - "iowait": 0.0, + "idle": 12.1, + "iowait": 2.9, "irq": 0.0, "key": "cpu_number", "nice": 0.0, - "softirq": 0.0, + "softirq": 0.7, "steal": 0.0, - "system": 4.9, - "total": 19.6, - "user": 14.7}], - "swap": 67.5} + "system": 13.6, + "total": 87.9, + "user": 70.7}], + "swap": 20.9} Get a specific field:: # curl http://localhost:61208/api/3/quicklook/cpu - {"cpu": 38.2} + {"cpu": 78.1} GET sensors ----------- @@ -1158,12 +1163,12 @@ Get a specific field:: # curl http://localhost:61208/api/3/sensors/label {"label": ["acpitz 1", "acpitz 2", - "CPU", - "Ambient", - "SODIMM", "Package id 0", "Core 0", "Core 1", + "CPU", + "Ambient", + "SODIMM", "BAT BAT0"]} Get a specific item when field matchs the given value:: @@ -1187,7 +1192,7 @@ Get plugin stats:: "hr_name": "Ubuntu 22.04 64bit", "linux_distro": "Ubuntu 22.04", "os_name": "Linux", - "os_version": "5.15.0-56-generic", + "os_version": "5.15.0-58-generic", "platform": "64bit"} Get a specific field:: @@ -1201,7 +1206,7 @@ GET uptime Get plugin stats:: # curl http://localhost:61208/api/3/uptime - "32 days, 23:30:09" + "7 days, 17:52:03" GET all stats ------------- @@ -1217,33 +1222,33 @@ GET stats history History of a plugin:: # curl http://localhost:61208/api/3/cpu/history - {"system": [["2023-01-14T09:45:45.821873", 6.7], - ["2023-01-14T09:45:46.919905", 6.7], - ["2023-01-14T09:45:48.110702", 4.8]], - "user": [["2023-01-14T09:45:45.821864", 34.7], - ["2023-01-14T09:45:46.919895", 34.7], - ["2023-01-14T09:45:48.110694", 12.4]]} + {"system": [["2023-01-22T11:02:52.355003", 19.4], + ["2023-01-22T11:02:53.467824", 19.4], + ["2023-01-22T11:02:54.710232", 13.2]], + "user": [["2023-01-22T11:02:52.354990", 57.6], + ["2023-01-22T11:02:53.467809", 57.6], + ["2023-01-22T11:02:54.710224", 28.5]]} Limit history to last 2 values:: # curl http://localhost:61208/api/3/cpu/history/2 - {"system": [["2023-01-14T09:45:46.919905", 6.7], - ["2023-01-14T09:45:48.110702", 4.8]], - "user": [["2023-01-14T09:45:46.919895", 34.7], - ["2023-01-14T09:45:48.110694", 12.4]]} + {"system": [["2023-01-22T11:02:53.467824", 19.4], + ["2023-01-22T11:02:54.710232", 13.2]], + "user": [["2023-01-22T11:02:53.467809", 57.6], + ["2023-01-22T11:02:54.710224", 28.5]]} History for a specific field:: # curl http://localhost:61208/api/3/cpu/system/history - {"system": [["2023-01-14T09:45:45.821873", 6.7], - ["2023-01-14T09:45:46.919905", 6.7], - ["2023-01-14T09:45:48.110702", 4.8]]} + {"system": [["2023-01-22T11:02:52.355003", 19.4], + ["2023-01-22T11:02:53.467824", 19.4], + ["2023-01-22T11:02:54.710232", 13.2]]} Limit history for a specific field to last 2 values:: # curl http://localhost:61208/api/3/cpu/system/history - {"system": [["2023-01-14T09:45:46.919905", 6.7], - ["2023-01-14T09:45:48.110702", 4.8]]} + {"system": [["2023-01-22T11:02:53.467824", 19.4], + ["2023-01-22T11:02:54.710232", 13.2]]} GET limits (used for thresholds) -------------------------------- diff --git a/docs/man/glances.1 b/docs/man/glances.1 index 4a07513f..6aada202 100644 --- a/docs/man/glances.1 +++ b/docs/man/glances.1 @@ -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, 2023" "3.3.1" "Glances" +.TH "GLANCES" "1" "Jan 22, 2023" "3.4.0_beta1" "Glances" .SH NAME glances \- An eye on your system .SH SYNOPSIS