version 4.5.3

This commit is contained in:
nicolargo
2026-03-29 16:56:27 +02:00
parent aefe4311a4
commit b4c963e173
6 changed files with 605 additions and 560 deletions

View File

@@ -22,25 +22,25 @@ use the following code:
>>> gl = api.GlancesAPI()
>>> gl.cpu
{'cpucore': 16,
'ctx_switches': 243303224,
'ctx_switches': 321598828,
'guest': 0.0,
'idle': 93.7,
'interrupts': 154611274,
'iowait': 0.5,
'idle': 92.2,
'interrupts': 197800248,
'iowait': 0.3,
'irq': 0.0,
'nice': 0.0,
'soft_interrupts': 77164490,
'soft_interrupts': 101446182,
'steal': 0.0,
'syscalls': 0,
'system': 4.5,
'total': 6.6,
'user': 1.3}
'system': 5.1,
'total': 15.7,
'user': 2.4}
>>> gl.cpu.get("total")
6.6
15.7
>>> gl.mem.get("used")
9505160200
9229208584
>>> gl.auto_unit(gl.mem.get("used"))
8.85G
8.60G
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': 213,
'bytes_all_gauge': 3211808170,
'bytes_all_rate_per_sec': 814.0,
'bytes_recv': 127,
'bytes_recv_gauge': 2962068239,
'bytes_recv_rate_per_sec': 485.0,
'bytes_sent': 86,
'bytes_sent_gauge': 249739931,
'bytes_sent_rate_per_sec': 328.0,
'bytes_all': 0,
'bytes_all_gauge': 4752368171,
'bytes_all_rate_per_sec': 0.0,
'bytes_recv': 0,
'bytes_recv_gauge': 4387358888,
'bytes_recv_rate_per_sec': 0.0,
'bytes_sent': 0,
'bytes_sent_gauge': 365009283,
'bytes_sent_rate_per_sec': 0.0,
'interface_name': 'wlp0s20f3',
'key': 'interface_name',
'speed': 0,
'time_since_update': 0.26142072677612305}
'time_since_update': 0.26566219329833984}
Init Glances Python API
-----------------------
@@ -136,7 +136,7 @@ Ports stats:
'port': 0,
'refresh': 30,
'rtt_warning': None,
'status': 0.006909,
'status': 0.008506,
'timeout': 3}]
Ports fields description:
@@ -177,14 +177,14 @@ Diskio stats:
>>> gl.diskio.get("nvme0n1")
{'disk_name': 'nvme0n1',
'key': 'disk_name',
'read_bytes': 17840342016,
'read_count': 1309907,
'read_bytes': 20552676352,
'read_count': 1435818,
'read_latency': 0,
'read_time': 233357,
'write_bytes': 155518546944,
'write_count': 2652504,
'read_time': 269919,
'write_bytes': 164608914432,
'write_count': 3340198,
'write_latency': 0,
'write_time': 7443359}
'write_time': 7949769}
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': '6 days'}
'uptime': 'a week'}
Containers fields description:
@@ -295,11 +295,11 @@ Processcount stats:
>>> type(gl.processcount)
<class 'glances.plugins.processcount.ProcesscountPlugin'>
>>> gl.processcount
{'pid_max': 0, 'running': 1, 'sleeping': 423, 'thread': 2109, 'total': 575}
{'pid_max': 0, 'running': 1, 'sleeping': 425, 'thread': 2171, 'total': 570}
>>> gl.processcount.keys()
['total', 'running', 'sleeping', 'thread', 'pid_max']
>>> gl.processcount.get("total")
575
570
Processcount fields description:
@@ -384,15 +384,15 @@ Percpu stats:
'guest_nice': 0.0,
'idle': 28.0,
'interrupt': None,
'iowait': 0.0,
'iowait': 1.0,
'irq': 0.0,
'key': 'cpu_number',
'nice': 0.0,
'softirq': 1.0,
'softirq': 0.0,
'steal': 0.0,
'system': 7.0,
'system': 13.0,
'total': 72.0,
'user': 0.0}
'user': 2.0}
Percpu fields description:
@@ -482,18 +482,18 @@ Network stats:
>>> gl.network.get("wlp0s20f3")
{'alias': None,
'bytes_all': 0,
'bytes_all_gauge': 3211808170,
'bytes_all_gauge': 4752368171,
'bytes_all_rate_per_sec': 0.0,
'bytes_recv': 0,
'bytes_recv_gauge': 2962068239,
'bytes_recv_gauge': 4387358888,
'bytes_recv_rate_per_sec': 0.0,
'bytes_sent': 0,
'bytes_sent_gauge': 249739931,
'bytes_sent_gauge': 365009283,
'bytes_sent_rate_per_sec': 0.0,
'interface_name': 'wlp0s20f3',
'key': 'interface_name',
'speed': 0,
'time_since_update': 0.0017037391662597656}
'time_since_update': 0.007162809371948242}
Network fields description:
@@ -534,23 +534,23 @@ Cpu stats:
<class 'glances.plugins.cpu.CpuPlugin'>
>>> gl.cpu
{'cpucore': 16,
'ctx_switches': 243303224,
'ctx_switches': 321598828,
'guest': 0.0,
'idle': 93.7,
'interrupts': 154611274,
'iowait': 0.5,
'idle': 92.2,
'interrupts': 197800248,
'iowait': 0.3,
'irq': 0.0,
'nice': 0.0,
'soft_interrupts': 77164490,
'soft_interrupts': 101446182,
'steal': 0.0,
'syscalls': 0,
'system': 4.5,
'total': 6.6,
'user': 1.3}
'system': 5.1,
'total': 15.7,
'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.6
15.7
Cpu fields description:
@@ -625,7 +625,7 @@ Amps stats:
'refresh': 3.0,
'regex': True,
'result': None,
'timer': 0.2228853702545166}
'timer': 0.2458481788635254}
Amps fields description:
@@ -656,37 +656,37 @@ Processlist stats:
>>> gl.processlist
Return a dict of dict with key=<pid>
>>> gl.processlist.keys()
[385697, 129, 378730, 373795, 351708, 377656, 384437, 3832, 374655, 8146, 9348, 9777, 8946, 9350, 373717, 5858, 375222, 9589, 7381, 9755, 373629, 8626, 375119, 356061, 6590, 373810, 373760, 373811, 348634, 350733, 8636, 373897, 180309, 374948, 374224, 382233, 383364, 373672, 374527, 8005, 374523, 374441, 374519, 374535, 373632, 373631, 30393, 9338, 6075, 952, 385694, 6280, 383817, 17796, 8567, 7814, 5990, 8047, 6588, 374665, 7658, 8017, 8563, 6063, 6319, 5563, 3515, 6039, 6032, 6003, 6620, 6065, 6196, 3227, 6719, 235363, 3506, 6023, 5982, 6029, 6487, 3114, 5561, 8041, 3147, 1, 5557, 5823, 3105, 6572, 30308, 3152, 5679, 3153, 65842, 5538, 6020, 65862, 2943, 6237, 6223, 6057, 3550, 8727, 235309, 5501, 6026, 3228, 3343, 6046, 3261, 5564, 3838, 4714, 3614, 312376, 312367, 6549, 36986, 3891, 6064, 4715, 6099, 6028, 3138, 3128, 5628, 5813, 3110, 3344, 6199, 992, 6378, 6060, 3100, 6489, 5857, 2944, 6359, 5820, 6234, 3139, 5963, 3134, 6050, 2942, 5575, 6325, 6204, 6021, 180319, 6385, 6185, 374243, 6053, 5632, 5797, 373919, 5663, 3099, 374270, 3246, 5991, 225420, 6322, 349509, 3121, 11946, 5798, 5558, 5871, 3098, 2941, 3104, 4153, 65789, 65805, 65811, 65774, 65781, 65798, 373646, 5545, 2955, 3131, 385690, 3839, 3852, 3864, 5639, 8378, 3850, 3846, 379604, 385693, 3690, 3491, 3489, 2952, 3222, 4401, 3691, 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, 1019, 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, 285886, 287801, 314927, 322268, 329592, 329723, 337448, 338168, 340660, 344745, 349377, 349380, 349387, 350237, 352114, 354865, 356271, 357412, 358094, 358548, 358598, 358980, 359487, 361118, 361264, 363908, 364362, 364363, 364654, 365357, 366924, 367569, 371424, 372892, 375395, 377178, 377560, 377597, 378615, 378912, 379083, 379222, 379236, 379384, 379489, 379674, 379830, 380678, 381626, 381879, 382126, 382127, 382128, 382274, 382377, 382474, 382550, 382590, 383419, 383420, 383868, 383875, 383878, 384184, 385008]
>>> gl.processlist.get("385697")
[488460, 5858, 8146, 129, 374655, 373717, 9755, 3515, 8946, 9348, 373795, 351708, 9777, 436891, 479846, 9589, 419820, 8626, 375222, 419669, 3832, 373629, 180309, 6590, 7381, 373810, 375119, 348634, 377656, 373760, 356061, 373811, 485315, 374948, 373897, 485463, 8636, 488280, 486073, 374224, 374527, 469793, 8005, 373672, 488414, 30393, 952, 6075, 9338, 7814, 373632, 6280, 373631, 8567, 17796, 8047, 5990, 6588, 7658, 8017, 374441, 6063, 8563, 6319, 5563, 6032, 6003, 6039, 6620, 374519, 374535, 374665, 6065, 6196, 3227, 6719, 374523, 235363, 6487, 6029, 3114, 6023, 5982, 5561, 3147, 8041, 5823, 1, 3506, 3105, 6572, 5557, 30308, 5679, 3152, 3153, 6020, 65862, 5538, 2943, 6237, 5501, 6057, 6223, 6026, 235309, 3228, 3550, 3261, 3343, 5564, 6046, 3838, 8727, 3614, 312376, 6549, 312367, 36986, 3891, 6064, 6099, 6028, 3138, 3128, 5628, 5813, 3344, 992, 3110, 6199, 6378, 3100, 6489, 5857, 6359, 2944, 6060, 5820, 6234, 4714, 3139, 4715, 5963, 180319, 3134, 6050, 2942, 6204, 6021, 5575, 6385, 6325, 6185, 6053, 65842, 5632, 5797, 5663, 3099, 3246, 5991, 6322, 11946, 3121, 468274, 5798, 5558, 225420, 5871, 3098, 373919, 2941, 374270, 3104, 4153, 2955, 3131, 488410, 5545, 3839, 3852, 3864, 373646, 476214, 5639, 3850, 3846, 488413, 65789, 65805, 65774, 65781, 65811, 65798, 3690, 3489, 8378, 3491, 2952, 3222, 4401, 3691, 374243, 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, 1019, 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, 356271, 391714, 402956, 418346, 430242, 434818, 434954, 436126, 439688, 452462, 455764, 456495, 458270, 458931, 459136, 459781, 461161, 466905, 467743, 467973, 468146, 468148, 468151, 468155, 468158, 468162, 468172, 468718, 473514, 473600, 474829, 477205, 478595, 479470, 479833, 479985, 480018, 480332, 480456, 480587, 480600, 480702, 480711, 480987, 481513, 482612, 482783, 483909, 484637, 486272, 486313, 486354, 487602, 487676, 487689, 488001, 488002, 488003]
>>> gl.processlist.get("488460")
{'cmdline': ['/home/nicolargo/dev/glances/.venv/bin/python3',
'-m',
'glances',
'-C',
'conf/glances.conf',
'--api-doc'],
'cpu_percent': 73.0,
'cpu_times': {'children_system': 0.01,
'cpu_percent': 78.2,
'cpu_times': {'children_system': 0.02,
'children_user': 0.0,
'iowait': 0.0,
'system': 0.41,
'system': 0.47,
'user': 0.51},
'gids': {'effective': 1000, 'real': 1000, 'saved': 1000},
'io_counters': [7385088, 1437696, 7385088, 1437696, 1],
'io_counters': [4096, 651264, 4096, 651264, 1],
'key': 'pid',
'memory_info': {'data': 125956096,
'memory_info': {'data': 125001728,
'dirty': 0,
'lib': 0,
'rss': 96505856,
'shared': 24129536,
'rss': 96014336,
'shared': 23875584,
'text': 31211520,
'vms': 586440704},
'memory_percent': 0.5876897688451838,
'vms': 585486336},
'memory_percent': 0.5846965693943361,
'name': 'python3',
'nice': 0,
'num_threads': 5,
'pid': 385697,
'pid': 488460,
'status': 'R',
'time_since_update': 0.5110287666320801,
'time_since_update': 0.5573058128356934,
'username': 'nicolargo'}
Processlist fields description:
@@ -772,14 +772,11 @@ Load stats:
>>> type(gl.load)
<class 'glances.plugins.load.LoadPlugin'>
>>> gl.load
{'cpucore': 16,
'min1': 1.32421875,
'min15': 1.05224609375,
'min5': 1.3134765625}
{'cpucore': 16, 'min1': 1.5517578125, 'min15': 1.28125, 'min5': 1.3681640625}
>>> gl.load.keys()
['min1', 'min5', 'min15', 'cpucore']
>>> gl.load.get("min1")
1.32421875
1.5517578125
Load fields description:
@@ -821,7 +818,7 @@ Sensors stats:
'label': 'Ambient',
'type': 'temperature_core',
'unit': 'C',
'value': 36,
'value': 37,
'warning': 0}
Sensors fields description:
@@ -859,7 +856,7 @@ Uptime stats:
>>> type(gl.uptime)
<class 'glances.plugins.uptime.UptimePlugin'>
>>> gl.uptime
'6 days, 23:52:27'
'8 days, 6:42:20'
Uptime limits:
@@ -878,11 +875,11 @@ Now stats:
>>> type(gl.now)
<class 'glances.plugins.now.NowPlugin'>
>>> gl.now
{'custom': '2026-03-28 09:53:33 CET', 'iso': '2026-03-28T09:53:33+01:00'}
{'custom': '2026-03-29 16:43:28 CEST', 'iso': '2026-03-29T16:43:28+02:00'}
>>> gl.now.keys()
['iso', 'custom']
>>> gl.now.get("iso")
'2026-03-28T09:53:33+01:00'
'2026-03-29T16:43:28+02:00'
Now fields description:
@@ -911,14 +908,14 @@ Fs stats:
['/', '/zsfpool']
>>> gl.fs.get("/")
{'device_name': '/dev/mapper/ubuntu--vg-ubuntu--lv',
'free': 552435404800,
'free': 549467508736,
'fs_type': 'ext4',
'key': 'mnt_point',
'mnt_point': '/',
'options': 'rw,relatime',
'percent': 42.0,
'percent': 42.3,
'size': 1003736440832,
'used': 400238530560}
'used': 403206426624}
Fs fields description:
@@ -940,6 +937,7 @@ Fs limits:
'fs_critical': 90.0,
'fs_disable': ['False'],
'fs_hide': ['/boot.*', '.*/snap.*'],
'fs_refresh': 60.0,
'fs_warning': 70.0,
'history_size': 1200.0}
@@ -958,8 +956,8 @@ Wifi stats:
['wlp0s20f3']
>>> gl.wifi.get("wlp0s20f3")
{'key': 'ssid',
'quality_level': -56.0,
'quality_link': 54.0,
'quality_level': -58.0,
'quality_link': 52.0,
'ssid': 'wlp0s20f3'}
Wifi limits:
@@ -1009,7 +1007,8 @@ Ip limits:
'ip_public_disabled': ['True'],
'ip_public_field': ['ip'],
'ip_public_refresh_interval': 300.0,
'ip_public_template': ['{continent_name}/{country_name}/{city_name}']}
'ip_public_template': ['{continent_name}/{country_name}/{city_name}'],
'ip_refresh': 60.0}
Glances version
---------------
@@ -1021,7 +1020,7 @@ Version stats:
>>> type(gl.version)
<class 'glances.plugins.version.VersionPlugin'>
>>> gl.version
'4.5.3_dev01'
'4.5.3'
Version limits:
@@ -1087,19 +1086,19 @@ Mem stats:
>>> type(gl.mem)
<class 'glances.plugins.mem.MemPlugin'>
>>> gl.mem
{'active': 5328371712,
'available': 6916064248,
'buffers': 179658752,
'cached': 6772044792,
'free': 1708998656,
'inactive': 6534033408,
'percent': 57.9,
'percent_max': 57.9,
'percent_mean': 57.9,
'percent_min': 57.9,
'shared': 1693700096,
{'active': 4727713792,
'available': 7192015864,
'buffers': 222310400,
'cached': 7393575928,
'free': 1201221632,
'inactive': 7474388992,
'percent': 56.2,
'percent_max': 56.2,
'percent_mean': 56.2,
'percent_min': 56.2,
'shared': 1809559552,
'total': 16421224448,
'used': 9505160200}
'used': 9229208584}
>>> gl.mem.keys()
['total', 'available', 'percent', 'used', 'free', 'active', 'inactive', 'buffers', 'cached', 'shared', 'percent_min', 'percent_max', 'percent_mean']
>>> gl.mem.get("total")
@@ -1160,7 +1159,7 @@ Folders limits:
.. code-block:: python
>>> gl.folders.limits
{'folders_disable': ['False'], 'history_size': 1200.0}
{'folders_disable': ['False'], 'folders_refresh': 60.0, 'history_size': 1200.0}
Glances quicklook
-----------------
@@ -1172,15 +1171,90 @@ Quicklook stats:
>>> type(gl.quicklook)
<class 'glances.plugins.quicklook.QuicklookPlugin'>
>>> gl.quicklook
{'cpu': 6.6,
{'cpu': 15.7,
'cpu_hz': 4475000000.0,
'cpu_hz_current': 833418000.0,
'cpu_hz_current': 610819562.5000001,
'cpu_log_core': 16,
'cpu_name': '13th Gen Intel(R) Core(TM) i7-13620H',
'cpu_phys_core': 10,
'load': 6.6,
'mem': 57.9,
'load': 8.0,
'mem': 56.2,
'percpu': [{'cpu_number': 0,
'dpc': None,
'guest': 0.0,
'guest_nice': 0.0,
'idle': 28.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': 72.0,
'user': 2.0},
{'cpu_number': 1,
'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': 2.0,
'total': 66.0,
'user': 5.0},
{'cpu_number': 2,
'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': 2.0,
'total': 67.0,
'user': 6.0},
{'cpu_number': 3,
'dpc': None,
'guest': 0.0,
'guest_nice': 0.0,
'idle': 41.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': 59.0,
'user': 1.0},
{'cpu_number': 4,
'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': 4.0,
'total': 66.0,
'user': 2.0},
{'cpu_number': 5,
'dpc': None,
'guest': 0.0,
'guest_nice': 0.0,
@@ -1190,12 +1264,42 @@ Quicklook stats:
'irq': 0.0,
'key': 'cpu_number',
'nice': 0.0,
'softirq': 1.0,
'softirq': 0.0,
'steal': 0.0,
'system': 7.0,
'system': 4.0,
'total': 72.0,
'user': 0.0},
{'cpu_number': 1,
'user': 7.0},
{'cpu_number': 6,
'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': 5.0},
{'cpu_number': 7,
'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': 2.0,
'total': 69.0,
'user': 7.0},
{'cpu_number': 8,
'dpc': None,
'guest': 0.0,
'guest_nice': 0.0,
@@ -1207,10 +1311,25 @@ Quicklook stats:
'nice': 0.0,
'softirq': 0.0,
'steal': 0.0,
'system': 0.0,
'system': 1.0,
'total': 62.0,
'user': 0.0},
{'cpu_number': 2,
'user': 1.0},
{'cpu_number': 9,
'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': 6.0},
{'cpu_number': 10,
'dpc': None,
'guest': 0.0,
'guest_nice': 0.0,
@@ -1224,147 +1343,27 @@ Quicklook stats:
'steal': 0.0,
'system': 1.0,
'total': 63.0,
'user': 0.0},
{'cpu_number': 3,
'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': 0.0,
'total': 62.0,
'user': 0.0},
{'cpu_number': 4,
'user': 3.0},
{'cpu_number': 11,
'dpc': None,
'guest': 0.0,
'guest_nice': 0.0,
'idle': 33.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': 1.0,
'system': 0.0,
'total': 67.0,
'user': 2.0},
{'cpu_number': 5,
'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': 6.0},
{'cpu_number': 6,
'dpc': None,
'guest': 0.0,
'guest_nice': 0.0,
'idle': 19.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': 81.0,
'user': 7.0},
{'cpu_number': 7,
'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': 0.0,
'total': 62.0,
'user': 0.0},
{'cpu_number': 8,
'dpc': None,
'guest': 0.0,
'guest_nice': 0.0,
'idle': 37.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': 63.0,
'user': 0.0},
{'cpu_number': 9,
'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': 0.0},
{'cpu_number': 10,
'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': 0.0,
'total': 62.0,
'user': 1.0},
{'cpu_number': 11,
'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': 0.0},
{'cpu_number': 12,
'dpc': None,
'guest': 0.0,
'guest_nice': 0.0,
'idle': 38.0,
'idle': 40.0,
'interrupt': None,
'iowait': 0.0,
'irq': 0.0,
@@ -1373,13 +1372,13 @@ Quicklook stats:
'softirq': 0.0,
'steal': 0.0,
'system': 0.0,
'total': 62.0,
'user': 0.0},
'total': 60.0,
'user': 2.0},
{'cpu_number': 13,
'dpc': None,
'guest': 0.0,
'guest_nice': 0.0,
'idle': 38.0,
'idle': 36.0,
'interrupt': None,
'iowait': 0.0,
'irq': 0.0,
@@ -1388,28 +1387,13 @@ Quicklook stats:
'softirq': 0.0,
'steal': 0.0,
'system': 1.0,
'total': 62.0,
'user': 1.0},
'total': 64.0,
'user': 4.0},
{'cpu_number': 14,
'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': 1.0,
'total': 62.0,
'user': 1.0},
{'cpu_number': 15,
'dpc': None,
'guest': 0.0,
'guest_nice': 0.0,
'idle': 38.0,
'idle': 33.0,
'interrupt': None,
'iowait': 0.0,
'irq': 0.0,
@@ -1418,9 +1402,24 @@ Quicklook stats:
'softirq': 0.0,
'steal': 0.0,
'system': 0.0,
'total': 62.0,
'user': 0.0}],
'swap': 17.9}
'total': 67.0,
'user': 8.0},
{'cpu_number': 15,
'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': 1.0,
'total': 65.0,
'user': 5.0}],
'swap': 49.7}
>>> 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")
@@ -1470,13 +1469,13 @@ Memswap stats:
>>> type(gl.memswap)
<class 'glances.plugins.memswap.MemswapPlugin'>
>>> gl.memswap
{'free': 3525652480,
'percent': 17.9,
'sin': 2563125248,
'sout': 5832904704,
'time_since_update': 0.509479284286499,
{'free': 2161762304,
'percent': 49.7,
'sin': 2678214656,
'sout': 7223398400,
'time_since_update': 0.5304923057556152,
'total': 4294963200,
'used': 769310720}
'used': 2133200896}
>>> gl.memswap.keys()
['total', 'used', 'free', 'percent', 'sin', 'sout', 'time_since_update']
>>> gl.memswap.get("total")
@@ -1511,10 +1510,10 @@ Use auto_unit() function to generate a human-readable string with the unit:
.. code-block:: python
>>> gl.mem.get("used")
9505160200
9229208584
>>> gl.auto_unit(gl.mem.get("used"))
8.85G
8.60G
Args:
@@ -1570,7 +1569,7 @@ Use top_process() function to generate a list of top processes sorted by CPU or
.. code-block:: python
>>> gl.top_process()
[{'memory_percent': 2.4278090179113057, 'nice': 0, 'num_threads': 17, 'status': 'S', 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'name': 'claude', 'cpu_times': {'user': 39.7, 'system': 12.64, 'children_user': 3.82, 'children_system': 1.51, 'iowait': 0.0}, 'memory_info': {'rss': 398675968, 'vms': 76571418624, 'shared': 157614080, 'text': 60248064, 'lib': 0, 'data': 74709008384, 'dirty': 0}, 'cpu_percent': 4.0, 'pid': 378730, 'io_counters': [57704448, 2252800, 57704448, 2252800, 1], 'key': 'pid', 'time_since_update': 0.5110287666320801, 'cmdline': ['claude'], 'username': 'nicolargo'}, {'memory_percent': 3.938801044027968, 'nice': 0, 'num_threads': 21, 'status': 'S', 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'name': 'code', 'cpu_times': {'user': 30.77, 'system': 8.49, 'children_user': 13.09, 'children_system': 12.21, 'iowait': 0.0}, 'memory_info': {'rss': 646799360, 'vms': 1496422998016, 'shared': 88055808, 'text': 148103168, 'lib': 0, 'data': 1814728704, 'dirty': 0}, 'cpu_percent': 2.0, 'pid': 373795, 'io_counters': [275650560, 12922880, 275650560, 12922880, 1, 5443584, 1646592, 5443584, 1646592, 1, 24916992, 102400, 24916992, 102400, 1, 970752, 0, 970752, 0, 1, 12716032, 17989632, 12716032, 17989632, 1, 0, 16384, 0, 16384, 1, 3996672, 90112, 3996672, 90112, 1, 147456, 0, 147456, 0, 1, 140288, 0, 140288, 0, 1, 0, 4096, 0, 4096, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 425984, 249856, 425984, 249856, 1, 643072, 0, 643072, 0, 1, 0, 0, 0, 0, 1], 'key': 'pid', 'time_since_update': 0.5110287666320801, '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=373646', '--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,2693562353041410704,5711933967744426477,262144', '--enable-features=DocumentPolicyIncludeJSCallStacksInCrashReports,EarlyEstablishGpuChannel,EstablishGpuChannelAsync', '--disable-features=CalculateNativeWinOcclusion,LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation', '--variations-seed-version', '--trace-process-track-uuid=3190708993808206286'], 'username': 'nicolargo'}, {'memory_percent': 1.9283438028798572, 'nice': 0, 'num_threads': 30, 'status': 'S', 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'name': 'Isolated Web Co', 'cpu_times': {'user': 46.01, 'system': 5.32, 'children_user': 0.0, 'children_system': 0.0, 'iowait': 0.0}, 'memory_info': {'rss': 316657664, 'vms': 3085631488, 'shared': 118554624, 'text': 659456, 'lib': 0, 'data': 401584128, 'dirty': 0}, 'cpu_percent': 2.0, 'pid': 351708, 'io_counters': [0, 0, 0, 0, 1, 85277696, 0, 85277696, 0, 1, 230089728, 0, 230089728, 0, 1, 170254336, 0, 170254336, 0, 1, 130045952, 0, 130045952, 0, 1, 255069184, 65536, 255069184, 65536, 1, 0, 0, 0, 0, 1], 'key': 'pid', 'time_since_update': 0.5110287666320801, 'cmdline': ['/snap/firefox/7967/usr/lib/firefox/firefox', '-contentproc', '-isForBrowser', '-prefsHandle', '0:46706', '-prefMapHandle', '1:282338', '-jsInitHandle', '2:227672', '-parentBuildID', '20260309231353', '-sandboxReporter', '3', '-chrootClient', '4', '-ipcHandle', '5', '-initialChannelId', '{beef04b0-7dcc-41ca-85e0-cebe61fae5a6}', '-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', '679', 'tab'], 'username': 'nicolargo'}]
[{'status': 'S', 'name': 'gnome-shell', 'cpu_percent': 13.5, 'memory_percent': 2.3376139411257624, 'pid': 5858, 'num_threads': 39, 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'memory_info': {'rss': 383864832, 'vms': 6163394560, 'shared': 191160320, 'text': 8192, 'lib': 0, 'data': 528072704, 'dirty': 0}, 'nice': 0, 'cpu_times': {'user': 2302.79, 'system': 1221.2, 'children_user': 1579.04, 'children_system': 254.01, 'iowait': 0.0}, 'io_counters': [1172961280, 136383557632, 1172961280, 136383557632, 1], 'key': 'pid', 'time_since_update': 0.5573058128356934, 'cmdline': ['/usr/bin/gnome-shell'], 'username': 'nicolargo'}, {'status': 'S', 'name': 'firefox', 'cpu_percent': 11.6, 'memory_percent': 4.469694853293317, 'pid': 8146, 'num_threads': 129, 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'memory_info': {'rss': 733978624, 'vms': 30216454144, 'shared': 241565696, 'text': 659456, 'lib': 0, 'data': 1061355520, 'dirty': 0}, 'nice': 0, 'cpu_times': {'user': 5616.89, 'system': 1393.95, 'children_user': 0.23, 'children_system': 0.94, 'iowait': 0.0}, 'io_counters': [1782552576, 8068194304, 1782552576, 8068194304, 1], 'key': 'pid', 'time_since_update': 0.5573058128356934, 'cmdline': ['/snap/firefox/7967/usr/lib/firefox/firefox'], 'username': 'nicolargo'}, {'status': 'S', 'name': 'code', 'cpu_percent': 1.9, 'memory_percent': 5.554904257526899, 'pid': 374655, 'num_threads': 10, 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'memory_info': {'rss': 912183296, 'vms': 1498047057920, 'shared': 65511424, 'text': 148103168, 'lib': 0, 'data': 1812361216, 'dirty': 0}, 'nice': 0, 'cpu_times': {'user': 75.62, 'system': 7.03, 'children_user': 1.84, 'children_system': 0.52, 'iowait': 0.0}, 'io_counters': [72456192, 122880, 72427520, 122880, 1, 13282304, 20480, 13282304, 20480, 1, 303048704, 34656256, 303048704, 34656256, 1, 3019776, 0, 3019776, 0, 1, 40272896, 34893824, 40272896, 34893824, 1, 9336832, 90112, 9336832, 90112, 1, 118784, 36864, 118784, 36864, 1, 5451776, 1646592, 5451776, 1646592, 1, 395264, 0, 395264, 0, 1, 275456, 0, 275456, 0, 1, 333824, 0, 333824, 0, 1, 102400, 4096, 102400, 4096, 1, 4096, 0, 4096, 0, 1, 1333248, 2781184, 1333248, 2781184, 1, 732160, 0, 732160, 0, 1, 8192, 0, 8192, 0, 1], 'key': 'pid', 'time_since_update': 0.5573058128356934, '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:0cc32b1aea48ee782a41bac2d16438d55345ba9a13', '--node-ipc', '--clientProcessId=373795'], 'username': 'nicolargo'}]
Args: