From 5cbbe91e1f777d89b1600a1caac8da12f939aef9 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 3 Jan 2026 08:52:19 +0100 Subject: [PATCH] Regenerate the WebUI and lint the code --- docs/api/python.rst | 318 ++++++------- docs/api/restful.rst | 543 ++++++++++++----------- docs/man/glances.1 | 2 +- glances/outputs/static/public/glances.js | Bin 625801 -> 626063 bytes glances/plugins/smart/__init__.py | 37 +- 5 files changed, 457 insertions(+), 443 deletions(-) diff --git a/docs/api/python.rst b/docs/api/python.rst index 90ba6a1d..7c696504 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': 392968698, + 'ctx_switches': 424379607, 'guest': 0.0, - 'idle': 93.4, - 'interrupts': 347279201, - 'iowait': 0.5, + 'idle': 92.0, + 'interrupts': 372289580, + 'iowait': 0.4, 'irq': 0.0, 'nice': 0.0, - 'soft_interrupts': 146726416, + 'soft_interrupts': 157664933, 'steal': 0.0, 'syscalls': 0, - 'system': 4.4, - 'total': 5.9, - 'user': 1.7} + 'system': 4.6, + 'total': 6.2, + 'user': 2.9} >>> gl.cpu.get("total") - 5.9 + 6.2 >>> gl.mem.get("used") - 12044965912 + 12146165784 >>> gl.auto_unit(gl.mem.get("used")) - 11.2G + 11.3G 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'] >>> gl.network["wlp0s20f3"] {'alias': None, - 'bytes_all': 1149, - 'bytes_all_gauge': 14756012143, - 'bytes_all_rate_per_sec': 7603.0, - 'bytes_recv': 608, - 'bytes_recv_gauge': 13741392863, - 'bytes_recv_rate_per_sec': 4023.0, - 'bytes_sent': 541, - 'bytes_sent_gauge': 1014619280, - 'bytes_sent_rate_per_sec': 3580.0, + 'bytes_all': 931, + 'bytes_all_gauge': 14895804253, + 'bytes_all_rate_per_sec': 2574.0, + 'bytes_recv': 587, + 'bytes_recv_gauge': 13855313231, + 'bytes_recv_rate_per_sec': 1623.0, + 'bytes_sent': 344, + 'bytes_sent_gauge': 1040491022, + 'bytes_sent_rate_per_sec': 951.0, 'interface_name': 'wlp0s20f3', 'key': 'interface_name', 'speed': 0, - 'time_since_update': 0.15111541748046875} + 'time_since_update': 0.36159610748291016} Init Glances Python API ----------------------- @@ -95,30 +95,30 @@ Alert stats: >>> type(gl.alert) >>> gl.alert - [{'avg': 96.85105977159478, - 'begin': 1767373692, + [{'avg': 90.53210309229192, + 'begin': 1767426673, 'count': 2, 'desc': '', 'end': -1, 'global_msg': 'High swap (paging) usage', - 'max': 96.85105977159478, - 'min': 96.85105977159478, + 'max': 90.53210309229192, + 'min': 90.53210309229192, 'sort': 'memory_percent', 'state': 'CRITICAL', - 'sum': 193.70211954318955, - 'top': ['code', 'firefox', 'code'], + 'sum': 181.06420618458384, + 'top': ['code', 'code', 'firefox'], 'type': 'MEMSWAP'}, - {'avg': 73.31673281888682, - 'begin': 1767373692, + {'avg': 73.95270073392017, + 'begin': 1767426673, 'count': 2, 'desc': '', 'end': -1, 'global_msg': 'High swap (paging) usage', - 'max': 73.34283346687624, - 'min': 73.2906321708974, + 'max': 73.9590481920313, + 'min': 73.94635327580903, 'sort': 'memory_percent', 'state': 'WARNING', - 'sum': 146.63346563777364, + 'sum': 147.90540146784033, 'top': [], 'type': 'MEM'}] @@ -156,12 +156,12 @@ Ports stats: >>> gl.ports [{'description': 'DefaultGateway', - 'host': '192.168.0.254', + 'host': '10.62.208.245', 'indice': 'port_0', 'port': 0, 'refresh': 30, 'rtt_warning': None, - 'status': 0.002841, + 'status': 0.067668, 'timeout': 3}] Ports fields description: @@ -202,14 +202,14 @@ Diskio stats: >>> gl.diskio.get("nvme0n1") {'disk_name': 'nvme0n1', 'key': 'disk_name', - 'read_bytes': 26400656896, - 'read_count': 995162, + 'read_bytes': 27877023232, + 'read_count': 1107469, 'read_latency': 0, - 'read_time': 249396, - 'write_bytes': 39424275456, - 'write_count': 2633670, + 'read_time': 280806, + 'write_bytes': 41955222528, + 'write_count': 2861119, 'write_latency': 0, - 'write_time': 2045785} + 'write_time': 2271011} Diskio fields description: @@ -294,11 +294,11 @@ Processcount stats: >>> type(gl.processcount) >>> gl.processcount - {'pid_max': 0, 'running': 1, 'sleeping': 444, 'thread': 2451, 'total': 593} + {'pid_max': 0, 'running': 1, 'sleeping': 439, 'thread': 2375, 'total': 591} >>> gl.processcount.keys() ['total', 'running', 'sleeping', 'thread', 'pid_max'] >>> gl.processcount.get("total") - 593 + 591 Processcount fields description: @@ -371,7 +371,7 @@ Percpu stats: 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 27.0, + 'idle': 44.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -379,8 +379,8 @@ Percpu stats: 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, - 'system': 8.0, - 'total': 73.0, + 'system': 9.0, + 'total': 56.0, 'user': 0.0} Percpu fields description: @@ -471,18 +471,18 @@ Network stats: >>> gl.network.get("wlp0s20f3") {'alias': None, 'bytes_all': 0, - 'bytes_all_gauge': 14756012143, + 'bytes_all_gauge': 14895804253, 'bytes_all_rate_per_sec': 0.0, 'bytes_recv': 0, - 'bytes_recv_gauge': 13741392863, + 'bytes_recv_gauge': 13855313231, 'bytes_recv_rate_per_sec': 0.0, 'bytes_sent': 0, - 'bytes_sent_gauge': 1014619280, + 'bytes_sent_gauge': 1040491022, 'bytes_sent_rate_per_sec': 0.0, 'interface_name': 'wlp0s20f3', 'key': 'interface_name', 'speed': 0, - 'time_since_update': 0.0019180774688720703} + 'time_since_update': 0.002863645553588867} Network fields description: @@ -523,23 +523,23 @@ Cpu stats: >>> gl.cpu {'cpucore': 16, - 'ctx_switches': 392968698, + 'ctx_switches': 424379607, 'guest': 0.0, - 'idle': 93.4, - 'interrupts': 347279201, - 'iowait': 0.5, + 'idle': 92.0, + 'interrupts': 372289580, + 'iowait': 0.4, 'irq': 0.0, 'nice': 0.0, - 'soft_interrupts': 146726416, + 'soft_interrupts': 157664933, 'steal': 0.0, 'syscalls': 0, - 'system': 4.4, - 'total': 5.9, - 'user': 1.7} + 'system': 4.6, + 'total': 6.2, + 'user': 2.9} >>> gl.cpu.keys() ['total', 'user', 'nice', 'system', 'idle', 'iowait', 'irq', 'steal', 'guest', 'ctx_switches', 'interrupts', 'soft_interrupts', 'syscalls', 'cpucore'] >>> gl.cpu.get("total") - 5.9 + 6.2 Cpu fields description: @@ -611,7 +611,7 @@ Amps stats: 'refresh': 3.0, 'regex': True, 'result': None, - 'timer': 0.18659353256225586} + 'timer': 0.323228120803833} Amps fields description: @@ -642,32 +642,32 @@ Processlist stats: >>> gl.processlist Return a dict of dict with key= >>> gl.processlist.keys() - [1, 2, 3, 4, 5, 6, 7, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 107, 108, 109, 110, 111, 113, 114, 115, 116, 117, 118, 121, 122, 123, 124, 125, 126, 127, 128, 133, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 150, 154, 156, 157, 158, 166, 179, 188, 189, 218, 219, 239, 240, 258, 267, 268, 269, 270, 271, 273, 279, 280, 364, 367, 369, 370, 371, 372, 373, 450, 452, 613, 618, 619, 620, 627, 659, 660, 726, 757, 758, 787, 795, 970, 971, 986, 1037, 1040, 1042, 1043, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1059, 1064, 1065, 1218, 1219, 1223, 1275, 1277, 1278, 1279, 1320, 1327, 1534, 1537, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2016, 2017, 2018, 2019, 2020, 2021, 2023, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2117, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 2130, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2149, 2603, 2604, 2605, 2606, 2613, 2615, 2744, 2745, 2746, 2750, 2751, 2755, 2762, 2774, 2781, 2788, 2791, 2796, 2799, 2802, 2813, 2820, 2823, 2887, 2904, 2905, 2916, 3031, 3038, 3081, 3181, 3182, 3186, 3191, 3192, 3240, 3382, 3383, 3670, 3671, 3695, 3698, 3807, 3817, 3818, 3822, 3827, 3828, 3846, 3853, 3874, 3901, 3902, 3903, 3904, 3905, 3906, 3907, 3908, 3982, 4194, 4596, 5146, 5166, 5172, 5179, 5189, 5190, 5193, 5195, 5197, 5207, 5263, 5267, 5274, 5318, 5333, 5421, 5425, 5441, 5453, 5457, 5492, 5505, 5509, 5593, 5612, 5620, 5621, 5634, 5657, 5658, 5661, 5664, 5665, 5667, 5669, 5672, 5675, 5678, 5680, 5685, 5687, 5693, 5695, 5700, 5708, 5726, 5734, 5829, 5832, 5833, 5844, 5861, 5871, 5914, 5921, 5931, 5941, 5954, 5957, 6017, 6063, 6087, 6093, 6094, 6123, 6154, 6206, 6244, 6475, 6505, 6552, 6559, 6562, 7227, 8412, 8526, 9631, 9649, 9661, 9731, 9734, 11010, 12121, 12123, 12124, 12138, 12192, 12239, 12278, 12321, 12335, 12336, 12417, 12686, 12726, 12735, 12929, 12931, 12932, 12933, 12934, 13048, 13115, 13536, 13665, 36430, 40117, 53755, 53764, 62488, 62637, 72064, 72065, 72120, 72139, 102070, 340569, 358046, 388396, 413445, 444052, 444061, 471623, 471714, 471892, 471899, 471919, 471929, 471954, 472557, 472566, 472570, 472785, 472854, 472861, 473314, 481055, 498113, 513901, 514243, 514681, 515455, 518033, 520070, 524431, 524432, 524447, 524457, 524551, 530020, 531982, 531983, 532003, 532019, 532126, 532187, 532625, 542169, 542928, 545701, 546233, 546254, 547205, 547220, 547714, 547732, 548091, 548102, 548622, 550414, 555282, 557645, 557646, 557648, 561234, 564559, 567573, 572276, 572387, 572901, 574078, 581119, 581221, 581222, 582989, 583097, 583966, 585509, 585867, 586640, 586660, 586676, 586686, 588116, 588144, 588161, 588690, 589569, 589794, 591548, 591550, 591551, 591712, 591853, 592272, 593020, 593126, 594465, 595041, 595152, 596658, 596663, 596890, 597033, 598027, 598303, 598538, 598539, 598540, 598541, 598598, 598756, 599183, 599214, 599225, 600160, 600310, 601882, 601885, 601886, 601889] + [1, 2, 3, 4, 5, 6, 7, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 107, 108, 109, 110, 111, 113, 114, 115, 116, 117, 118, 121, 122, 123, 124, 125, 126, 127, 128, 133, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 150, 154, 156, 157, 158, 166, 179, 188, 189, 218, 219, 239, 240, 258, 267, 268, 269, 270, 271, 273, 279, 280, 364, 367, 369, 370, 371, 372, 373, 450, 452, 613, 618, 619, 620, 627, 659, 660, 726, 757, 758, 787, 795, 970, 971, 986, 1037, 1040, 1042, 1043, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1059, 1064, 1065, 1218, 1219, 1223, 1275, 1277, 1278, 1279, 1320, 1327, 1534, 1537, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2016, 2017, 2018, 2019, 2020, 2021, 2023, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2117, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 2130, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2149, 2603, 2604, 2605, 2606, 2613, 2615, 2744, 2745, 2746, 2750, 2751, 2755, 2762, 2774, 2781, 2788, 2791, 2796, 2799, 2802, 2813, 2820, 2823, 2887, 2904, 2905, 2916, 3031, 3038, 3081, 3181, 3182, 3186, 3191, 3192, 3240, 3382, 3383, 3670, 3671, 3695, 3698, 3807, 3817, 3818, 3822, 3827, 3828, 3846, 3853, 3874, 3901, 3902, 3903, 3904, 3905, 3906, 3907, 3908, 3982, 4194, 4596, 5146, 5166, 5172, 5179, 5189, 5190, 5193, 5195, 5197, 5207, 5263, 5267, 5274, 5318, 5333, 5421, 5425, 5441, 5453, 5457, 5492, 5505, 5509, 5593, 5612, 5620, 5621, 5634, 5657, 5658, 5661, 5664, 5665, 5667, 5669, 5672, 5675, 5678, 5680, 5685, 5687, 5693, 5695, 5700, 5708, 5726, 5734, 5829, 5832, 5833, 5844, 5861, 5871, 5914, 5921, 5931, 5941, 5954, 5957, 6017, 6063, 6087, 6093, 6094, 6123, 6154, 6206, 6244, 6475, 6505, 6552, 6559, 6562, 7227, 8412, 8526, 9631, 9649, 9661, 9731, 9734, 11010, 12121, 12123, 12124, 12138, 12192, 12239, 12278, 12321, 12335, 12336, 12417, 12686, 12726, 12735, 12929, 12931, 12933, 12934, 13048, 13115, 13536, 13665, 36430, 40117, 53755, 53764, 62488, 62637, 72064, 72065, 72120, 72139, 102070, 340569, 388396, 413445, 444052, 444061, 471623, 471714, 471892, 471899, 471919, 471929, 471954, 472557, 472566, 472570, 472785, 472854, 472861, 473314, 481055, 513901, 514243, 524431, 524432, 524447, 524457, 524551, 532126, 546233, 546254, 547205, 547220, 547714, 547732, 548091, 548102, 548622, 561234, 564559, 567573, 574078, 598539, 604653, 607301, 611703, 614410, 618951, 619505, 622299, 624217, 626612, 639936, 648416, 652689, 652881, 653438, 654061, 654062, 654065, 654075, 654078, 654079, 654084, 654088, 654089, 654092, 654094, 654095, 654097, 654101, 654102, 654261, 654791, 658059, 658444, 660200, 660866, 661443, 661802, 661966, 662309, 662533, 662902, 662943, 662984, 664170, 664744, 664861, 665130, 666402, 666436, 666721, 667135, 667477, 667735, 668262, 668263, 669291, 669326, 669609, 669978, 670115, 670295, 670361, 670362, 670452, 670570, 670626, 671131, 671134, 671135, 671138, 671164, 671165] >>> gl.processlist.get("1") {'cmdline': ['/sbin/init', 'splash'], 'cpu_percent': 0.0, - 'cpu_times': {'children_system': 287.89, - 'children_user': 5146.36, + 'cpu_times': {'children_system': 290.46, + 'children_user': 5148.19, 'iowait': 0.0, - 'system': 7.96, - 'user': 11.06}, + 'system': 8.42, + 'user': 11.63}, 'gids': {'effective': 0, 'real': 0, 'saved': 0}, 'io_counters': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'key': 'pid', 'memory_info': {'data': 7282688, 'dirty': 0, 'lib': 0, - 'rss': 14622720, - 'shared': 8175616, + 'rss': 14610432, + 'shared': 8159232, 'text': 45056, 'vms': 26632192}, - 'memory_percent': 0.0890389998301525, + 'memory_percent': 0.0889641771412196, 'name': 'systemd', 'nice': 0, 'num_threads': 1, 'pid': 1, 'status': 'S', - 'time_since_update': 0.39455604553222656, + 'time_since_update': 0.6753289699554443, 'username': 'root'} Processlist fields description: @@ -752,13 +752,13 @@ Load stats: >>> gl.load {'cpucore': 16, - 'min1': 0.52685546875, - 'min15': 0.517578125, - 'min5': 0.5439453125} + 'min1': 1.50830078125, + 'min15': 0.97412109375, + 'min5': 1.22705078125} >>> gl.load.keys() ['min1', 'min5', 'min15', 'cpucore'] >>> gl.load.get("min1") - 0.52685546875 + 1.50830078125 Load fields description: @@ -797,7 +797,7 @@ Sensors stats: 'label': 'Ambient', 'type': 'temperature_core', 'unit': 'C', - 'value': 39, + 'value': 28, 'warning': 0} Sensors fields description: @@ -835,7 +835,7 @@ Uptime stats: >>> type(gl.uptime) >>> gl.uptime - '6 days, 1:42:29' + '6 days, 16:25:30' Uptime limits: @@ -854,11 +854,11 @@ Now stats: >>> type(gl.now) >>> gl.now - {'custom': '2026-01-02 18:08:13 CET', 'iso': '2026-01-02T18:08:13+01:00'} + {'custom': '2026-01-03 08:51:14 CET', 'iso': '2026-01-03T08:51:14+01:00'} >>> gl.now.keys() ['iso', 'custom'] >>> gl.now.get("iso") - '2026-01-02T18:08:13+01:00' + '2026-01-03T08:51:14+01:00' Now fields description: @@ -888,14 +888,14 @@ Fs stats: >>> gl.fs.get("/") {'alias': 'Root', 'device_name': '/dev/mapper/ubuntu--vg-ubuntu--lv', - 'free': 582637228032, + 'free': 582306385920, 'fs_type': 'ext4', 'key': 'mnt_point', 'mnt_point': '/', 'options': 'rw,relatime', - 'percent': 38.8, + 'percent': 38.9, 'size': 1003736440832, - 'used': 370036707328} + 'used': 370367549440} Fs fields description: @@ -936,8 +936,8 @@ Wifi stats: ['wlp0s20f3'] >>> gl.wifi.get("wlp0s20f3") {'key': 'ssid', - 'quality_level': -63.0, - 'quality_link': 47.0, + 'quality_level': -44.0, + 'quality_link': 66.0, 'ssid': 'wlp0s20f3'} Wifi limits: @@ -961,7 +961,7 @@ Ip stats: >>> type(gl.ip) >>> gl.ip - {'address': '192.168.0.26', + {'address': '10.62.208.39', 'mask': '255.255.255.0', 'mask_cidr': 24, 'public_address': '', @@ -969,7 +969,7 @@ Ip stats: >>> gl.ip.keys() ['address', 'mask', 'mask_cidr', 'public_address', 'public_info_human'] >>> gl.ip.get("address") - '192.168.0.26' + '10.62.208.39' Ip fields description: @@ -1069,16 +1069,16 @@ Mem stats: >>> type(gl.mem) >>> gl.mem - {'active': 5357809664, - 'available': 4377860072, - 'buffers': 106696704, - 'cached': 4016909160, - 'free': 846315520, - 'inactive': 7907250176, - 'percent': 73.3, - 'shared': 812941312, + {'active': 4547899392, + 'available': 4276660200, + 'buffers': 186654720, + 'cached': 3829238632, + 'free': 998457344, + 'inactive': 8566132736, + 'percent': 74.0, + 'shared': 783462400, 'total': 16422825984, - 'used': 12044965912} + 'used': 12146165784} >>> gl.mem.keys() ['total', 'available', 'percent', 'used', 'free', 'active', 'inactive', 'buffers', 'cached', 'shared'] >>> gl.mem.get("total") @@ -1148,19 +1148,19 @@ Quicklook stats: >>> type(gl.quicklook) >>> gl.quicklook - {'cpu': 5.9, + {'cpu': 6.2, 'cpu_hz': 4475000000.0, - 'cpu_hz_current': 736325000.0000001, + 'cpu_hz_current': 1252763375.0000002, 'cpu_log_core': 16, 'cpu_name': '13th Gen Intel(R) Core(TM) i7-13620H', 'cpu_phys_core': 10, - 'load': 3.2, - 'mem': 73.3, + 'load': 6.1, + 'mem': 74.0, 'percpu': [{'cpu_number': 0, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 27.0, + 'idle': 44.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1168,14 +1168,14 @@ Quicklook stats: 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, - 'system': 8.0, - 'total': 73.0, + 'system': 9.0, + 'total': 56.0, 'user': 0.0}, {'cpu_number': 1, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 34.0, + 'idle': 55.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1184,13 +1184,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 66.0, - 'user': 1.0}, + 'total': 45.0, + 'user': 0.0}, {'cpu_number': 2, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 34.0, + 'idle': 55.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1199,13 +1199,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 66.0, - 'user': 1.0}, + 'total': 45.0, + 'user': 0.0}, {'cpu_number': 3, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 35.0, + 'idle': 56.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1214,38 +1214,38 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 65.0, + 'total': 44.0, 'user': 0.0}, {'cpu_number': 4, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 20.0, + 'idle': 44.0, 'interrupt': None, - 'iowait': 1.0, + 'iowait': 0.0, + 'irq': 0.0, + 'key': 'cpu_number', + 'nice': 0.0, + 'softirq': 0.0, + 'steal': 0.0, + 'system': 10.0, + 'total': 56.0, + 'user': 1.0}, + {'cpu_number': 5, + 'dpc': None, + 'guest': 0.0, + 'guest_nice': 0.0, + 'idle': 46.0, + 'interrupt': None, + 'iowait': 0.0, 'irq': 0.0, 'key': 'cpu_number', 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, 'system': 6.0, - 'total': 80.0, - 'user': 7.0}, - {'cpu_number': 5, - 'dpc': None, - 'guest': 0.0, - 'guest_nice': 0.0, - 'idle': 25.0, - 'interrupt': None, - 'iowait': 0.0, - 'irq': 0.0, - 'key': 'cpu_number', - 'nice': 0.0, - 'softirq': 0.0, - 'steal': 0.0, - 'system': 7.0, - 'total': 75.0, - 'user': 1.0}, + 'total': 54.0, + 'user': 0.0}, {'cpu_number': 6, 'dpc': None, 'guest': 0.0, @@ -1258,14 +1258,14 @@ Quicklook stats: 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, - 'system': 0.0, + 'system': 9.0, 'total': 66.0, - 'user': 1.0}, + 'user': 12.0}, {'cpu_number': 7, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 35.0, + 'idle': 55.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1274,13 +1274,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 65.0, + 'total': 45.0, 'user': 0.0}, {'cpu_number': 8, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 35.0, + 'idle': 54.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1289,13 +1289,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 65.0, - 'user': 0.0}, + 'total': 46.0, + 'user': 1.0}, {'cpu_number': 9, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 35.0, + 'idle': 56.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1304,13 +1304,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 65.0, + 'total': 44.0, 'user': 0.0}, {'cpu_number': 10, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 35.0, + 'idle': 54.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1319,13 +1319,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 65.0, + 'total': 46.0, 'user': 0.0}, {'cpu_number': 11, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 35.0, + 'idle': 56.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1334,28 +1334,28 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 65.0, + 'total': 44.0, 'user': 0.0}, {'cpu_number': 12, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 34.0, + 'idle': 55.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, 'key': 'cpu_number', 'nice': 0.0, - 'softirq': 0.0, + 'softirq': 1.0, 'steal': 0.0, 'system': 0.0, - 'total': 66.0, + 'total': 45.0, 'user': 1.0}, {'cpu_number': 13, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 35.0, + 'idle': 55.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1364,13 +1364,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 65.0, - 'user': 1.0}, + 'total': 45.0, + 'user': 0.0}, {'cpu_number': 14, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 34.0, + 'idle': 55.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1379,13 +1379,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 66.0, + 'total': 45.0, 'user': 1.0}, {'cpu_number': 15, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 34.0, + 'idle': 55.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1394,9 +1394,9 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 66.0, + 'total': 45.0, 'user': 0.0}], - 'swap': 96.9} + 'swap': 90.5} >>> 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") @@ -1446,13 +1446,13 @@ Memswap stats: >>> type(gl.memswap) >>> gl.memswap - {'free': 135245824, - 'percent': 96.9, - 'sin': 1637122048, - 'sout': 6747344896, - 'time_since_update': 0.3689241409301758, + {'free': 406642688, + 'percent': 90.5, + 'sin': 2149658624, + 'sout': 7170572288, + 'time_since_update': 0.7601914405822754, 'total': 4294963200, - 'used': 4159717376} + 'used': 3888320512} >>> gl.memswap.keys() ['total', 'used', 'free', 'percent', 'sin', 'sout', 'time_since_update'] >>> gl.memswap.get("total") @@ -1487,10 +1487,10 @@ Use auto_unit() function to generate a human-readable string with the unit: .. code-block:: python >>> gl.mem.get("used") - 12044965912 + 12146165784 >>> gl.auto_unit(gl.mem.get("used")) - 11.2G + 11.3G Args: @@ -1546,7 +1546,7 @@ Use top_process() function to generate a list of top processes sorted by CPU or .. code-block:: python >>> gl.top_process() - [{'name': 'Isolated Web Co', 'io_counters': [7396352, 0, 7396352, 0, 1], 'pid': 472861, 'num_threads': 34, 'cpu_times': {'user': 618.31, 'system': 60.68, 'children_user': 0.0, 'children_system': 0.0, 'iowait': 0.0}, 'nice': 0, 'memory_percent': 3.11668922570738, 'status': 'S', 'memory_info': {'rss': 511848448, 'vms': 4369629184, 'shared': 74829824, 'text': 708608, 'lib': 0, 'data': 702328832, 'dirty': 0}, 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'cpu_percent': 2.6, 'key': 'pid', 'time_since_update': 0.39455604553222656, 'cmdline': ['/snap/firefox/7559/usr/lib/firefox/firefox', '-contentproc', '-isForBrowser', '-prefsHandle', '0:45904', '-prefMapHandle', '1:280269', '-jsInitHandle', '2:223356', '-parentBuildID', '20251217233610', '-sandboxReporter', '3', '-chrootClient', '4', '-ipcHandle', '5', '-initialChannelId', '{b750b1b5-b51f-4cbd-8493-9c918fb23a11}', '-parentPid', '471623', '-crashReporter', '6', '-crashHelper', '7', '-greomni', '/snap/firefox/7559/usr/lib/firefox/omni.ja', '-appomni', '/snap/firefox/7559/usr/lib/firefox/browser/omni.ja', '-appDir', '/snap/firefox/7559/usr/lib/firefox/browser', '11', 'tab'], 'username': 'nicolargo'}, {'name': 'dockerd', 'io_counters': [0, 0, 0, 0, 0], 'pid': 3807, 'num_threads': 80, 'cpu_times': {'user': 103.99, 'system': 47.08, 'children_user': 3.67, 'children_system': 5.75, 'iowait': 0.0}, 'nice': 0, 'memory_percent': 0.335679523449306, 'status': 'S', 'memory_info': {'rss': 55128064, 'vms': 7906430976, 'shared': 23244800, 'text': 32280576, 'lib': 0, 'data': 795447296, 'dirty': 0}, 'gids': {'real': 0, 'effective': 0, 'saved': 0}, 'cpu_percent': 2.6, 'key': 'pid', 'time_since_update': 0.39455604553222656, 'cmdline': ['/usr/bin/dockerd', '-H', 'fd://', '--containerd=/run/containerd/containerd.sock'], 'username': 'root'}, {'name': 'iio-sensor-proxy', 'io_counters': [0, 0, 0, 0, 0], 'pid': 2755, 'num_threads': 4, 'cpu_times': {'user': 4.86, 'system': 7.32, 'children_user': 0.0, 'children_system': 0.0, 'iowait': 0.0}, 'nice': 0, 'memory_percent': 0.04753734836870327, 'status': 'S', 'memory_info': {'rss': 7806976, 'vms': 321671168, 'shared': 7127040, 'text': 36864, 'lib': 0, 'data': 35307520, 'dirty': 0}, 'gids': {'real': 0, 'effective': 0, 'saved': 0}, 'cpu_percent': 2.6, 'key': 'pid', 'time_since_update': 0.39455604553222656, 'cmdline': ['/usr/libexec/iio-sensor-proxy'], 'username': 'root'}] + [{'num_threads': 25, 'name': 'code', 'memory_percent': 4.193961360066981, 'status': 'S', 'io_counters': [148809728, 1732608, 148809728, 1732608, 1], 'memory_info': {'rss': 688766976, 'vms': 1517470724096, 'shared': 85463040, 'text': 148733952, 'lib': 0, 'data': 1770684416, 'dirty': 0}, 'cpu_percent': 12.5, 'cpu_times': {'user': 3545.45, 'system': 274.61, 'children_user': 0.0, 'children_system': 0.0, 'iowait': 0.0}, 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'pid': 12239, 'nice': 0, 'key': 'pid', 'time_since_update': 0.6753289699554443, 'cmdline': ['/snap/code/211/usr/share/code/code', '--type=zygote', '--no-sandbox'], 'username': 'nicolargo'}, {'num_threads': 22, 'name': 'code', 'memory_percent': 5.9650892297976865, 'status': 'S', 'io_counters': [1488760832, 484003840, 1488760832, 484003840, 1], 'memory_info': {'rss': 979636224, 'vms': 1499914432512, 'shared': 35229696, 'text': 148733952, 'lib': 0, 'data': 2720628736, 'dirty': 0}, 'cpu_percent': 1.6, 'cpu_times': {'user': 1337.69, 'system': 623.58, 'children_user': 805.37, 'children_system': 784.59, 'iowait': 0.0}, 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'pid': 12321, 'nice': 0, 'key': 'pid', 'time_since_update': 0.6753289699554443, 'cmdline': ['/proc/self/exe', '--type=utility', '--utility-sub-type=node.mojom.NodeService', '--lang=en-US', '--service-sandbox-type=none', '--no-sandbox', '--dns-result-order=ipv4first', '--experimental-network-inspection', '--inspect-port=0', '--crashpad-handler-pid=12138', '--enable-crash-reporter=864d4bb7-dd20-4851-830f-29e81dd93517,no_channel', '--user-data-dir=/home/nicolargo/.config/Code', '--standard-schemes=vscode-webview,vscode-file', '--secure-schemes=vscode-webview,vscode-file', '--cors-schemes=vscode-webview,vscode-file', '--fetch-schemes=vscode-webview,vscode-file', '--service-worker-schemes=vscode-webview', '--code-cache-schemes=vscode-webview,vscode-file', '--shared-files=v8_context_snapshot_data:100', '--field-trial-handle=3,i,768474601394521582,1148810169323883902,262144', '--enable-features=DocumentPolicyIncludeJSCallStacksInCrashReports,EarlyEstablishGpuChannel,EstablishGpuChannelAsync', '--disable-features=CalculateNativeWinOcclusion,FontationsLinuxSystemFonts,ScreenAIOCREnabled,SpareRendererForSitePerProcess', '--variations-seed-version'], 'username': 'nicolargo'}, {'num_threads': 15, 'name': 'claude', 'memory_percent': 2.186618261375106, 'status': 'S', 'io_counters': [118784, 21598208, 118784, 21598208, 1], 'memory_info': {'rss': 359104512, 'vms': 76524011520, 'shared': 10592256, 'text': 61407232, 'lib': 0, 'data': 73645785088, 'dirty': 0}, 'cpu_percent': 1.6, 'cpu_times': {'user': 8.47, 'system': 3.6, 'children_user': 1.1, 'children_system': 0.59, 'iowait': 0.0}, 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'pid': 547714, 'nice': 0, 'key': 'pid', 'time_since_update': 0.6753289699554443, 'cmdline': ['/home/nicolargo/.vscode/extensions/anthropic.claude-code-2.0.75-linux-x64/resources/native-binary/claude', '--output-format', 'stream-json', '--verbose', '--input-format', 'stream-json', '--max-thinking-tokens', '0', '--model', 'default', '--permission-prompt-tool', 'stdio', '--setting-sources', 'user,project,local', '--permission-mode', 'default', '--include-partial-messages', '--debug', '--debug-to-stderr', '--enable-auth-status'], 'username': 'nicolargo'}] Args: diff --git a/docs/api/restful.rst b/docs/api/restful.rst index fa2aaec4..9ecbb702 100644 --- a/docs/api/restful.rst +++ b/docs/api/restful.rst @@ -160,7 +160,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.3144989013671875}, + "timer": 0.5697028636932373}, {"count": 0, "countmax": 20.0, "countmin": None, @@ -169,7 +169,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.3144419193267822}] + "timer": 0.5693261623382568}] Fields descriptions: @@ -197,7 +197,7 @@ Get a specific item when field matches the given value:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.3144989013671875}]} + "timer": 0.5697028636932373}]} GET cloud --------- @@ -287,19 +287,19 @@ Get plugin stats:: # curl http://localhost:61208/api/4/cpu {"cpucore": 16, - "ctx_switches": 392989414, + "ctx_switches": 424397936, "guest": 0.0, - "idle": 93.2, - "interrupts": 347294724, - "iowait": 0.3, + "idle": 93.6, + "interrupts": 372305428, + "iowait": 0.1, "irq": 0.0, "nice": 0.0, - "soft_interrupts": 146735350, + "soft_interrupts": 157673564, "steal": 0.0, "syscalls": 0, - "system": 3.2, - "total": 6.2, - "user": 3.3} + "system": 3.0, + "total": 6.1, + "user": 3.4} Fields descriptions: @@ -332,7 +332,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/cpu/total - {"total": 6.2} + {"total": 6.1} GET diskio ---------- @@ -342,14 +342,14 @@ Get plugin stats:: # curl http://localhost:61208/api/4/diskio [{"disk_name": "nvme0n1", "key": "disk_name", - "read_bytes": 26402790912, - "read_count": 995543, + "read_bytes": 27877469696, + "read_count": 1107482, "read_latency": 0, - "read_time": 249438, - "write_bytes": 39424939008, - "write_count": 2633739, + "read_time": 280819, + "write_bytes": 41955394560, + "write_count": 2861124, "write_latency": 0, - "write_time": 2045942}, + "write_time": 2271036}, {"disk_name": "nvme0n1p1", "key": "disk_name", "read_bytes": 14747648, @@ -401,14 +401,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": 26402790912, - "read_count": 995543, + "read_bytes": 27877469696, + "read_count": 1107482, "read_latency": 0, - "read_time": 249438, - "write_bytes": 39424939008, - "write_count": 2633739, + "read_time": 280819, + "write_bytes": 41955394560, + "write_count": 2861124, "write_latency": 0, - "write_time": 2045942}]} + "write_time": 2271036}]} GET folders ----------- @@ -436,14 +436,14 @@ Get plugin stats:: # curl http://localhost:61208/api/4/fs [{"alias": "Root", "device_name": "/dev/mapper/ubuntu--vg-ubuntu--lv", - "free": 582637326336, + "free": 582306398208, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", "options": "rw,relatime", - "percent": 38.8, + "percent": 38.9, "size": 1003736440832, - "used": 370036609024}, + "used": 370367537152}, {"device_name": "zsfpool", "free": 41680896, "fs_type": "zfs", @@ -475,14 +475,14 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/fs/mnt_point/value// {"/": [{"alias": "Root", "device_name": "/dev/mapper/ubuntu--vg-ubuntu--lv", - "free": 582637326336, + "free": 582306398208, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", "options": "rw,relatime", - "percent": 38.8, + "percent": 38.9, "size": 1003736440832, - "used": 370036609024}]} + "used": 370367537152}]} GET gpu ------- @@ -515,7 +515,7 @@ GET ip Get plugin stats:: # curl http://localhost:61208/api/4/ip - {"address": "192.168.0.26", + {"address": "10.62.208.39", "mask": "255.255.255.0", "mask_cidr": 24, "public_address": "", @@ -533,7 +533,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/ip/address - {"address": "192.168.0.26"} + {"address": "10.62.208.39"} GET irq ------- @@ -554,7 +554,10 @@ GET load Get plugin stats:: # curl http://localhost:61208/api/4/load - {"cpucore": 16, "min1": 0.72509765625, "min15": 0.53125, "min5": 0.5849609375} + {"cpucore": 16, + "min1": 1.46728515625, + "min15": 0.974609375, + "min5": 1.22314453125} Fields descriptions: @@ -566,7 +569,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/load/min1 - {"min1": 0.72509765625} + {"min1": 1.46728515625} GET mem ------- @@ -574,16 +577,16 @@ GET mem Get plugin stats:: # curl http://localhost:61208/api/4/mem - {"active": 5357441024, - "available": 4346701800, - "buffers": 106729472, - "cached": 4032416616, - "free": 818991104, - "inactive": 7906566144, - "percent": 73.5, - "shared": 828108800, + {"active": 4544765952, + "available": 4291725288, + "buffers": 186662912, + "cached": 3842374504, + "free": 1012998144, + "inactive": 8566657024, + "percent": 73.9, + "shared": 796164096, "total": 16422825984, - "used": 12076124184} + "used": 12131100696} Fields descriptions: @@ -610,13 +613,13 @@ GET memswap Get plugin stats:: # curl http://localhost:61208/api/4/memswap - {"free": 137605120, - "percent": 96.8, - "sin": 1638973440, - "sout": 6747344896, + {"free": 406642688, + "percent": 90.5, + "sin": 2149658624, + "sout": 7170572288, "time_since_update": 1, "total": 4294963200, - "used": 4157358080} + "used": 3888320512} Fields descriptions: @@ -641,18 +644,18 @@ Get plugin stats:: # curl http://localhost:61208/api/4/network [{"alias": None, "bytes_all": 0, - "bytes_all_gauge": 14756040593, + "bytes_all_gauge": 14895811367, "bytes_all_rate_per_sec": 0, "bytes_recv": 0, - "bytes_recv_gauge": 13741410528, + "bytes_recv_gauge": 13855316236, "bytes_recv_rate_per_sec": 0, "bytes_sent": 0, - "bytes_sent_gauge": 1014630065, + "bytes_sent_gauge": 1040495131, "bytes_sent_rate_per_sec": 0, "interface_name": "wlp0s20f3", "key": "interface_name", "speed": 0, - "time_since_update": 0.32105422019958496}] + "time_since_update": 0.5848021507263184}] Fields descriptions: @@ -681,18 +684,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": 14756040593, + "bytes_all_gauge": 14895811367, "bytes_all_rate_per_sec": 0, "bytes_recv": 0, - "bytes_recv_gauge": 13741410528, + "bytes_recv_gauge": 13855316236, "bytes_recv_rate_per_sec": 0, "bytes_sent": 0, - "bytes_sent_gauge": 1014630065, + "bytes_sent_gauge": 1040495131, "bytes_sent_rate_per_sec": 0, "interface_name": "wlp0s20f3", "key": "interface_name", "speed": 0, - "time_since_update": 0.32105422019958496}]} + "time_since_update": 0.5848021507263184}]} GET now ------- @@ -700,7 +703,7 @@ GET now Get plugin stats:: # curl http://localhost:61208/api/4/now - {"custom": "2026-01-02 18:08:16 CET", "iso": "2026-01-02T18:08:16+01:00"} + {"custom": "2026-01-03 08:51:19 CET", "iso": "2026-01-03T08:51:19+01:00"} Fields descriptions: @@ -710,7 +713,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/now/iso - {"iso": "2026-01-02T18:08:16+01:00"} + {"iso": "2026-01-03T08:51:19+01:00"} GET percpu ---------- @@ -722,7 +725,7 @@ Get plugin stats:: "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 23.0, + "idle": 44.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -730,14 +733,14 @@ Get plugin stats:: "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 9.0, - "total": 77.0, - "user": 0.0}, + "system": 11.0, + "total": 56.0, + "user": 1.0}, {"cpu_number": 1, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 31.0, + "idle": 57.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -746,7 +749,7 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 0.0, - "total": 69.0, + "total": 43.0, "user": 0.0}] Fields descriptions: @@ -778,12 +781,12 @@ Get plugin stats:: # curl http://localhost:61208/api/4/ports [{"description": "DefaultGateway", - "host": "192.168.0.254", + "host": "10.62.208.245", "indice": "port_0", "port": 0, "refresh": 30, "rtt_warning": None, - "status": 0.003764, + "status": 0.007788, "timeout": 3}] Fields descriptions: @@ -800,18 +803,18 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/ports/host - {"host": ["192.168.0.254"]} + {"host": ["10.62.208.245"]} Get a specific item when field matches the given value:: - # curl http://localhost:61208/api/4/ports/host/value/192.168.0.254 - {"192.168.0.254": [{"description": "DefaultGateway", - "host": "192.168.0.254", + # curl http://localhost:61208/api/4/ports/host/value/10.62.208.245 + {"10.62.208.245": [{"description": "DefaultGateway", + "host": "10.62.208.245", "indice": "port_0", "port": 0, "refresh": 30, "rtt_warning": None, - "status": 0.003764, + "status": 0.007788, "timeout": 3}]} GET processcount @@ -820,7 +823,7 @@ GET processcount Get plugin stats:: # curl http://localhost:61208/api/4/processcount - {"pid_max": 0, "running": 1, "sleeping": 443, "thread": 2459, "total": 592} + {"pid_max": 0, "running": 1, "sleeping": 441, "thread": 2369, "total": 592} Fields descriptions: @@ -843,22 +846,22 @@ Get plugin stats:: # curl http://localhost:61208/api/4/processlist [{"cmdline": ["/sbin/init", "splash"], "cpu_percent": 0.0, - "cpu_times": {"children_system": 287.89, - "children_user": 5146.36, + "cpu_times": {"children_system": 290.46, + "children_user": 5148.19, "iowait": 0.0, - "system": 7.96, - "user": 11.06}, + "system": 8.42, + "user": 11.63}, "gids": {"effective": 0, "real": 0, "saved": 0}, "io_counters": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "key": "pid", "memory_info": {"data": 7282688, "dirty": 0, "lib": 0, - "rss": 14622720, - "shared": 8175616, + "rss": 14610432, + "shared": 8159232, "text": 45056, "vms": 26632192}, - "memory_percent": 0.0890389998301525, + "memory_percent": 0.0889641771412196, "name": "systemd", "nice": 0, "num_threads": 1, @@ -871,7 +874,7 @@ Get plugin stats:: "cpu_times": {"children_system": 0.0, "children_user": 0.0, "iowait": 0.0, - "system": 0.19, + "system": 0.2, "user": 0.0}, "gids": {"effective": 0, "real": 0, "saved": 0}, "io_counters": [0, 0, 0, 0, 0], @@ -917,16 +920,16 @@ Get plugin stats:: [{"childrens": [1, 5172], "cmdline": ["systemd"], "cpu_percent": 0, - "cpu_times": {"children_system": 1570.1999999999998, - "children_user": 15247.68, - "system": 10.89, - "user": 29.240000000000002}, + "cpu_times": {"children_system": 1579.83, + "children_user": 15259.060000000001, + "system": 11.56, + "user": 31.009999999999998}, "io_counters": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - "memory_info": {"data": 10752000, + "memory_info": {"data": 10764288, "rss": 26279936, - "shared": 16699392, + "shared": 16666624, "text": 90112, - "vms": 49451008}, + "vms": 49463296}, "memory_percent": 0.16002079073116482, "name": "systemd", "nice": 0, @@ -942,7 +945,7 @@ Get plugin stats:: "cpu_times": {"children_system": 0.0, "children_user": 0.0, "iowait": 0.0, - "system": 0.19, + "system": 0.2, "user": 0.0}, "io_counters": [0, 0, 0, 0, 0], "memory_info": {"data": 0, @@ -992,19 +995,19 @@ GET quicklook Get plugin stats:: # curl http://localhost:61208/api/4/quicklook - {"cpu": 6.2, + {"cpu": 6.1, "cpu_hz": 4475000000.0, - "cpu_hz_current": 663541812.5, + "cpu_hz_current": 740159562.5, "cpu_log_core": 16, "cpu_name": "13th Gen Intel(R) Core(TM) i7-13620H", "cpu_phys_core": 10, - "load": 3.3, - "mem": 73.5, + "load": 6.1, + "mem": 73.9, "percpu": [{"cpu_number": 0, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 23.0, + "idle": 44.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1012,14 +1015,14 @@ Get plugin stats:: "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 9.0, - "total": 77.0, - "user": 0.0}, + "system": 11.0, + "total": 56.0, + "user": 1.0}, {"cpu_number": 1, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 31.0, + "idle": 57.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1028,13 +1031,13 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 0.0, - "total": 69.0, + "total": 43.0, "user": 0.0}, {"cpu_number": 2, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 30.0, + "idle": 55.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1043,13 +1046,13 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 1.0, - "total": 70.0, + "total": 45.0, "user": 0.0}, {"cpu_number": 3, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 31.0, + "idle": 57.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1058,13 +1061,148 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 0.0, - "total": 69.0, + "total": 43.0, "user": 0.0}, {"cpu_number": 4, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 30.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": 17.0, + "total": 65.0, + "user": 2.0}, + {"cpu_number": 5, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 57.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": 43.0, + "user": 0.0}, + {"cpu_number": 6, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 39.0, + "interrupt": None, + "iowait": 2.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 6.0, + "total": 61.0, + "user": 10.0}, + {"cpu_number": 7, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 56.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": 44.0, + "user": 1.0}, + {"cpu_number": 8, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 55.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": 45.0, + "user": 0.0}, + {"cpu_number": 9, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 57.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": 43.0, + "user": 0.0}, + {"cpu_number": 10, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 55.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": 45.0, + "user": 1.0}, + {"cpu_number": 11, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 57.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": 43.0, + "user": 0.0}, + {"cpu_number": 12, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 56.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": 44.0, + "user": 1.0}, + {"cpu_number": 13, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 56.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1073,148 +1211,13 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 1.0, - "total": 70.0, + "total": 44.0, "user": 1.0}, - {"cpu_number": 5, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 31.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": 69.0, - "user": 0.0}, - {"cpu_number": 6, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.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": 5.0, - "total": 82.0, - "user": 7.0}, - {"cpu_number": 7, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 25.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 4.0, - "total": 75.0, - "user": 0.0}, - {"cpu_number": 8, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 31.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": 69.0, - "user": 0.0}, - {"cpu_number": 9, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 32.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": 68.0, - "user": 0.0}, - {"cpu_number": 10, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 31.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": 69.0, - "user": 0.0}, - {"cpu_number": 11, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 32.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": 68.0, - "user": 0.0}, - {"cpu_number": 12, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 31.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": 69.0, - "user": 0.0}, - {"cpu_number": 13, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 30.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": 70.0, - "user": 0.0}, {"cpu_number": 14, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 31.0, + "idle": 56.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1223,13 +1226,13 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 0.0, - "total": 69.0, - "user": 0.0}, + "total": 44.0, + "user": 1.0}, {"cpu_number": 15, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 31.0, + "idle": 57.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1238,9 +1241,9 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 0.0, - "total": 69.0, - "user": 0.0}], - "swap": 96.8} + "total": 43.0, + "user": 1.0}], + "swap": 90.5} Fields descriptions: @@ -1278,14 +1281,14 @@ Get plugin stats:: "label": "Ambient", "type": "temperature_core", "unit": "C", - "value": 39, + "value": 28, "warning": 0}, {"critical": None, "key": "label", "label": "Ambient 3", "type": "temperature_core", "unit": "C", - "value": 30, + "value": 24, "warning": 0}] Fields descriptions: @@ -1348,7 +1351,7 @@ Get a specific item when field matches the given value:: "label": "Ambient", "type": "temperature_core", "unit": "C", - "value": 39, + "value": 28, "warning": 0}]} GET smart @@ -1392,7 +1395,7 @@ GET uptime Get plugin stats:: # curl http://localhost:61208/api/4/uptime - "6 days, 1:42:32" + "6 days, 16:25:35" GET version ----------- @@ -1437,8 +1440,8 @@ Get plugin stats:: # curl http://localhost:61208/api/4/wifi [{"key": "ssid", - "quality_level": -63.0, - "quality_link": 47.0, + "quality_level": -45.0, + "quality_link": 65.0, "ssid": "wlp0s20f3"}] Get a specific field:: @@ -1450,8 +1453,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": -63.0, - "quality_link": 47.0, + "quality_level": -45.0, + "quality_link": 65.0, "ssid": "wlp0s20f3"}]} GET all stats @@ -1515,34 +1518,34 @@ GET stats history History of a plugin:: # curl http://localhost:61208/api/4/cpu/history - {"system": [["2026-01-02T17:08:17.918197+00:00", 3.2], - ["2026-01-02T17:08:18.983838+00:00", 0.7], - ["2026-01-02T17:08:20.017602+00:00", 0.7]], - "user": [["2026-01-02T17:08:17.918194+00:00", 3.3], - ["2026-01-02T17:08:18.983836+00:00", 1.0], - ["2026-01-02T17:08:20.017601+00:00", 1.0]]} + {"system": [["2026-01-03T07:51:20.098856+00:00", 3.0], + ["2026-01-03T07:51:21.202435+00:00", 1.0], + ["2026-01-03T07:51:22.255718+00:00", 1.0]], + "user": [["2026-01-03T07:51:20.098853+00:00", 3.4], + ["2026-01-03T07:51:21.202432+00:00", 1.1], + ["2026-01-03T07:51:22.255716+00:00", 1.1]]} Limit history to last 2 values:: # curl http://localhost:61208/api/4/cpu/history/2 - {"system": [["2026-01-02T17:08:18.983838+00:00", 0.7], - ["2026-01-02T17:08:20.017602+00:00", 0.7]], - "user": [["2026-01-02T17:08:18.983836+00:00", 1.0], - ["2026-01-02T17:08:20.017601+00:00", 1.0]]} + {"system": [["2026-01-03T07:51:21.202435+00:00", 1.0], + ["2026-01-03T07:51:22.255718+00:00", 1.0]], + "user": [["2026-01-03T07:51:21.202432+00:00", 1.1], + ["2026-01-03T07:51:22.255716+00:00", 1.1]]} History for a specific field:: # curl http://localhost:61208/api/4/cpu/system/history - {"system": [["2026-01-02T17:08:16.718390+00:00", 3.2], - ["2026-01-02T17:08:17.918197+00:00", 3.2], - ["2026-01-02T17:08:18.983838+00:00", 0.7], - ["2026-01-02T17:08:20.017602+00:00", 0.7]]} + {"system": [["2026-01-03T07:51:18.831780+00:00", 3.0], + ["2026-01-03T07:51:20.098856+00:00", 3.0], + ["2026-01-03T07:51:21.202435+00:00", 1.0], + ["2026-01-03T07:51:22.255718+00:00", 1.0]]} Limit history for a specific field to last 2 values:: # curl http://localhost:61208/api/4/cpu/system/history - {"system": [["2026-01-02T17:08:18.983838+00:00", 0.7], - ["2026-01-02T17:08:20.017602+00:00", 0.7]]} + {"system": [["2026-01-03T07:51:21.202435+00:00", 1.0], + ["2026-01-03T07:51:22.255718+00:00", 1.0]]} GET limits (used for thresholds) -------------------------------- diff --git a/docs/man/glances.1 b/docs/man/glances.1 index c5e7b97d..503dcb97 100644 --- a/docs/man/glances.1 +++ b/docs/man/glances.1 @@ -28,7 +28,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 02, 2026" "4.4.2_dev1" "Glances" +.TH "GLANCES" "1" "Jan 03, 2026" "4.4.2_dev1" "Glances" .SH NAME glances \- An eye on your system .SH SYNOPSIS diff --git a/glances/outputs/static/public/glances.js b/glances/outputs/static/public/glances.js index e305b2e9f9d77e252381974fccd908231d84df04..638304a0b39514f762eac5bfd171b8a251c1877a 100644 GIT binary patch delta 11031 zcmcgydw5huvi~w?9^DWEAqh!HfXtAD8F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ct$9M)??=<} zc)=cRNaPqz8Mf~hI)(SRLk?G+%UjL+XsvO{ymrXc6UWe}xLyv8qr8VLw7OzE<-LDV z7LUQbv3=v|@OFY#ovS*GJYUt@PoOs%*wD%1-M(uw{atkNv?(GSR80}GZ=6DJ0p{Z= z;<4o%Gc$!HgqnUDzz-_CSICQx$xVoWt6rZpmA=cbGJCps)Fw_BZ^x$Tw9n5o_^DjL zbJOWbQ16(*?N5Jy2Ce7jIMGF?0X*Xp`fK{BRxmip@+kw<>+5y_9ELYM;5)y~X=Kj4XP-W)=xNnt;hAy0Y_zb-{5g6vVJ;L~hHr7-QsE9ry$nugAyF93*Z>M&Ql*3ET>(O(BusB>uu z=X-H3eJL?XIN_YIEvPKSe;wxaX^b@RmfuF#gG=h|v;?63c5(H+?x52#T6%|={OArk z10&~BS_80SDcub)a~aRS^wY~|1{da=<$NnPcZJC7&#a(T7!|IhM`D|uAAL2p{sGjT vnXBj&V1?l8SBd=f@l|vHxLsI9jr^)Vx=Y;F;MKGqqvuvr-fz0Hnr{1V9k=i7 diff --git a/glances/plugins/smart/__init__.py b/glances/plugins/smart/__init__.py index 5fe46ca1..d75180a7 100644 --- a/glances/plugins/smart/__init__.py +++ b/glances/plugins/smart/__init__.py @@ -2,6 +2,7 @@ # This file is part of Glances. # # Copyright (C) 2018 Tim Nibert +# Copyright (C) 2026 Github@Drake7707 # # SPDX-License-Identifier: LGPL-3.0-only # @@ -91,7 +92,8 @@ NVME_ATTRIBUTE_LABELS = { "tests": "Self-tests", } -def convert_nvme_attribute_to_dict(key,value): + +def convert_nvme_attribute_to_dict(key, value): label = NVME_ATTRIBUTE_LABELS.get(key, key) return { @@ -104,9 +106,10 @@ def convert_nvme_attribute_to_dict(key,value): 'threshold': None, 'type': None, 'updated': None, - 'when_failed': None + 'when_failed': None, } + def get_smart_data(hide_attributes): """ Get SMART attribute data @@ -165,16 +168,18 @@ def get_smart_data(hide_attributes): if isinstance(dev.if_attributes, NvmeAttributes): idx = 0 for attr in dev.if_attributes.__dict__.keys(): - idx +=1 + idx += 1 - attrib_dict = convert_nvme_attribute_to_dict(attr, dev.if_attributes.__dict__[attr]) + attrib_dict = convert_nvme_attribute_to_dict(attr, dev.if_attributes.__dict__[attr]) if attrib_dict['name'] in hide_attributes: pass else: try: - if dev.if_attributes.__dict__[attr] is not None: # make sure the value is serializable to prevent errors in rendering - serialized = str(dev.if_attributes.__dict__[attr]) - except Exception as e: + if ( + dev.if_attributes.__dict__[attr] is not None + ): # make sure the value is serializable to prevent errors in rendering + str(dev.if_attributes.__dict__[attr]) + except Exception: logger.debug(f'Unable to serialize attribute {attr} from NVME') attrib_dict['value'] = None attrib_dict['raw'] = None @@ -217,7 +222,7 @@ class SmartPlugin(GlancesPluginModel): @hide_attributes.setter def hide_attributes(self, attr_list): """Set hide_attributes list""" - self._hide_attributes = [i for i in attr_list] + self._hide_attributes = list(attr_list) @GlancesPluginModel._check_decorator @GlancesPluginModel._log_result_decorator @@ -283,14 +288,20 @@ class SmartPlugin(GlancesPluginModel): ret.append(self.curse_add_line(msg)) try: raw = device_stat[smart_stat]['raw'] - if device_stat[smart_stat]['key'] in ["bytesWritten", "bytesRead", "dataUnitsRead", "dataUnitsWritten", "hostReadCommands", "hostWriteCommands" ]: + if device_stat[smart_stat]['key'] in [ + "bytesWritten", + "bytesRead", + "dataUnitsRead", + "dataUnitsWritten", + "hostReadCommands", + "hostWriteCommands", + ]: msg = '{:>8}'.format("" if raw is None else self.auto_unit(raw)) - else: + else: msg = '{:>8}'.format("" if raw is None else str(raw)) ret.append(self.curse_add_line(msg)) - except Exception as e: + except Exception: logger.debug(f"Failed to serialize {smart_stat}") - meg = "" - ret.append(self.curse_add_line(msg)) + ret.append(self.curse_add_line("")) return ret