From fdfb977b1d91b5e410bc06c4e19f8bedb0005ce9 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sun, 12 Apr 2026 09:22:36 +0200 Subject: [PATCH] Cross-Origin Information Disclosure via Unauthenticated REST API (/api/4) due to Permissive CORS in Glances - Mitigate CVE-2026-34839 --- docs/api/python.rst | 369 +++++----- docs/api/restful.rst | 952 +++++++++++++++---------- docs/man/glances.1 | 2 +- glances/outputs/glances_restful_api.py | 20 +- 4 files changed, 758 insertions(+), 585 deletions(-) diff --git a/docs/api/python.rst b/docs/api/python.rst index 13e2ed4d..cbc2cb82 100644 --- a/docs/api/python.rst +++ b/docs/api/python.rst @@ -22,25 +22,25 @@ use the following code: >>> gl = api.GlancesAPI() >>> gl.cpu {'cpucore': 16, - 'ctx_switches': 502139822, + 'ctx_switches': 525580610, 'guest': 0.0, - 'idle': 92.6, - 'interrupts': 296818290, - 'iowait': 0.9, + 'idle': 92.2, + 'interrupts': 308665011, + 'iowait': 0.2, 'irq': 0.0, 'nice': 0.0, - 'soft_interrupts': 157791372, + 'soft_interrupts': 164580903, 'steal': 0.0, 'syscalls': 0, - 'system': 4.5, - 'total': 6.3, - 'user': 2.1} + 'system': 5.2, + 'total': 7.1, + 'user': 2.4} >>> gl.cpu.get("total") - 6.3 + 7.1 >>> gl.mem.get("used") - 9975667720 + 10398616584 >>> gl.auto_unit(gl.mem.get("used")) - 9.29G + 9.68G If the stats return a list of items (like network interfaces or processes), you can access them by their name: @@ -51,19 +51,19 @@ access them by their name: ['wlp0s20f3', 'veth22ca982'] >>> gl.network["wlp0s20f3"] {'alias': None, - 'bytes_all': 0, - 'bytes_all_gauge': 9101519697, - 'bytes_all_rate_per_sec': 0.0, - 'bytes_recv': 0, - 'bytes_recv_gauge': 8568694263, - 'bytes_recv_rate_per_sec': 0.0, - 'bytes_sent': 0, - 'bytes_sent_gauge': 532825434, - 'bytes_sent_rate_per_sec': 0.0, + 'bytes_all': 647, + 'bytes_all_gauge': 9436490359, + 'bytes_all_rate_per_sec': 3496.0, + 'bytes_recv': 369, + 'bytes_recv_gauge': 8864844532, + 'bytes_recv_rate_per_sec': 1994.0, + 'bytes_sent': 278, + 'bytes_sent_gauge': 571645827, + 'bytes_sent_rate_per_sec': 1502.0, 'interface_name': 'wlp0s20f3', 'key': 'interface_name', 'speed': 0, - 'time_since_update': 0.1952357292175293} + 'time_since_update': 0.18503737449645996} Init Glances Python API ----------------------- @@ -136,7 +136,7 @@ Ports stats: 'port': 0, 'refresh': 30, 'rtt_warning': None, - 'status': 0.006765, + 'status': 0.009761, 'timeout': 3}] Ports fields description: @@ -177,14 +177,14 @@ Diskio stats: >>> gl.diskio.get("nvme0n1") {'disk_name': 'nvme0n1', 'key': 'disk_name', - 'read_bytes': 26386735104, - 'read_count': 1799163, + 'read_bytes': 26857086976, + 'read_count': 1817591, 'read_latency': 0, - 'read_time': 377822, - 'write_bytes': 181084836864, - 'write_count': 4235009, + 'read_time': 387641, + 'write_bytes': 183147435008, + 'write_count': 4403623, 'write_latency': 0, - 'write_time': 9194472} + 'write_time': 9376536} Diskio fields description: @@ -250,7 +250,7 @@ Containers stats: 'network_tx': None, 'ports': '4222->4222/tcp,6222->6222/tcp,8222->8222/tcp', 'status': 'running', - 'uptime': '2 weeks'} + 'uptime': '3 weeks'} Containers fields description: @@ -295,11 +295,11 @@ Processcount stats: >>> type(gl.processcount) >>> gl.processcount - {'pid_max': 0, 'running': 1, 'sleeping': 429, 'thread': 2157, 'total': 577} + {'pid_max': 0, 'running': 1, 'sleeping': 430, 'thread': 2188, 'total': 580} >>> gl.processcount.keys() ['total', 'running', 'sleeping', 'thread', 'pid_max'] >>> gl.processcount.get("total") - 577 + 580 Processcount fields description: @@ -390,7 +390,7 @@ Percpu stats: 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, - 'system': 9.0, + 'system': 5.0, 'total': 71.0, 'user': 0.0} @@ -482,18 +482,18 @@ Network stats: >>> gl.network.get("wlp0s20f3") {'alias': None, 'bytes_all': 0, - 'bytes_all_gauge': 9101519697, + 'bytes_all_gauge': 9436490359, 'bytes_all_rate_per_sec': 0.0, 'bytes_recv': 0, - 'bytes_recv_gauge': 8568694263, + 'bytes_recv_gauge': 8864844532, 'bytes_recv_rate_per_sec': 0.0, 'bytes_sent': 0, - 'bytes_sent_gauge': 532825434, + 'bytes_sent_gauge': 571645827, 'bytes_sent_rate_per_sec': 0.0, 'interface_name': 'wlp0s20f3', 'key': 'interface_name', 'speed': 0, - 'time_since_update': 0.0017604827880859375} + 'time_since_update': 0.0031113624572753906} Network fields description: @@ -534,23 +534,23 @@ Cpu stats: >>> gl.cpu {'cpucore': 16, - 'ctx_switches': 502139822, + 'ctx_switches': 525580610, 'guest': 0.0, - 'idle': 92.6, - 'interrupts': 296818290, - 'iowait': 0.9, + 'idle': 92.2, + 'interrupts': 308665011, + 'iowait': 0.2, 'irq': 0.0, 'nice': 0.0, - 'soft_interrupts': 157791372, + 'soft_interrupts': 164580903, 'steal': 0.0, 'syscalls': 0, - 'system': 4.5, - 'total': 6.3, - 'user': 2.1} + 'system': 5.2, + 'total': 7.1, + 'user': 2.4} >>> gl.cpu.keys() ['total', 'user', 'nice', 'system', 'idle', 'iowait', 'irq', 'steal', 'guest', 'ctx_switches', 'interrupts', 'soft_interrupts', 'syscalls', 'cpucore'] >>> gl.cpu.get("total") - 6.3 + 7.1 Cpu fields description: @@ -625,7 +625,7 @@ Amps stats: 'refresh': 3.0, 'regex': True, 'result': None, - 'timer': 0.23367595672607422} + 'timer': 0.2181529998779297} Amps fields description: @@ -656,37 +656,37 @@ Processlist stats: >>> gl.processlist Return a dict of dict with key= >>> gl.processlist.keys() - [721368, 129, 9777, 542807, 542716, 436891, 8146, 9348, 8946, 713198, 543954, 542919, 712513, 5858, 523202, 501462, 9589, 544404, 9755, 8626, 356061, 6590, 544323, 709687, 180309, 542846, 3832, 685632, 720491, 721066, 720444, 542888, 691416, 542887, 8005, 8636, 543638, 544043, 30393, 542958, 6075, 9338, 660083, 690182, 543365, 544900, 7814, 721365, 17796, 6280, 8567, 6588, 542768, 8047, 543544, 5563, 5990, 6063, 7658, 543755, 8563, 8017, 543630, 543637, 6003, 543633, 6319, 6039, 6620, 688517, 6032, 3515, 3114, 6196, 6719, 6065, 3227, 542719, 6029, 1, 8041, 5982, 5561, 3147, 6023, 5823, 6487, 542718, 3105, 6572, 5538, 30308, 691345, 5679, 5501, 3153, 622031, 5557, 688514, 3152, 6057, 6223, 6237, 3261, 3550, 3506, 6026, 5564, 3228, 6020, 3838, 580204, 3343, 6046, 622032, 3614, 8727, 580185, 6549, 312376, 3891, 312367, 690567, 36986, 6064, 6028, 5628, 65842, 3100, 3128, 690374, 6099, 3344, 3138, 5813, 65862, 6199, 6378, 6489, 3110, 690957, 5857, 6359, 6234, 5575, 6060, 3139, 5963, 3134, 5820, 6204, 6050, 6385, 6021, 6185, 6325, 6053, 580230, 5632, 5663, 3246, 5991, 5797, 3099, 688366, 3121, 180319, 5798, 6322, 11946, 5558, 5871, 3098, 225420, 543381, 543010, 2941, 3104, 4153, 2955, 3131, 721361, 580241, 3839, 3852, 5545, 3864, 5639, 710817, 721364, 3846, 621754, 3850, 65805, 621747, 65774, 65781, 65789, 65811, 65798, 8378, 3690, 2952, 542733, 3222, 622047, 3691, 543362, 2, 3, 4, 5, 6, 7, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 86, 87, 88, 89, 90, 92, 93, 94, 95, 96, 98, 99, 100, 101, 102, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117, 118, 121, 122, 123, 124, 125, 126, 127, 132, 134, 135, 136, 137, 138, 140, 141, 142, 145, 146, 147, 148, 150, 151, 153, 163, 164, 165, 166, 167, 184, 186, 212, 214, 233, 234, 267, 268, 269, 270, 271, 272, 273, 274, 276, 359, 361, 362, 363, 364, 365, 488, 490, 495, 823, 824, 825, 827, 835, 886, 887, 987, 988, 1218, 1258, 1259, 1582, 1583, 1584, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1629, 1639, 1773, 1774, 1775, 1776, 1777, 1783, 1784, 1823, 1828, 2260, 2261, 2262, 2263, 2296, 2297, 2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 2310, 2339, 2340, 2341, 2342, 2343, 2344, 2346, 2347, 2379, 2380, 2381, 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, 2415, 2416, 2417, 2418, 2419, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 2460, 2461, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 2471, 2472, 2473, 2476, 2479, 3355, 3640, 3874, 3892, 3893, 3894, 3895, 3896, 3897, 3898, 3899, 4352, 580201, 596509, 621794, 650225, 652022, 655598, 657073, 665558, 671742, 676537, 684468, 684469, 684470, 688130, 688135, 688146, 688399, 688804, 690580, 691337, 699805, 701758, 701799, 701800, 701841, 701938, 701940, 705420, 705646, 706237, 706600, 707673, 707879, 707880, 708014, 708943, 710326, 710975, 711685, 711789, 712990, 714237, 714784, 715549, 715633, 715810, 716817, 716828, 717303, 717305, 717494, 717495, 717577, 717627, 718222, 718443, 718743, 718902, 720737, 721330, 721354, 721397] - >>> gl.processlist.get("721368") + [756143, 8146, 129, 5858, 8626, 752481, 732462, 728565, 9777, 1584, 543954, 9348, 8946, 436891, 713198, 735237, 542919, 542807, 523202, 9589, 501462, 9755, 544404, 180309, 6590, 542716, 3832, 542887, 356061, 685632, 542846, 723954, 544323, 753737, 754159, 755492, 542888, 543638, 8636, 8005, 544043, 690182, 30393, 6075, 542958, 9338, 660083, 543365, 756140, 7814, 6280, 8567, 17796, 6588, 542768, 543755, 8047, 543544, 5563, 5990, 6063, 7658, 8563, 8017, 543630, 543637, 543633, 6003, 6319, 6039, 6620, 723388, 6032, 3515, 544900, 3114, 6196, 6719, 6065, 3227, 542719, 1, 6029, 8041, 5982, 5561, 3147, 6023, 5823, 6487, 542718, 3105, 6572, 5538, 30308, 691345, 5679, 5501, 3153, 723327, 622031, 5557, 3152, 6057, 6223, 6237, 3261, 3550, 3506, 6026, 5564, 3228, 6020, 3838, 580204, 3343, 6046, 622032, 3614, 8727, 580185, 6549, 312376, 3891, 312367, 690567, 36986, 6064, 6028, 5628, 3100, 3128, 690374, 6099, 3344, 3138, 5813, 65862, 6199, 6378, 6489, 3110, 690957, 5857, 6359, 6234, 5575, 65842, 6060, 3139, 3134, 5963, 5820, 6204, 6050, 6385, 6021, 6185, 6325, 6053, 580230, 5632, 5663, 3246, 5991, 5797, 3099, 225420, 723102, 3121, 180319, 5798, 6322, 11946, 5558, 5871, 3098, 543381, 543010, 2941, 3104, 4153, 2955, 3131, 756136, 580241, 3839, 3852, 5545, 3864, 5639, 749657, 756139, 3846, 8378, 621754, 3850, 65805, 621747, 65774, 65781, 65789, 65811, 65798, 3690, 2952, 542733, 3222, 622047, 3691, 543362, 2, 3, 4, 5, 6, 7, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 86, 87, 88, 89, 90, 92, 93, 94, 95, 96, 98, 99, 100, 101, 102, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117, 118, 121, 122, 123, 124, 125, 126, 127, 132, 134, 135, 136, 137, 138, 140, 141, 142, 145, 146, 147, 148, 150, 151, 153, 163, 164, 165, 166, 167, 184, 186, 212, 214, 233, 234, 267, 268, 269, 270, 271, 272, 273, 274, 276, 359, 361, 362, 363, 364, 365, 488, 490, 495, 823, 824, 825, 827, 835, 886, 887, 987, 988, 1218, 1258, 1259, 1582, 1583, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1629, 1639, 1773, 1774, 1775, 1776, 1777, 1783, 1784, 1823, 1828, 2260, 2261, 2262, 2263, 2296, 2297, 2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 2310, 2339, 2340, 2341, 2342, 2343, 2344, 2346, 2347, 2379, 2380, 2381, 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, 2415, 2416, 2417, 2418, 2419, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 2460, 2461, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 2471, 2472, 2473, 2476, 2479, 3355, 3640, 3874, 3892, 3893, 3894, 3895, 3896, 3897, 3898, 3899, 4352, 580201, 596509, 650225, 665558, 684469, 688804, 690580, 691337, 701758, 710975, 718902, 721330, 721397, 722055, 722905, 722908, 722922, 722926, 722927, 723004, 723356, 728203, 728398, 728567, 731706, 734098, 734509, 736341, 738184, 738649, 740122, 741082, 742459, 743690, 744547, 744924, 744961, 748356, 748399, 748465, 748524, 749375, 749553, 750616, 750780, 751344, 751422, 752592, 752619, 752632, 753583, 753962, 753985, 753987, 754101, 754275, 754334, 754335, 754336, 754337, 754338, 754480, 754581] + >>> gl.processlist.get("756143") {'cmdline': ['/home/nicolargo/dev/glances/.venv/bin/python3', '-m', 'glances', '-C', 'conf/glances.conf', '--api-doc'], - 'cpu_percent': 72.5, + 'cpu_percent': 76.3, 'cpu_times': {'children_system': 0.01, 'children_user': 0.0, 'iowait': 0.0, - 'system': 0.4, - 'user': 0.38}, + 'system': 0.42, + 'user': 0.36}, 'gids': {'effective': 1000, 'real': 1000, 'saved': 1000}, - 'io_counters': [0, 12288, 0, 8192, 1], + 'io_counters': [28672, 8192, 28672, 8192, 1], 'key': 'pid', - 'memory_info': {'data': 124686336, + 'memory_info': {'data': 124751872, 'dirty': 0, 'lib': 0, - 'rss': 95531008, - 'shared': 23732224, + 'rss': 95576064, + 'shared': 23691264, 'text': 31211520, - 'vms': 585166848}, - 'memory_percent': 0.5817532566010025, + 'vms': 585232384}, + 'memory_percent': 0.5820276332173302, 'name': 'python3', 'nice': 0, 'num_threads': 5, - 'pid': 721368, + 'pid': 756143, 'status': 'R', - 'time_since_update': 0.45049142837524414, + 'time_since_update': 0.424365758895874, 'username': 'nicolargo'} Processlist fields description: @@ -772,14 +772,11 @@ Load stats: >>> type(gl.load) >>> gl.load - {'cpucore': 16, - 'min1': 0.95263671875, - 'min15': 0.79736328125, - 'min5': 0.80029296875} + {'cpucore': 16, 'min1': 0.5888671875, 'min15': 0.712890625, 'min5': 0.611328125} >>> gl.load.keys() ['min1', 'min5', 'min15', 'cpucore'] >>> gl.load.get("min1") - 0.95263671875 + 0.5888671875 Load fields description: @@ -821,7 +818,7 @@ Sensors stats: 'label': 'Ambient', 'type': 'temperature_core', 'unit': 'C', - 'value': 36, + 'value': 40, 'warning': 0} Sensors fields description: @@ -859,7 +856,7 @@ Uptime stats: >>> type(gl.uptime) >>> gl.uptime - '20 days, 23:24:34' + '21 days, 23:20:33' Uptime limits: @@ -878,11 +875,11 @@ Now stats: >>> type(gl.now) >>> gl.now - {'custom': '2026-04-11 09:25:51 CEST', 'iso': '2026-04-11T09:25:51+02:00'} + {'custom': '2026-04-12 09:21:52 CEST', 'iso': '2026-04-12T09:21:52+02:00'} >>> gl.now.keys() ['iso', 'custom'] >>> gl.now.get("iso") - '2026-04-11T09:25:51+02:00' + '2026-04-12T09:21:52+02:00' Now fields description: @@ -911,14 +908,14 @@ Fs stats: ['/', '/zsfpool'] >>> gl.fs.get("/") {'device_name': '/dev/mapper/ubuntu--vg-ubuntu--lv', - 'free': 547697012736, + 'free': 547681718272, 'fs_type': 'ext4', 'key': 'mnt_point', 'mnt_point': '/', 'options': 'rw,relatime', 'percent': 42.5, 'size': 1003736440832, - 'used': 404976922624} + 'used': 404992217088} Fs fields description: @@ -959,8 +956,8 @@ Wifi stats: ['wlp0s20f3'] >>> gl.wifi.get("wlp0s20f3") {'key': 'ssid', - 'quality_level': -62.0, - 'quality_link': 48.0, + 'quality_level': -64.0, + 'quality_link': 46.0, 'ssid': 'wlp0s20f3'} Wifi limits: @@ -1089,19 +1086,19 @@ Mem stats: >>> type(gl.mem) >>> gl.mem - {'active': 7362359296, - 'available': 6445556728, - 'buffers': 216145920, - 'cached': 6360790008, - 'free': 1026465792, - 'inactive': 4496453632, - 'percent': 60.7, - 'percent_max': 60.7, - 'percent_mean': 60.7, - 'percent_min': 60.7, - 'shared': 1619664896, + {'active': 9070829568, + 'available': 6022607864, + 'buffers': 216756224, + 'cached': 6011335672, + 'free': 625549312, + 'inactive': 3548004352, + 'percent': 63.3, + 'percent_max': 63.3, + 'percent_mean': 63.3, + 'percent_min': 63.3, + 'shared': 1273552896, 'total': 16421224448, - 'used': 9975667720} + 'used': 10398616584} >>> gl.mem.keys() ['total', 'available', 'percent', 'used', 'free', 'active', 'inactive', 'buffers', 'cached', 'shared', 'percent_min', 'percent_max', 'percent_mean'] >>> gl.mem.get("total") @@ -1174,14 +1171,14 @@ Quicklook stats: >>> type(gl.quicklook) >>> gl.quicklook - {'cpu': 6.3, + {'cpu': 7.1, 'cpu_hz': 4475000000.0, - 'cpu_hz_current': 799453312.5, + 'cpu_hz_current': 1222060500.0, 'cpu_log_core': 16, 'cpu_name': '13th Gen Intel(R) Core(TM) i7-13620H', 'cpu_phys_core': 10, - 'load': 5.1, - 'mem': 60.7, + 'load': 4.5, + 'mem': 63.3, 'percpu': [{'cpu_number': 0, 'dpc': None, 'guest': 0.0, @@ -1194,14 +1191,14 @@ Quicklook stats: 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, - 'system': 9.0, + 'system': 5.0, 'total': 71.0, 'user': 0.0}, {'cpu_number': 1, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 39.0, + 'idle': 35.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1210,13 +1207,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 61.0, + 'total': 65.0, 'user': 0.0}, {'cpu_number': 2, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 39.0, + 'idle': 34.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1225,13 +1222,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 61.0, - 'user': 0.0}, + 'total': 66.0, + 'user': 1.0}, {'cpu_number': 3, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 40.0, + 'idle': 36.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1240,13 +1237,43 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 60.0, + 'total': 64.0, 'user': 0.0}, {'cpu_number': 4, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 28.0, + 'idle': 18.0, + 'interrupt': None, + 'iowait': 0.0, + 'irq': 0.0, + 'key': 'cpu_number', + 'nice': 0.0, + 'softirq': 0.0, + 'steal': 0.0, + 'system': 9.0, + 'total': 82.0, + 'user': 9.0}, + {'cpu_number': 5, + 'dpc': None, + 'guest': 0.0, + 'guest_nice': 0.0, + 'idle': 36.0, + 'interrupt': None, + 'iowait': 0.0, + 'irq': 0.0, + 'key': 'cpu_number', + 'nice': 0.0, + 'softirq': 0.0, + 'steal': 0.0, + 'system': 0.0, + 'total': 64.0, + 'user': 0.0}, + {'cpu_number': 6, + 'dpc': None, + 'guest': 0.0, + 'guest_nice': 0.0, + 'idle': 26.0, 'interrupt': None, 'iowait': 1.0, 'irq': 0.0, @@ -1254,44 +1281,14 @@ Quicklook stats: 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, - 'system': 10.0, - 'total': 72.0, - 'user': 1.0}, - {'cpu_number': 5, - 'dpc': None, - 'guest': 0.0, - 'guest_nice': 0.0, - 'idle': 29.0, - 'interrupt': None, - 'iowait': 0.0, - 'irq': 0.0, - 'key': 'cpu_number', - 'nice': 0.0, - 'softirq': 0.0, - 'steal': 0.0, - 'system': 3.0, - 'total': 71.0, - 'user': 6.0}, - {'cpu_number': 6, - 'dpc': None, - 'guest': 0.0, - 'guest_nice': 0.0, - 'idle': 38.0, - 'interrupt': None, - 'iowait': 0.0, - 'irq': 0.0, - 'key': 'cpu_number', - 'nice': 0.0, - 'softirq': 0.0, - 'steal': 0.0, - 'system': 2.0, - 'total': 62.0, - 'user': 1.0}, + 'system': 6.0, + 'total': 74.0, + 'user': 2.0}, {'cpu_number': 7, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 39.0, + 'idle': 35.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1300,13 +1297,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 61.0, + 'total': 65.0, 'user': 0.0}, {'cpu_number': 8, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 39.0, + 'idle': 35.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1314,14 +1311,14 @@ Quicklook stats: 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, - 'system': 1.0, - 'total': 61.0, + 'system': 0.0, + 'total': 65.0, 'user': 0.0}, {'cpu_number': 9, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 40.0, + 'idle': 36.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1330,13 +1327,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 60.0, + 'total': 64.0, 'user': 0.0}, {'cpu_number': 10, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 39.0, + 'idle': 35.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1345,13 +1342,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 61.0, + 'total': 65.0, 'user': 1.0}, {'cpu_number': 11, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 40.0, + 'idle': 35.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1360,43 +1357,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 60.0, + 'total': 65.0, 'user': 0.0}, {'cpu_number': 12, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 40.0, - 'interrupt': None, - 'iowait': 0.0, - 'irq': 0.0, - 'key': 'cpu_number', - 'nice': 0.0, - 'softirq': 0.0, - 'steal': 0.0, - 'system': 0.0, - 'total': 60.0, - 'user': 0.0}, - {'cpu_number': 13, - 'dpc': None, - 'guest': 0.0, - 'guest_nice': 0.0, - 'idle': 39.0, - 'interrupt': None, - 'iowait': 0.0, - 'irq': 0.0, - 'key': 'cpu_number', - 'nice': 0.0, - 'softirq': 0.0, - 'steal': 0.0, - 'system': 0.0, - 'total': 61.0, - 'user': 1.0}, - {'cpu_number': 14, - 'dpc': None, - 'guest': 0.0, - 'guest_nice': 0.0, - 'idle': 39.0, + 'idle': 34.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1405,13 +1372,43 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 1.0, - 'total': 61.0, + 'total': 66.0, + 'user': 2.0}, + {'cpu_number': 13, + 'dpc': None, + 'guest': 0.0, + 'guest_nice': 0.0, + 'idle': 34.0, + 'interrupt': None, + 'iowait': 0.0, + 'irq': 0.0, + 'key': 'cpu_number', + 'nice': 0.0, + 'softirq': 0.0, + 'steal': 0.0, + 'system': 0.0, + 'total': 66.0, + 'user': 0.0}, + {'cpu_number': 14, + 'dpc': None, + 'guest': 0.0, + 'guest_nice': 0.0, + 'idle': 35.0, + 'interrupt': None, + 'iowait': 0.0, + 'irq': 0.0, + 'key': 'cpu_number', + 'nice': 0.0, + 'softirq': 0.0, + 'steal': 0.0, + 'system': 0.0, + 'total': 65.0, 'user': 0.0}, {'cpu_number': 15, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 39.0, + 'idle': 33.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1420,9 +1417,9 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 1.0, - 'total': 61.0, - 'user': 0.0}], - 'swap': 35.9} + 'total': 67.0, + 'user': 1.0}], + 'swap': 43.2} >>> gl.quicklook.keys() ['cpu_name', 'cpu_hz_current', 'cpu_hz', 'cpu', 'percpu', 'mem', 'swap', 'cpu_log_core', 'cpu_phys_core', 'load'] >>> gl.quicklook.get("cpu_name") @@ -1472,13 +1469,13 @@ Memswap stats: >>> type(gl.memswap) >>> gl.memswap - {'free': 2751483904, - 'percent': 35.9, - 'sin': 3763445760, - 'sout': 8712749056, - 'time_since_update': 0.44704747200012207, + {'free': 2439843840, + 'percent': 43.2, + 'sin': 3786334208, + 'sout': 9036771328, + 'time_since_update': 0.4200730323791504, 'total': 4294963200, - 'used': 1543479296} + 'used': 1855119360} >>> gl.memswap.keys() ['total', 'used', 'free', 'percent', 'sin', 'sout', 'time_since_update'] >>> gl.memswap.get("total") @@ -1513,10 +1510,10 @@ Use auto_unit() function to generate a human-readable string with the unit: .. code-block:: python >>> gl.mem.get("used") - 9975667720 + 10398616584 >>> gl.auto_unit(gl.mem.get("used")) - 9.29G + 9.68G Args: @@ -1572,7 +1569,7 @@ Use top_process() function to generate a list of top processes sorted by CPU or .. code-block:: python >>> gl.top_process() - [{'status': 'S', 'name': 'Isolated Web Co', 'nice': 0, 'memory_info': {'rss': 946630656, 'vms': 3838656512, 'shared': 129568768, 'text': 659456, 'lib': 0, 'data': 1015422976, 'dirty': 0}, 'num_threads': 35, 'cpu_times': {'user': 2295.2, 'system': 143.32, 'children_user': 0.0, 'children_system': 0.0, 'iowait': 0.0}, 'io_counters': [361497600, 0, 361497600, 0, 1, 27462656, 0, 27462656, 0, 1, 128542720, 0, 128542720, 0, 1, 911360, 0, 911360, 0, 1, 218574848, 0, 218574848, 0, 1, 263183360, 65536, 263183360, 65536, 1, 0, 0, 0, 0, 1], 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'memory_percent': 5.764677652373807, 'cpu_percent': 4.5, 'pid': 9777, 'key': 'pid', 'time_since_update': 0.45049142837524414, 'cmdline': ['/snap/firefox/7967/usr/lib/firefox/firefox', '-contentproc', '-isForBrowser', '-prefsHandle', '0:46458', '-prefMapHandle', '1:282338', '-jsInitHandle', '2:227672', '-parentBuildID', '20260309231353', '-sandboxReporter', '3', '-chrootClient', '4', '-ipcHandle', '5', '-initialChannelId', '{ed7b16d7-31d6-47a1-938a-22845b23b315}', '-parentPid', '8146', '-crashReporter', '6', '-crashHelper', '7', '-greomni', '/snap/firefox/7967/usr/lib/firefox/omni.ja', '-appomni', '/snap/firefox/7967/usr/lib/firefox/browser/omni.ja', '-appDir', '/snap/firefox/7967/usr/lib/firefox/browser', '11', 'tab'], 'username': 'nicolargo'}, {'status': 'S', 'name': 'code', 'nice': 0, 'memory_info': {'rss': 411549696, 'vms': 1500291395584, 'shared': 110428160, 'text': 148103168, 'lib': 0, 'data': 1285394432, 'dirty': 0}, 'num_threads': 25, 'cpu_times': {'user': 248.66, 'system': 20.12, 'children_user': 0.0, 'children_system': 0.0, 'iowait': 0.0}, 'io_counters': [94860288, 143360, 94860288, 143360, 1, 90949632, 27131904, 90941440, 27123712, 1, 59535360, 49152, 59535360, 49152, 1, 587283456, 11059200, 587283456, 11059200, 1, 20062208, 53248, 20062208, 53248, 1, 5320704, 0, 5320704, 0, 1, 35805184, 0, 35805184, 0, 1, 43882496, 1668337664, 43882496, 1668337664, 1, 3762176, 0, 3762176, 0, 1, 708608, 4096, 708608, 4096, 1, 3553280, 0, 3553280, 0, 1, 5195776, 5410816, 5195776, 5410816, 1, 746496, 0, 746496, 0, 1, 595968, 0, 595968, 0, 1], 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'memory_percent': 2.5062059001947574, 'cpu_percent': 4.5, 'pid': 542807, 'key': 'pid', 'time_since_update': 0.45049142837524414, 'cmdline': ['/snap/code/226/usr/share/code/code', '--type=zygote', '--no-sandbox'], 'username': 'nicolargo'}, {'status': 'S', 'name': 'code', 'nice': 0, 'memory_info': {'rss': 103149568, 'vms': 1513727791104, 'shared': 59764736, 'text': 148103168, 'lib': 0, 'data': 928301056, 'dirty': 0}, 'num_threads': 36, 'cpu_times': {'user': 32.01, 'system': 13.05, 'children_user': 0.2, 'children_system': 0.15, 'iowait': 0.0}, 'io_counters': [90949632, 27131904, 90941440, 27123712, 1], 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'memory_percent': 0.6281478480891415, 'cpu_percent': 4.5, 'pid': 542716, 'key': 'pid', 'time_since_update': 0.45049142837524414, 'cmdline': ['/snap/code/226/usr/share/code/code', '--no-sandbox', '--force-user-env', '--ozone-platform=x11'], 'username': 'nicolargo'}] + [{'io_counters': [2567382016, 14159581184, 2567365632, 14158110720, 1], 'cpu_times': {'user': 9981.68, 'system': 2657.3, 'children_user': 0.43, 'children_system': 2.09, 'iowait': 0.0}, 'cpu_percent': 24.3, 'num_threads': 128, 'nice': 0, 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'name': 'firefox', 'memory_info': {'rss': 773103616, 'vms': 30421471232, 'shared': 206761984, 'text': 659456, 'lib': 0, 'data': 1177972736, 'dirty': 0}, 'status': 'S', 'memory_percent': 4.707953529580792, 'pid': 8146, 'key': 'pid', 'time_since_update': 0.424365758895874, 'cmdline': ['/snap/firefox/7967/usr/lib/firefox/firefox'], 'username': 'nicolargo'}, {'io_counters': [1325335552, 136383778816, 1325335552, 136383778816, 1], 'cpu_times': {'user': 4199.78, 'system': 2193.81, 'children_user': 1589.83, 'children_system': 256.03, 'iowait': 0.0}, 'cpu_percent': 7.3, 'num_threads': 39, 'nice': 0, 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'name': 'gnome-shell', 'memory_info': {'rss': 332132352, 'vms': 6148321280, 'shared': 138575872, 'text': 8192, 'lib': 0, 'data': 539172864, 'dirty': 0}, 'status': 'S', 'memory_percent': 2.0225796989240448, 'pid': 5858, 'key': 'pid', 'time_since_update': 0.424365758895874, 'cmdline': ['/usr/bin/gnome-shell'], 'username': 'nicolargo'}, {'io_counters': [9739264, 0, 9739264, 0, 1], 'cpu_times': {'user': 162.26, 'system': 40.02, 'children_user': 0.0, 'children_system': 0.0, 'iowait': 0.0}, 'cpu_percent': 7.3, 'num_threads': 28, 'nice': 0, 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'name': 'Privileged Cont', 'memory_info': {'rss': 185507840, 'vms': 2845196288, 'shared': 109768704, 'text': 659456, 'lib': 0, 'data': 149467136, 'dirty': 0}, 'status': 'S', 'memory_percent': 1.1296833594074263, 'pid': 8626, 'key': 'pid', 'time_since_update': 0.424365758895874, 'cmdline': ['/snap/firefox/7967/usr/lib/firefox/firefox', '-contentproc', '-isForBrowser', '-prefsHandle', '0:41936', '-prefMapHandle', '1:282338', '-jsInitHandle', '2:227672', '-parentBuildID', '20260309231353', '-sandboxReporter', '3', '-chrootClient', '4', '-ipcHandle', '5', '-initialChannelId', '{24f51226-5684-474c-8f64-d6f4c9722715}', '-parentPid', '8146', '-crashReporter', '6', '-crashHelper', '7', '-greomni', '/snap/firefox/7967/usr/lib/firefox/omni.ja', '-appomni', '/snap/firefox/7967/usr/lib/firefox/browser/omni.ja', '-appDir', '/snap/firefox/7967/usr/lib/firefox/browser', '3', 'tab'], 'username': 'nicolargo'}] Args: diff --git a/docs/api/restful.rst b/docs/api/restful.rst index a7dda129..0d057de7 100644 --- a/docs/api/restful.rst +++ b/docs/api/restful.rst @@ -347,7 +347,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.44526028633117676}, + "timer": 0.34945154190063477}, {"count": 0, "countmax": 20.0, "countmin": None, @@ -356,7 +356,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.4452037811279297}] + "timer": 0.3493959903717041}] Fields descriptions: @@ -384,7 +384,7 @@ Get a specific item when field matches the given value:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.44526028633117676}]} + "timer": 0.34945154190063477}]} GET cloud --------- @@ -436,18 +436,18 @@ Get plugin stats:: "io_rx": None, "io_wx": None, "key": "name", - "memory": {"inactive_file": 397312, "limit": 16421224448, "usage": 9682944}, + "memory": {"inactive_file": 397312, "limit": 16421224448, "usage": 9408512}, "memory_inactive_file": 397312, "memory_limit": 16421224448, "memory_percent": None, - "memory_usage": 9682944, + "memory_usage": 9408512, "name": "nats-for-glances", - "network": {"cumulative_rx": 683408, "cumulative_tx": 0}, + "network": {"cumulative_rx": 724393, "cumulative_tx": 0}, "network_rx": None, "network_tx": None, "ports": "4222->4222/tcp,6222->6222/tcp,8222->8222/tcp", "status": "running", - "uptime": "2 weeks"}] + "uptime": "3 weeks"}] Fields descriptions: @@ -492,18 +492,18 @@ Get a specific item when field matches the given value:: "key": "name", "memory": {"inactive_file": 397312, "limit": 16421224448, - "usage": 9682944}, + "usage": 9408512}, "memory_inactive_file": 397312, "memory_limit": 16421224448, "memory_percent": None, - "memory_usage": 9682944, + "memory_usage": 9408512, "name": "nats-for-glances", - "network": {"cumulative_rx": 683408, "cumulative_tx": 0}, + "network": {"cumulative_rx": 724393, "cumulative_tx": 0}, "network_rx": None, "network_tx": None, "ports": "4222->4222/tcp,6222->6222/tcp,8222->8222/tcp", "status": "running", - "uptime": "2 weeks"}]} + "uptime": "3 weeks"}]} GET core -------- @@ -530,19 +530,19 @@ Get plugin stats:: # curl http://localhost:61208/api/4/cpu {"cpucore": 16, - "ctx_switches": 502152744, + "ctx_switches": 525594658, "guest": 0.0, - "idle": 91.2, - "interrupts": 296827626, - "iowait": 0.1, + "idle": 93.9, + "interrupts": 308675138, + "iowait": 0.3, "irq": 0.0, "nice": 0.0, - "soft_interrupts": 157797968, + "soft_interrupts": 164587420, "steal": 0.0, "syscalls": 0, - "system": 4.3, - "total": 6.3, - "user": 4.4} + "system": 2.4, + "total": 5.3, + "user": 3.4} Fields descriptions: @@ -578,7 +578,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/cpu/total - {"total": 6.3} + {"total": 5.3} GET diskio ---------- @@ -588,20 +588,20 @@ Get plugin stats:: # curl http://localhost:61208/api/4/diskio [{"disk_name": "nvme0n1", "key": "disk_name", - "read_bytes": 26387070976, - "read_count": 1799176, + "read_bytes": 26859446272, + "read_count": 1817640, "read_latency": 0, - "read_time": 377843, - "write_bytes": 181085348864, - "write_count": 4235108, + "read_time": 387657, + "write_bytes": 183149036544, + "write_count": 4403726, "write_latency": 0, - "write_time": 9194791}, + "write_time": 9376895}, {"disk_name": "nvme0n1p1", "key": "disk_name", - "read_bytes": 15321600, - "read_count": 1795, + "read_bytes": 15325696, + "read_count": 1803, "read_latency": 0, - "read_time": 1572, + "read_time": 1575, "write_bytes": 5120, "write_count": 3, "write_latency": 0, @@ -647,14 +647,14 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/diskio/disk_name/value/nvme0n1 {"nvme0n1": [{"disk_name": "nvme0n1", "key": "disk_name", - "read_bytes": 26387070976, - "read_count": 1799176, + "read_bytes": 26859446272, + "read_count": 1817640, "read_latency": 0, - "read_time": 377843, - "write_bytes": 181085348864, - "write_count": 4235108, + "read_time": 387657, + "write_bytes": 183149036544, + "write_count": 4403726, "write_latency": 0, - "write_time": 9194791}]} + "write_time": 9376895}]} GET folders ----------- @@ -681,14 +681,14 @@ Get plugin stats:: # curl http://localhost:61208/api/4/fs [{"device_name": "/dev/mapper/ubuntu--vg-ubuntu--lv", - "free": 547697037312, + "free": 547681710080, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", "options": "rw,relatime", "percent": 42.5, "size": 1003736440832, - "used": 404976898048}, + "used": 404992225280}, {"device_name": "zsfpool", "free": 41680896, "fs_type": "zfs", @@ -719,14 +719,14 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/fs/mnt_point/value// {"/": [{"device_name": "/dev/mapper/ubuntu--vg-ubuntu--lv", - "free": 547697037312, + "free": 547681710080, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", "options": "rw,relatime", "percent": 42.5, "size": 1003736440832, - "used": 404976898048}]} + "used": 404992225280}]} GET gpu ------- @@ -824,9 +824,9 @@ Get plugin stats:: # curl http://localhost:61208/api/4/load {"cpucore": 16, - "min1": 1.19677734375, - "min15": 0.81494140625, - "min5": 0.853515625} + "min1": 0.54150390625, + "min15": 0.708984375, + "min5": 0.60107421875} Fields descriptions: @@ -841,7 +841,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/load/min1 - {"min1": 1.19677734375} + {"min1": 0.54150390625} GET mem ------- @@ -849,19 +849,19 @@ GET mem Get plugin stats:: # curl http://localhost:61208/api/4/mem - {"active": 7282155520, - "available": 6494995448, - "buffers": 216281088, - "cached": 6350902264, - "free": 1075499008, - "inactive": 4489592832, - "percent": 60.4, - "percent_max": 60.4, - "percent_mean": 60.4, - "percent_min": 60.4, - "shared": 1609555968, + {"active": 9058992128, + "available": 6053262328, + "buffers": 216772608, + "cached": 6012482552, + "free": 653840384, + "inactive": 3547979776, + "percent": 63.1, + "percent_max": 63.1, + "percent_mean": 63.1, + "percent_min": 63.1, + "shared": 1272336384, "total": 16421224448, - "used": 9926229000} + "used": 10367962120} Fields descriptions: @@ -891,13 +891,13 @@ GET memswap Get plugin stats:: # curl http://localhost:61208/api/4/memswap - {"free": 2751483904, - "percent": 35.9, - "sin": 3763445760, - "sout": 8712749056, + {"free": 2439847936, + "percent": 43.2, + "sin": 3786342400, + "sout": 9036771328, "time_since_update": 1, "total": 4294963200, - "used": 1543479296} + "used": 1855115264} Fields descriptions: @@ -939,32 +939,32 @@ Get plugin stats:: # curl http://localhost:61208/api/4/network [{"alias": None, "bytes_all": 0, - "bytes_all_gauge": 9101527167, + "bytes_all_gauge": 9436719805, "bytes_all_rate_per_sec": 0, "bytes_recv": 0, - "bytes_recv_gauge": 8568697827, + "bytes_recv_gauge": 8865062922, "bytes_recv_rate_per_sec": 0, "bytes_sent": 0, - "bytes_sent_gauge": 532829340, + "bytes_sent_gauge": 571656883, "bytes_sent_rate_per_sec": 0, "interface_name": "wlp0s20f3", "key": "interface_name", "speed": 0, - "time_since_update": 0.45073437690734863}, + "time_since_update": 0.3552982807159424}, {"alias": None, "bytes_all": 0, - "bytes_all_gauge": 683408, + "bytes_all_gauge": 724393, "bytes_all_rate_per_sec": 0, "bytes_recv": 0, "bytes_recv_gauge": 0, "bytes_recv_rate_per_sec": 0, "bytes_sent": 0, - "bytes_sent_gauge": 683408, + "bytes_sent_gauge": 724393, "bytes_sent_rate_per_sec": 0, "interface_name": "veth22ca982", "key": "interface_name", "speed": 10485760000, - "time_since_update": 0.45073437690734863}] + "time_since_update": 0.3552982807159424}] Fields descriptions: @@ -993,18 +993,18 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/network/interface_name/value/wlp0s20f3 {"wlp0s20f3": [{"alias": None, "bytes_all": 0, - "bytes_all_gauge": 9101527167, + "bytes_all_gauge": 9436719805, "bytes_all_rate_per_sec": 0, "bytes_recv": 0, - "bytes_recv_gauge": 8568697827, + "bytes_recv_gauge": 8865062922, "bytes_recv_rate_per_sec": 0, "bytes_sent": 0, - "bytes_sent_gauge": 532829340, + "bytes_sent_gauge": 571656883, "bytes_sent_rate_per_sec": 0, "interface_name": "wlp0s20f3", "key": "interface_name", "speed": 0, - "time_since_update": 0.45073437690734863}]} + "time_since_update": 0.3552982807159424}]} GET now ------- @@ -1012,7 +1012,7 @@ GET now Get plugin stats:: # curl http://localhost:61208/api/4/now - {"custom": "2026-04-11 09:25:56 CEST", "iso": "2026-04-11T09:25:56+02:00"} + {"custom": "2026-04-12 09:21:56 CEST", "iso": "2026-04-12T09:21:56+02:00"} Fields descriptions: @@ -1022,7 +1022,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/now/iso - {"iso": "2026-04-11T09:25:56+02:00"} + {"iso": "2026-04-12T09:21:56+02:00"} GET npu ------- @@ -1056,7 +1056,7 @@ Get plugin stats:: "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 31.0, + "idle": 28.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1064,14 +1064,14 @@ Get plugin stats:: "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 11.0, - "total": 69.0, + "system": 6.0, + "total": 72.0, "user": 0.0}, {"cpu_number": 1, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 43.0, + "idle": 34.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1079,9 +1079,9 @@ Get plugin stats:: "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 0.0, - "total": 57.0, - "user": 0.0}] + "system": 1.0, + "total": 66.0, + "user": 1.0}] Fields descriptions: @@ -1117,7 +1117,7 @@ Get plugin stats:: "port": 0, "refresh": 30, "rtt_warning": None, - "status": 0.00789, + "status": 0.005752, "timeout": 3}] Fields descriptions: @@ -1145,7 +1145,7 @@ Get a specific item when field matches the given value:: "port": 0, "refresh": 30, "rtt_warning": None, - "status": 0.00789, + "status": 0.005752, "timeout": 3}]} GET processcount @@ -1154,7 +1154,7 @@ GET processcount Get plugin stats:: # curl http://localhost:61208/api/4/processcount - {"pid_max": 0, "running": 1, "sleeping": 429, "thread": 2157, "total": 577} + {"pid_max": 0, "running": 1, "sleeping": 430, "thread": 2186, "total": 580} Fields descriptions: @@ -1167,7 +1167,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/processcount/total - {"total": 577} + {"total": 580} GET processlist --------------- @@ -1175,7 +1175,105 @@ GET processlist Get plugin stats:: # curl http://localhost:61208/api/4/processlist - [{"cmdline": ["/snap/firefox/7967/usr/lib/firefox/firefox", + [{"cmdline": ["/snap/code/226/usr/share/code/code", + "/home/nicolargo/.vscode/extensions/ms-python.vscode-pylance-2026.1.1/dist/server.bundle.js", + "--cancellationReceive=file:51188c09bef21493e53f74f5b17521441c013a46a5", + "--node-ipc", + "--clientProcessId=542919"], + "cpu_percent": 0.0, + "cpu_times": {"children_system": 0.57, + "children_user": 1.7, + "iowait": 0.0, + "system": 4.22, + "user": 40.9}, + "gids": {"effective": 1000, "real": 1000, "saved": 1000}, + "io_counters": [113461248, + 49152, + 0, + 0, + 0, + 594599936, + 12148736, + 0, + 0, + 0, + 96527360, + 143360, + 0, + 0, + 0, + 92282880, + 29663232, + 0, + 0, + 0, + 44162048, + 1668337664, + 0, + 0, + 0, + 5328896, + 0, + 0, + 0, + 0, + 20393984, + 57344, + 0, + 0, + 0, + 37709824, + 0, + 0, + 0, + 0, + 3876864, + 0, + 0, + 0, + 0, + 724992, + 4096, + 0, + 0, + 0, + 4372480, + 0, + 0, + 0, + 0, + 5667840, + 6070272, + 0, + 0, + 0, + 746496, + 0, + 0, + 0, + 0, + 595968, + 0, + 0, + 0, + 0], + "key": "pid", + "memory_info": {"data": 2103865344, + "dirty": 0, + "lib": 0, + "rss": 1324560384, + "shared": 39350272, + "text": 148103168, + "vms": 1498047127552}, + "memory_percent": 8.066148710130584, + "name": "code", + "nice": 0, + "num_threads": 10, + "pid": 543954, + "status": "S", + "time_since_update": 1, + "username": "nicolargo"}, + {"cmdline": ["/snap/firefox/7967/usr/lib/firefox/firefox", "-contentproc", "-isForBrowser", "-prefsHandle", @@ -1212,15 +1310,15 @@ Get plugin stats:: "cpu_times": {"children_system": 0.0, "children_user": 0.0, "iowait": 0.0, - "system": 143.33, - "user": 2295.3}, + "system": 153.62, + "user": 2435.39}, "gids": {"effective": 1000, "real": 1000, "saved": 1000}, - "io_counters": [361497600, + "io_counters": [361636864, 0, 0, 0, 0, - 128542720, + 128600064, 0, 0, 0, @@ -1235,12 +1333,17 @@ Get plugin stats:: 0, 0, 0, - 218574848, 0, 0, 0, 0, - 263183360, + 0, + 218886144, + 0, + 0, + 0, + 0, + 263195648, 65536, 0, 0, @@ -1251,45 +1354,20 @@ Get plugin stats:: 0, 0], "key": "pid", - "memory_info": {"data": 1015422976, + "memory_info": {"data": 1102139392, "dirty": 0, "lib": 0, - "rss": 946774016, - "shared": 129568768, + "rss": 913260544, + "shared": 127741952, "text": 659456, - "vms": 3838656512}, - "memory_percent": 5.765550668880303, + "vms": 3923591168}, + "memory_percent": 5.561464352990007, "name": "Isolated Web Co", "nice": 0, - "num_threads": 35, + "num_threads": 34, "pid": 9777, "status": "S", "time_since_update": 1, - "username": "nicolargo"}, - {"cmdline": ["/snap/firefox/7967/usr/lib/firefox/firefox"], - "cpu_percent": 0.0, - "cpu_times": {"children_system": 2.01, - "children_user": 0.36, - "iowait": 0.0, - "system": 2534.21, - "user": 9495.41}, - "gids": {"effective": 1000, "real": 1000, "saved": 1000}, - "io_counters": [2430089216, 13687840768, 0, 0, 0], - "key": "pid", - "memory_info": {"data": 1179770880, - "dirty": 0, - "lib": 0, - "rss": 829825024, - "shared": 255205376, - "text": 659456, - "vms": 30405799936}, - "memory_percent": 5.053368746208614, - "name": "firefox", - "nice": 0, - "num_threads": 133, - "pid": 8146, - "status": "S", - "time_since_update": 1, "username": "nicolargo"}] Fields descriptions: @@ -1315,16 +1393,120 @@ GET programlist Get plugin stats:: # curl http://localhost:61208/api/4/programlist - [{"childrens": [9777, 9348, 436891, 713198, 9589, 9755, 709687], + [{"childrens": [543954, + 542919, + 542807, + 542716, + 542887, + 542846, + 544323, + 542888, + 544043, + 542958, + 543365, + 542768, + 542719, + 542718], + "cmdline": ["code"], + "cpu_percent": 0, + "cpu_times": {"children_system": 215.98999999999998, + "children_user": 161.48, + "system": 224.84, + "user": 720.72}, + "io_counters": [113461248, + 49152, + 0, + 0, + 0, + 594599936, + 12148736, + 0, + 0, + 0, + 96527360, + 143360, + 0, + 0, + 0, + 92282880, + 29663232, + 0, + 0, + 0, + 44162048, + 1668337664, + 0, + 0, + 0, + 5328896, + 0, + 0, + 0, + 0, + 20393984, + 57344, + 0, + 0, + 0, + 37709824, + 0, + 0, + 0, + 0, + 3876864, + 0, + 0, + 0, + 0, + 724992, + 4096, + 0, + 0, + 0, + 4372480, + 0, + 0, + 0, + 0, + 5667840, + 6070272, + 0, + 0, + 0, + 746496, + 0, + 0, + 0, + 0, + 595968, + 0, + 0, + 0, + 0], + "memory_info": {"data": 11177218048, + "rss": 2831126528, + "shared": 585998336, + "text": 2073444352, + "vms": 15191305498624}, + "memory_percent": 17.240654233581303, + "name": "code", + "nice": 0, + "nprocs": 14, + "num_threads": 233, + "pid": "_", + "status": "S", + "time_since_update": 1, + "username": "nicolargo"}, + {"childrens": [9777, 9348, 436891, 713198, 735237, 9589, 9755, 732462], "cmdline": ["Isolated Web Co"], "cpu_percent": 0, - "cpu_times": {"system": 470.28000000000003, "user": 5217.320000000001}, - "io_counters": [361497600, + "cpu_times": {"system": 500.5300000000001, "user": 5546.8099999999995}, + "io_counters": [361636864, 0, 0, 0, 0, - 128542720, + 128600064, 0, 0, 0, @@ -1339,12 +1521,17 @@ Get plugin stats:: 0, 0, 0, - 218574848, 0, 0, 0, 0, - 263183360, + 0, + 218886144, + 0, + 0, + 0, + 0, + 263195648, 65536, 0, 0, @@ -1354,41 +1541,16 @@ Get plugin stats:: 0, 0, 0], - "memory_info": {"data": 4379832320, - "rss": 3548114944, - "shared": 846712832, - "text": 4616192, - "vms": 23908450304}, - "memory_percent": 21.606884159190315, + "memory_info": {"data": 4970799104, + "rss": 3903365120, + "shared": 959430656, + "text": 5275648, + "vms": 26971701248}, + "memory_percent": 23.770244005619233, "name": "Isolated Web Co", "nice": 0, - "nprocs": 7, - "num_threads": 212, - "pid": "_", - "status": "S", - "time_since_update": 1, - "username": "nicolargo"}, - {"childrens": [8146], - "cmdline": ["firefox"], - "cpu_percent": 0, - "cpu_times": {"children_system": 2.01, - "children_user": 0.36, - "iowait": 0.0, - "system": 2534.21, - "user": 9495.41}, - "io_counters": [2430089216, 13687840768, 0, 0, 0], - "memory_info": {"data": 1179770880, - "dirty": 0, - "lib": 0, - "rss": 829825024, - "shared": 255205376, - "text": 659456, - "vms": 30405799936}, - "memory_percent": 5.053368746208614, - "name": "firefox", - "nice": 0, - "nprocs": 1, - "num_threads": 133, + "nprocs": 8, + "num_threads": 245, "pid": "_", "status": "S", "time_since_update": 1, @@ -1425,19 +1587,19 @@ GET quicklook Get plugin stats:: # curl http://localhost:61208/api/4/quicklook - {"cpu": 6.3, + {"cpu": 5.3, "cpu_hz": 4475000000.0, - "cpu_hz_current": 668344937.5, + "cpu_hz_current": 647252562.5000001, "cpu_log_core": 16, "cpu_name": "13th Gen Intel(R) Core(TM) i7-13620H", "cpu_phys_core": 10, - "load": 5.1, - "mem": 60.4, + "load": 4.4, + "mem": 63.1, "percpu": [{"cpu_number": 0, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 31.0, + "idle": 28.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1445,209 +1607,14 @@ Get plugin stats:: "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 11.0, - "total": 69.0, + "system": 6.0, + "total": 72.0, "user": 0.0}, {"cpu_number": 1, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 43.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 57.0, - "user": 0.0}, - {"cpu_number": 2, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 43.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 57.0, - "user": 0.0}, - {"cpu_number": 3, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 44.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 56.0, - "user": 0.0}, - {"cpu_number": 4, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 39.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 2.0, - "total": 61.0, - "user": 2.0}, - {"cpu_number": 5, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 44.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 56.0, - "user": 0.0}, - {"cpu_number": 6, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 25.0, - "interrupt": None, - "iowait": 1.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 13.0, - "total": 75.0, - "user": 2.0}, - {"cpu_number": 7, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 36.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 3.0, - "total": 64.0, - "user": 5.0}, - {"cpu_number": 8, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 43.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 57.0, - "user": 0.0}, - {"cpu_number": 9, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 44.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 56.0, - "user": 0.0}, - {"cpu_number": 10, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 43.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 57.0, - "user": 0.0}, - {"cpu_number": 11, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 44.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 56.0, - "user": 0.0}, - {"cpu_number": 12, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 44.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 56.0, - "user": 0.0}, - {"cpu_number": 13, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 43.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 57.0, - "user": 0.0}, - {"cpu_number": 14, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 43.0, + "idle": 34.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1656,13 +1623,13 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 1.0, - "total": 57.0, - "user": 0.0}, - {"cpu_number": 15, + "total": 66.0, + "user": 1.0}, + {"cpu_number": 2, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 43.0, + "idle": 35.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1671,9 +1638,204 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 0.0, - "total": 57.0, - "user": 1.0}], - "swap": 35.9} + "total": 65.0, + "user": 0.0}, + {"cpu_number": 3, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 35.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 65.0, + "user": 0.0}, + {"cpu_number": 4, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 20.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 11.0, + "total": 80.0, + "user": 2.0}, + {"cpu_number": 5, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 34.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 66.0, + "user": 0.0}, + {"cpu_number": 6, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 27.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 2.0, + "total": 73.0, + "user": 7.0}, + {"cpu_number": 7, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 35.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 65.0, + "user": 0.0}, + {"cpu_number": 8, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 34.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 66.0, + "user": 0.0}, + {"cpu_number": 9, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 35.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 65.0, + "user": 0.0}, + {"cpu_number": 10, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 34.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 66.0, + "user": 0.0}, + {"cpu_number": 11, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 34.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 66.0, + "user": 0.0}, + {"cpu_number": 12, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 35.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 65.0, + "user": 0.0}, + {"cpu_number": 13, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 33.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 67.0, + "user": 0.0}, + {"cpu_number": 14, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 34.0, + "interrupt": None, + "iowait": 1.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 66.0, + "user": 0.0}, + {"cpu_number": 15, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 34.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 66.0, + "user": 0.0}], + "swap": 43.2} Fields descriptions: @@ -1711,14 +1873,14 @@ Get plugin stats:: "label": "Ambient", "type": "temperature_core", "unit": "C", - "value": 36, + "value": 40, "warning": 0}, {"critical": None, "key": "label", "label": "Ambient 3", "type": "temperature_core", "unit": "C", - "value": 30, + "value": 34, "warning": 0}] Fields descriptions: @@ -1782,7 +1944,7 @@ Get a specific item when field matches the given value:: "label": "Ambient", "type": "temperature_core", "unit": "C", - "value": 36, + "value": 40, "warning": 0}]} GET smart @@ -1826,7 +1988,7 @@ GET uptime Get plugin stats:: # curl http://localhost:61208/api/4/uptime - "20 days, 23:24:39" + "21 days, 23:20:37" GET version ----------- @@ -1871,8 +2033,8 @@ Get plugin stats:: # curl http://localhost:61208/api/4/wifi [{"key": "ssid", - "quality_level": -61.0, - "quality_link": 49.0, + "quality_level": -59.0, + "quality_link": 51.0, "ssid": "wlp0s20f3"}] Get a specific field:: @@ -1884,8 +2046,8 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/wifi/ssid/value/wlp0s20f3 {"wlp0s20f3": [{"key": "ssid", - "quality_level": -61.0, - "quality_link": 49.0, + "quality_level": -59.0, + "quality_link": 51.0, "ssid": "wlp0s20f3"}]} GET all stats @@ -1949,34 +2111,34 @@ GET stats history History of a plugin:: # curl http://localhost:61208/api/4/cpu/history - {"system": [["2026-04-11T07:25:57.242139+00:00", 4.3], - ["2026-04-11T07:25:58.327162+00:00", 0.9], - ["2026-04-11T07:25:59.346854+00:00", 0.9]], - "user": [["2026-04-11T07:25:57.242136+00:00", 4.4], - ["2026-04-11T07:25:58.327160+00:00", 0.8], - ["2026-04-11T07:25:59.346851+00:00", 0.8]]} + {"system": [["2026-04-12T07:21:57.571239+00:00", 2.4], + ["2026-04-12T07:21:58.655208+00:00", 0.8], + ["2026-04-12T07:21:59.675406+00:00", 0.8]], + "user": [["2026-04-12T07:21:57.571237+00:00", 3.4], + ["2026-04-12T07:21:58.655206+00:00", 1.1], + ["2026-04-12T07:21:59.675403+00:00", 1.1]]} Limit history to last 2 values:: # curl http://localhost:61208/api/4/cpu/history/2 - {"system": [["2026-04-11T07:25:58.327162+00:00", 0.9], - ["2026-04-11T07:25:59.346854+00:00", 0.9]], - "user": [["2026-04-11T07:25:58.327160+00:00", 0.8], - ["2026-04-11T07:25:59.346851+00:00", 0.8]]} + {"system": [["2026-04-12T07:21:58.655208+00:00", 0.8], + ["2026-04-12T07:21:59.675406+00:00", 0.8]], + "user": [["2026-04-12T07:21:58.655206+00:00", 1.1], + ["2026-04-12T07:21:59.675403+00:00", 1.1]]} History for a specific field:: # curl http://localhost:61208/api/4/cpu/system/history - {"system": [["2026-04-11T07:25:55.985345+00:00", 4.3], - ["2026-04-11T07:25:57.242139+00:00", 4.3], - ["2026-04-11T07:25:58.327162+00:00", 0.9], - ["2026-04-11T07:25:59.346854+00:00", 0.9]]} + {"system": [["2026-04-12T07:21:56.383621+00:00", 2.4], + ["2026-04-12T07:21:57.571239+00:00", 2.4], + ["2026-04-12T07:21:58.655208+00:00", 0.8], + ["2026-04-12T07:21:59.675406+00:00", 0.8]]} Limit history for a specific field to last 2 values:: # curl http://localhost:61208/api/4/cpu/system/history - {"system": [["2026-04-11T07:25:58.327162+00:00", 0.9], - ["2026-04-11T07:25:59.346854+00:00", 0.9]]} + {"system": [["2026-04-12T07:21:58.655208+00:00", 0.8], + ["2026-04-12T07:21:59.675406+00:00", 0.8]]} GET limits (used for thresholds) -------------------------------- diff --git a/docs/man/glances.1 b/docs/man/glances.1 index 4cd09798..6b7af7bb 100644 --- a/docs/man/glances.1 +++ b/docs/man/glances.1 @@ -29,7 +29,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" "Apr 11, 2026" "4.5.4_dev1" "Glances" +.TH "GLANCES" "1" "Apr 12, 2026" "4.5.4_dev1" "Glances" .SH NAME glances \- An eye on your system .SH SYNOPSIS diff --git a/glances/outputs/glances_restful_api.py b/glances/outputs/glances_restful_api.py index 4e337df9..c71f8315 100644 --- a/glances/outputs/glances_restful_api.py +++ b/glances/outputs/glances_restful_api.py @@ -559,11 +559,25 @@ class GlancesRestfulApi: print(self._logo()) # Security warnings - if not self.args.password: - is_localhost = self.args.bind_address in ('127.0.0.1', 'localhost', '::1') + cors_origins = self.config.get_list_value('outputs', 'cors_origins', default=["*"]) + if not self.args.password and cors_origins == ["*"]: warn_lines = [ - "WARNING: Glances web server is running WITHOUT authentication.", + "WARNING: Glances web server is running without authentication and with permissive", + " CORS (Access-Control-Allow-Origin: *). Any web page reachable from your", + " browser can read system metrics. Consider binding to 127.0.0.1, enabling", + " authentication, or setting cors_origins in glances.conf.", + " See https://glances.readthedocs.io/en/latest/api/restful.html#security", ] + print('\n'.join(warn_lines) + '\n') + logger.warning( + "Glances web server is running without authentication and with permissive CORS " + "(Access-Control-Allow-Origin: *)" + ) + elif not self.args.password: + warn_lines = [ + "WARNING: Glances web server is running without authentication.", + ] + is_localhost = self.args.bind_address in ('127.0.0.1', 'localhost', '::1') if is_localhost: warn_lines.append(" Use --password to enable authentication.") else: