diff --git a/NEWS.rst b/NEWS.rst index bbe8250b..4cc0d98a 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -2,6 +2,14 @@ Glances ChangeLog ============================================================================== +============= +Version 4.4.1 +============= + +Bug corrected: + +* Restful API issue after a while (stats are no more updated) #3333 + ============= Version 4.4.0 ============= diff --git a/docs/api/python.rst b/docs/api/python.rst index 4b891bb3..c1c122b8 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': 1319717138, + 'ctx_switches': 1518002862, 'guest': 0.0, - 'idle': 85.0, - 'interrupts': 1068778007, - 'iowait': 0.4, + 'idle': 87.3, + 'interrupts': 1219803032, + 'iowait': 4.9, 'irq': 0.0, 'nice': 0.0, - 'soft_interrupts': 460346290, + 'soft_interrupts': 529891210, 'steal': 0.0, 'syscalls': 0, - 'system': 4.4, - 'total': 14.8, - 'user': 10.0} + 'system': 4.9, + 'total': 7.2, + 'user': 2.6} >>> gl.cpu["total"] - 14.8 + 7.2 >>> gl.mem["used"] - 15361313408 + 11703642752 >>> gl.auto_unit(gl.mem["used"]) - 14.3G + 10.9G 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', 'veth33b370c', 'veth19c7711'] >>> gl.network["wlp0s20f3"] {'alias': None, - 'bytes_all': 213, - 'bytes_all_gauge': 11546480273, - 'bytes_all_rate_per_sec': 1633.0, - 'bytes_recv': 127, - 'bytes_recv_gauge': 9345920424, - 'bytes_recv_rate_per_sec': 973.0, - 'bytes_sent': 86, - 'bytes_sent_gauge': 2200559849, - 'bytes_sent_rate_per_sec': 659.0, + 'bytes_all': 0, + 'bytes_all_gauge': 13043546419, + 'bytes_all_rate_per_sec': 0.0, + 'bytes_recv': 0, + 'bytes_recv_gauge': 10650063359, + 'bytes_recv_rate_per_sec': 0.0, + 'bytes_sent': 0, + 'bytes_sent_gauge': 2393483060, + 'bytes_sent_rate_per_sec': 0.0, 'interface_name': 'wlp0s20f3', 'key': 'interface_name', 'speed': 0, - 'time_since_update': 0.13040733337402344} + 'time_since_update': 0.17118191719055176} Init Glances Python API ----------------------- @@ -95,31 +95,31 @@ Alert stats: >>> type(gl.alert) >>> gl.alert - [{'avg': 99.99752044441266, - 'begin': 1762099547, + [{'avg': 91.73630880003815, + 'begin': 1762177541, 'count': 2, 'desc': '', 'end': -1, 'global_msg': 'High swap (paging) usage', - 'max': 99.99752044441266, - 'min': 99.99752044441266, + 'max': 91.73630880003815, + 'min': 91.73630880003815, 'sort': 'memory_percent', 'state': 'CRITICAL', - 'sum': 199.99504088882532, - 'top': ['code', 'code', 'code'], + 'sum': 183.4726176000763, + 'top': ['code', 'code', 'WebExtensions'], 'type': 'MEMSWAP'}, - {'avg': 93.4872553928305, - 'begin': 1762099547, + {'avg': 71.24125901922687, + 'begin': 1762177541, 'count': 2, 'desc': '', 'end': -1, 'global_msg': 'High swap (paging) usage', - 'max': 93.53610200424492, - 'min': 93.43840878141609, + 'max': 71.26429187377946, + 'min': 71.2182261646743, 'sort': 'memory_percent', - 'state': 'CRITICAL', - 'sum': 186.974510785661, - 'top': ['code', 'code', 'code'], + 'state': 'WARNING', + 'sum': 142.48251803845375, + 'top': [], 'type': 'MEM'}] Alert fields description: @@ -161,7 +161,7 @@ Ports stats: 'port': 0, 'refresh': 30, 'rtt_warning': None, - 'status': 0.005563, + 'status': 0.006312, 'timeout': 3}] Ports fields description: @@ -202,14 +202,14 @@ Diskio stats: >>> gl.diskio["nvme0n1"] {'disk_name': 'nvme0n1', 'key': 'disk_name', - 'read_bytes': 44125751808, - 'read_count': 2503254, + 'read_bytes': 49126157824, + 'read_count': 2826082, 'read_latency': 0, - 'read_time': 880648, - 'write_bytes': 82740225024, - 'write_count': 7384791, + 'read_time': 1021898, + 'write_bytes': 97262511104, + 'write_count': 8791103, 'write_latency': 0, - 'write_time': 6938764} + 'write_time': 8005720} Diskio fields description: @@ -251,15 +251,15 @@ Containers stats: >>> gl.containers Return a dict of dict with key= >>> gl.containers.keys() - ['timescaledb-for-glances', 'prometheus-for-glances'] - >>> gl.containers["timescaledb-for-glances"] - {'command': '/docker-entrypoint.sh postgres', + ['homeassistant', 'timescaledb-for-glances', 'prometheus-for-glances'] + >>> gl.containers["homeassistant"] + {'command': '/init', 'cpu': {'total': 0.0}, 'cpu_percent': 0.0, - 'created': '2025-11-01T15:37:49.229752418Z', + 'created': '2025-11-03T09:43:31.02993333Z', 'engine': 'docker', - 'id': '7078de8bc380626c26e279a4d6d63df966c29fbc7d3a6a34ada57f8c620609b3', - 'image': ('timescale/timescaledb-ha:pg17',), + 'id': '3bf16da8d0ac1690a7a9fba938ef52d338a9e8db00a8fcba8f707d87e4886471', + 'image': ('ghcr.io/home-assistant/home-assistant:stable',), 'io': {}, 'io_rx': None, 'io_wx': None, @@ -269,13 +269,13 @@ Containers stats: 'memory_limit': None, 'memory_percent': None, 'memory_usage': None, - 'name': 'timescaledb-for-glances', + 'name': 'homeassistant', 'network': {}, 'network_rx': None, 'network_tx': None, - 'ports': '5432->5432/tcp,8008/tcp,8081/tcp', + 'ports': '', 'status': 'running', - 'uptime': 'yesterday'} + 'uptime': '4 hours'} Containers fields description: @@ -320,11 +320,11 @@ Processcount stats: >>> type(gl.processcount) >>> gl.processcount - {'pid_max': 0, 'running': 2, 'sleeping': 452, 'thread': 2627, 'total': 601} + {'pid_max': 0, 'running': 2, 'sleeping': 450, 'thread': 2474, 'total': 604} >>> gl.processcount.keys() ['total', 'running', 'sleeping', 'thread', 'pid_max'] >>> gl.processcount["total"] - 601 + 604 Processcount fields description: @@ -397,7 +397,7 @@ Percpu stats: 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 26.0, + 'idle': 25.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -405,9 +405,9 @@ Percpu stats: 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, - 'system': 5.0, - 'total': 74.0, - 'user': 2.0} + 'system': 7.0, + 'total': 75.0, + 'user': 0.0} Percpu fields description: @@ -497,18 +497,18 @@ Network stats: >>> gl.network["wlp0s20f3"] {'alias': None, 'bytes_all': 0, - 'bytes_all_gauge': 11546480273, + 'bytes_all_gauge': 13043546419, 'bytes_all_rate_per_sec': 0.0, 'bytes_recv': 0, - 'bytes_recv_gauge': 9345920424, + 'bytes_recv_gauge': 10650063359, 'bytes_recv_rate_per_sec': 0.0, 'bytes_sent': 0, - 'bytes_sent_gauge': 2200559849, + 'bytes_sent_gauge': 2393483060, 'bytes_sent_rate_per_sec': 0.0, 'interface_name': 'wlp0s20f3', 'key': 'interface_name', 'speed': 0, - 'time_since_update': 0.0015246868133544922} + 'time_since_update': 0.004456996917724609} Network fields description: @@ -549,23 +549,23 @@ Cpu stats: >>> gl.cpu {'cpucore': 16, - 'ctx_switches': 1319717138, + 'ctx_switches': 1518002862, 'guest': 0.0, - 'idle': 85.0, - 'interrupts': 1068778007, - 'iowait': 0.4, + 'idle': 87.3, + 'interrupts': 1219803032, + 'iowait': 4.9, 'irq': 0.0, 'nice': 0.0, - 'soft_interrupts': 460346290, + 'soft_interrupts': 529891210, 'steal': 0.0, 'syscalls': 0, - 'system': 4.4, - 'total': 14.8, - 'user': 10.0} + 'system': 4.9, + 'total': 7.2, + 'user': 2.6} >>> gl.cpu.keys() ['total', 'user', 'nice', 'system', 'idle', 'iowait', 'irq', 'steal', 'guest', 'ctx_switches', 'interrupts', 'soft_interrupts', 'syscalls', 'cpucore'] >>> gl.cpu["total"] - 14.8 + 7.2 Cpu fields description: @@ -637,7 +637,7 @@ Amps stats: 'refresh': 3.0, 'regex': True, 'result': None, - 'timer': 0.18061351776123047} + 'timer': 0.21608233451843262} Amps fields description: @@ -668,8 +668,8 @@ Processlist stats: >>> gl.processlist Return a dict of dict with key= >>> gl.processlist.keys() - [1211585, 1212589, 739161, 1225365, 1316902, 1209239, 1209523, 1209604, 5654, 1209619, 1224962, 1506852, 1212999, 1209632, 464283, 1209611, 1348985, 1562963, 1510111, 1287223, 1209559, 1511132, 446730, 1508741, 614914, 1213613, 1567372, 1348984, 1493680, 1562459, 739044, 739264, 1311079, 1349000, 1212055, 1600217, 1597334, 6237, 1349010, 1599237, 1599623, 1600148, 1349017, 61459, 1211584, 18544, 1350217, 739199, 1493854, 1212054, 1212053, 1600193, 1351260, 3476, 6612, 1318955, 1507790, 1493855, 6069, 1212802, 1212051, 1212316, 1209533, 739578, 1212793, 569516, 6225, 2993, 739105, 1493857, 1494015, 1210327, 1493861, 5267, 1209509, 614544, 5782, 732, 6253, 9513, 2627, 1, 5990, 1212056, 14301, 5857, 6652, 5770, 614742, 1209504, 8666, 5245, 6624, 1493658, 9878, 2953, 5950, 5811, 6285, 2719, 5262, 5265, 1350197, 739047, 5762, 5808, 2652, 5214, 6647, 5885, 7197, 6126, 2990, 5784, 614691, 5830, 688630, 6211, 5589, 14320, 1539841, 2616, 5789, 3051, 6013, 5813, 5800, 5281, 5871, 794, 5836, 5833, 3556, 2838, 5421, 5795, 2620, 5268, 3503, 5794, 688600, 6512, 2642, 20420, 2647, 6192, 5335, 234055, 1578684, 5740, 5631, 6046, 20411, 6035, 2623, 2645, 2841, 614737, 6085, 6142, 5786, 2493, 5832, 6060, 6023, 2655, 6076, 5404, 6153, 5821, 5339, 5826, 5961, 5575, 5947, 2648, 5586, 1493859, 2492, 5560, 614678, 2494, 1493858, 2653, 614728, 2615, 739046, 5561, 2791, 3487, 2720, 5646, 1493860, 614677, 14326, 5263, 11442, 1507610, 2491, 2634, 2614, 3670, 1287017, 1493635, 1350169, 1350176, 1493629, 1600187, 6654, 1211852, 2873, 14329, 3500, 3489, 3526, 1287018, 5252, 5346, 2619, 3191, 3495, 1600192, 3490, 6438, 1590773, 2875, 2874, 2718, 1209336, 739062, 3192, 1286685, 1287044, 1286689, 1211841, 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, 134, 135, 136, 137, 138, 139, 140, 142, 145, 146, 147, 148, 149, 150, 152, 155, 156, 157, 158, 165, 176, 185, 186, 211, 233, 262, 263, 264, 265, 271, 274, 275, 276, 277, 278, 279, 356, 359, 361, 362, 363, 364, 365, 452, 453, 616, 621, 622, 623, 629, 664, 665, 766, 767, 801, 977, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1039, 1240, 1241, 1256, 1266, 1267, 1268, 1269, 1270, 1271, 1331, 1334, 1475, 1481, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1934, 1935, 1936, 1938, 1939, 1940, 1941, 1943, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2058, 2059, 2060, 2061, 2062, 2063, 2064, 2066, 2068, 3390, 3522, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610, 3948, 5125, 5134, 14316, 88766, 88767, 88768, 88769, 1507298, 1507327, 1507328, 1507336, 1513897, 1516134, 1535902, 1538582, 1540654, 1549516, 1550621, 1551621, 1555035, 1558169, 1562661, 1562913, 1564652, 1566562, 1568247, 1568248, 1569970, 1570096, 1570325, 1570326, 1571698, 1574473, 1576064, 1576517, 1576826, 1576925, 1577971, 1578139, 1579065, 1579159, 1589942, 1590157, 1590158, 1590173, 1590930, 1591283, 1591413, 1592046, 1592287, 1592737, 1592919, 1592984, 1593465, 1593497, 1593732, 1593740, 1593742, 1594232, 1594931, 1597063, 1599664, 1600051] - >>> gl.processlist["1211585"] + [1608782, 1609441, 1209523, 1209239, 1209604, 1316902, 1608672, 1610135, 1631694, 1676423, 1674764, 5654, 1209619, 1224962, 1695841, 1510111, 1508741, 1209559, 1209632, 6237, 1608552, 1209611, 1608710, 464283, 1610173, 1608754, 1667892, 446730, 1287223, 1511132, 1608755, 61459, 1610075, 1608850, 1847031, 1493680, 1609327, 1609756, 1609114, 1842326, 1842637, 1844409, 1608634, 1780895, 3476, 1493854, 732, 1609326, 1609325, 6612, 1318955, 1608555, 18544, 1350217, 1608554, 1847028, 6069, 1209533, 569516, 1493855, 9513, 2993, 1738682, 6652, 1738626, 6225, 1212793, 1210327, 1609328, 1676656, 1609323, 1493857, 1494015, 5267, 1493861, 5990, 1209509, 1676307, 5782, 2627, 6253, 1, 5857, 5770, 8666, 5762, 5245, 1209504, 7197, 14301, 6624, 2719, 9878, 2953, 5811, 5950, 6647, 1493658, 6285, 1350197, 2652, 5808, 5262, 5265, 5214, 6126, 5268, 6211, 1808423, 5885, 2720, 794, 1684044, 5830, 6512, 2990, 5784, 5589, 3051, 688630, 2838, 5281, 2616, 6013, 5795, 5836, 1841210, 5813, 5800, 5789, 1738862, 5871, 6192, 2493, 5421, 5833, 3556, 1752388, 2620, 20411, 3503, 234055, 2623, 6046, 2642, 688600, 2647, 5794, 1618848, 5740, 5631, 20420, 5335, 6085, 2645, 2841, 6142, 6060, 5786, 6035, 6153, 5832, 6023, 2655, 5404, 5821, 6076, 2494, 5826, 5961, 14320, 2615, 5575, 5947, 5339, 2648, 5586, 2492, 5560, 2653, 1493859, 3487, 1609124, 1493858, 1609104, 5561, 2791, 5646, 5263, 14326, 11442, 1608570, 2491, 1493860, 2614, 2634, 3670, 1287017, 6654, 1847022, 2873, 14329, 1493635, 1350169, 1350176, 3500, 3489, 1493629, 2619, 3526, 1287018, 5252, 5346, 3191, 3495, 1846975, 1847027, 3490, 6438, 2875, 2874, 2718, 1209336, 3192, 1286685, 1287044, 1286689, 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, 134, 135, 136, 137, 138, 139, 140, 142, 145, 146, 147, 148, 149, 150, 152, 155, 156, 157, 158, 165, 176, 185, 186, 211, 233, 262, 263, 264, 265, 271, 274, 275, 276, 277, 278, 279, 356, 359, 361, 362, 363, 364, 365, 452, 453, 616, 621, 622, 623, 629, 664, 665, 766, 767, 801, 977, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1039, 1240, 1241, 1256, 1266, 1267, 1268, 1269, 1270, 1271, 1331, 1334, 1475, 1481, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1934, 1935, 1936, 1938, 1939, 1940, 1941, 1943, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2058, 2059, 2060, 2061, 2062, 2063, 2064, 2066, 2068, 3390, 3522, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610, 3948, 5125, 5134, 14316, 88766, 88767, 88768, 88769, 1618529, 1672035, 1676328, 1676372, 1676373, 1676381, 1676382, 1676390, 1676421, 1676695, 1695966, 1739564, 1762314, 1765022, 1765031, 1766341, 1769332, 1773891, 1775198, 1777553, 1779262, 1783879, 1785824, 1788838, 1799362, 1812136, 1812949, 1816976, 1816978, 1817743, 1818881, 1820441, 1821518, 1823557, 1824294, 1824766, 1824903, 1825104, 1825105, 1825106, 1825905, 1829478, 1830007, 1830009, 1830010, 1830011, 1830076, 1830203, 1831108, 1833543, 1835610, 1836406, 1836769, 1837379, 1838742, 1839897, 1840079, 1840080, 1841400, 1841723, 1841892, 1842308, 1842436, 1843013, 1844698, 1845442, 1846507] + >>> gl.processlist["1608782"] {'cmdline': ['/proc/self/exe', '--type=utility', '--utility-sub-type=node.mojom.NodeService', @@ -679,7 +679,7 @@ Processlist stats: '--dns-result-order=ipv4first', '--experimental-network-inspection', '--inspect-port=0', - '--crashpad-handler-pid=739062', + '--crashpad-handler-pid=1608570', '--enable-crash-reporter=864d4bb7-dd20-4851-830f-29e81dd93517,no_channel', '--user-data-dir=/home/nicolargo/.config/Code', '--standard-schemes=vscode-webview,vscode-file', @@ -689,142 +689,117 @@ Processlist stats: '--service-worker-schemes=vscode-webview', '--code-cache-schemes=vscode-webview,vscode-file', '--shared-files=v8_context_snapshot_data:100', - '--field-trial-handle=3,i,16476947824719290197,4720072013320928602,262144', + '--field-trial-handle=3,i,9883300921707787016,857782282863154824,262144', '--enable-features=DocumentPolicyIncludeJSCallStacksInCrashReports,EarlyEstablishGpuChannel,EstablishGpuChannelAsync', '--disable-features=CalculateNativeWinOcclusion,FontationsLinuxSystemFonts,ScreenAIOCREnabled,SpareRendererForSitePerProcess', '--variations-seed-version'], - 'cpu_percent': 129.0, - 'cpu_times': {'children_system': 1276.89, - 'children_user': 1321.75, + 'cpu_percent': 11.8, + 'cpu_times': {'children_system': 383.51, + 'children_user': 155.82, 'iowait': 0.0, - 'system': 1053.51, - 'user': 7185.49}, + 'system': 383.07, + 'user': 1136.82}, 'gids': {'effective': 1000, 'real': 1000, 'saved': 1000}, - 'io_counters': [1536646144, - 1579593728, - 1536646144, - 1579593728, + 'io_counters': [895778816, + 522051584, + 895778816, + 521465856, 1, - 257744896, - 2011136, - 257744896, - 2011136, + 155616256, + 225280, + 155616256, + 225280, 1, - 398440448, - 434176, - 398440448, - 434176, + 103347200, + 253952, + 103347200, + 253952, 1, - 193552384, + 158570496, + 45010944, + 158570496, + 45010944, + 1, + 12946432, 0, - 193552384, + 12946432, 0, 1, - 6549504, - 8192, - 6549504, - 8192, - 1, - 13033472, + 92551168, 0, - 13033472, + 92551168, 0, 1, - 2169856, - 8192, - 2169856, - 8192, + 13459456, + 1138688, + 13459456, + 1138688, 1, - 964686848, - 1186848768, - 964686848, - 1186848768, - 1, - 126272512, - 929468416, - 126272512, - 929468416, - 1, - 47071232, - 1306624, - 47071232, - 1306624, - 1, - 5561344, + 11345920, 0, - 5561344, + 11345920, 0, 1, - 8621056, - 5234688, - 8621056, - 5234688, - 1, - 12486656, + 36054016, 0, - 12486656, + 36054016, 0, 1, - 47368192, + 15905792, 0, - 47368192, + 15905792, 0, 1, - 27514880, + 12955648, + 4096, + 12955648, + 4096, + 1, + 7147520, 0, - 27514880, + 7147520, 0, 1, - 3449856, + 4421632, 0, - 3449856, + 4421632, 0, 1, - 9232384, + 6177792, + 5541888, + 6177792, + 5541888, + 1, + 1113088, 0, - 9232384, + 1113088, 0, 1, - 14253056, - 77824, - 14253056, - 77824, - 1, - 15806464, + 1512448, 0, - 15806464, + 1512448, 0, 1, - 72886272, - 29454336, - 72886272, - 29454336, - 1, - 21232640, - 36864, - 21232640, - 36864, - 1, - 194560, + 15822848, 0, - 194560, + 15822848, 0, 1], 'key': 'pid', - 'memory_info': {'data': 8207228928, + 'memory_info': {'data': 4407611392, 'dirty': 0, 'lib': 0, - 'rss': 4926939136, - 'shared': 40341504, + 'rss': 1914802176, + 'shared': 94371840, 'text': 148733952, - 'vms': 1528130531328}, - 'memory_percent': 30.00047387572983, + 'vms': 1526362460160}, + 'memory_percent': 11.659363160900762, 'name': 'code', 'nice': 0, - 'num_threads': 63, - 'pid': 1211585, + 'num_threads': 61, + 'pid': 1608782, 'status': 'R', - 'time_since_update': 0.3744380474090576, + 'time_since_update': 0.4391207695007324, 'username': 'nicolargo'} Processlist fields description: @@ -909,13 +884,13 @@ Load stats: >>> gl.load {'cpucore': 16, - 'min1': 2.5322265625, - 'min15': 2.0205078125, - 'min5': 2.0205078125} + 'min1': 2.22509765625, + 'min15': 1.1025390625, + 'min5': 1.40966796875} >>> gl.load.keys() ['min1', 'min5', 'min15', 'cpucore'] >>> gl.load["min1"] - 2.5322265625 + 2.22509765625 Load fields description: @@ -954,7 +929,7 @@ Sensors stats: 'label': 'Ambient', 'type': 'temperature_core', 'unit': 'C', - 'value': 41, + 'value': 39, 'warning': 0} Sensors fields description: @@ -992,7 +967,7 @@ Uptime stats: >>> type(gl.uptime) >>> gl.uptime - '20 days, 22:12:09' + '21 days, 19:52:03' Uptime limits: @@ -1011,11 +986,11 @@ Now stats: >>> type(gl.now) >>> gl.now - {'custom': '2025-11-02 17:05:47 CET', 'iso': '2025-11-02T17:05:47+01:00'} + {'custom': '2025-11-03 14:45:41 CET', 'iso': '2025-11-03T14:45:41+01:00'} >>> gl.now.keys() ['iso', 'custom'] >>> gl.now["iso"] - '2025-11-02T17:05:47+01:00' + '2025-11-03T14:45:41+01:00' Now fields description: @@ -1044,14 +1019,14 @@ Fs stats: ['/', '/zsfpool'] >>> gl.fs["/"] {'device_name': '/dev/mapper/ubuntu--vg-ubuntu--lv', - 'free': 712302313472, + 'free': 710345199616, 'fs_type': 'ext4', 'key': 'mnt_point', 'mnt_point': '/', 'options': 'rw,relatime', - 'percent': 25.2, + 'percent': 25.4, 'size': 1003736440832, - 'used': 240371621888} + 'used': 242328735744} Fs fields description: @@ -1091,8 +1066,8 @@ Wifi stats: ['wlp0s20f3'] >>> gl.wifi["wlp0s20f3"] {'key': 'ssid', - 'quality_level': -62.0, - 'quality_link': 48.0, + 'quality_level': -61.0, + 'quality_link': 49.0, 'ssid': 'wlp0s20f3'} Wifi limits: @@ -1158,7 +1133,7 @@ Version stats: >>> type(gl.version) >>> gl.version - '4.4.0' + '4.4.1' Version limits: @@ -1224,16 +1199,16 @@ Mem stats: >>> type(gl.mem) >>> gl.mem - {'active': 4936712192, - 'available': 1061557632, - 'buffers': 37707776, - 'cached': 1955491456, - 'free': 313143296, - 'inactive': 9592696832, - 'percent': 93.5, - 'shared': 876208128, + {'active': 7246528512, + 'available': 4719228288, + 'buffers': 394821632, + 'cached': 4602834560, + 'free': 276021248, + 'inactive': 6447226880, + 'percent': 71.3, + 'shared': 1101475840, 'total': 16422871040, - 'used': 15361313408} + 'used': 11703642752} >>> gl.mem.keys() ['total', 'available', 'percent', 'used', 'free', 'active', 'inactive', 'buffers', 'cached', 'shared'] >>> gl.mem["total"] @@ -1303,19 +1278,19 @@ Quicklook stats: >>> type(gl.quicklook) >>> gl.quicklook - {'cpu': 14.8, + {'cpu': 7.2, 'cpu_hz': 4475000000.0, - 'cpu_hz_current': 1689430312.5000002, + 'cpu_hz_current': 1280092937.5000002, 'cpu_log_core': 16, 'cpu_name': '13th Gen Intel(R) Core(TM) i7-13620H', 'cpu_phys_core': 10, - 'load': 12.6, - 'mem': 93.5, + 'load': 6.9, + 'mem': 71.3, 'percpu': [{'cpu_number': 0, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 26.0, + 'idle': 25.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1323,10 +1298,40 @@ Quicklook stats: 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, - 'system': 5.0, - 'total': 74.0, - 'user': 2.0}, + 'system': 7.0, + 'total': 75.0, + 'user': 0.0}, {'cpu_number': 1, + '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': 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': 0.0, + 'total': 67.0, + 'user': 1.0}, + {'cpu_number': 3, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, @@ -1340,8 +1345,68 @@ Quicklook stats: 'steal': 0.0, 'system': 0.0, 'total': 66.0, - 'user': 0.0}, - {'cpu_number': 2, + 'user': 1.0}, + {'cpu_number': 4, + 'dpc': None, + 'guest': 0.0, + 'guest_nice': 0.0, + 'idle': 13.0, + 'interrupt': None, + 'iowait': 7.0, + 'irq': 0.0, + 'key': 'cpu_number', + 'nice': 0.0, + 'softirq': 0.0, + 'steal': 0.0, + 'system': 12.0, + 'total': 87.0, + 'user': 1.0}, + {'cpu_number': 5, + 'dpc': None, + 'guest': 0.0, + 'guest_nice': 0.0, + 'idle': 4.0, + 'interrupt': None, + 'iowait': 21.0, + 'irq': 0.0, + 'key': 'cpu_number', + 'nice': 0.0, + 'softirq': 0.0, + 'steal': 0.0, + 'system': 2.0, + 'total': 96.0, + 'user': 7.0}, + {'cpu_number': 6, + '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': 2.0}, + {'cpu_number': 7, + 'dpc': None, + 'guest': 0.0, + 'guest_nice': 0.0, + 'idle': 33.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': 67.0, + 'user': 1.0}, + {'cpu_number': 8, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, @@ -1356,101 +1421,11 @@ Quicklook stats: 'system': 0.0, 'total': 69.0, 'user': 2.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': 13.0, - 'interrupt': None, - 'iowait': 1.0, - 'irq': 0.0, - 'key': 'cpu_number', - 'nice': 0.0, - 'softirq': 0.0, - 'steal': 0.0, - 'system': 2.0, - 'total': 87.0, - 'user': 19.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': 3.0}, - {'cpu_number': 6, - 'dpc': None, - 'guest': 0.0, - 'guest_nice': 0.0, - 'idle': 16.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': 84.0, - 'user': 16.0}, - {'cpu_number': 7, - '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': 6.0, - 'total': 71.0, - 'user': 2.0}, - {'cpu_number': 8, - 'dpc': None, - 'guest': 0.0, - 'guest_nice': 0.0, - 'idle': 27.0, - 'interrupt': None, - 'iowait': 1.0, - 'irq': 0.0, - 'key': 'cpu_number', - 'nice': 0.0, - 'softirq': 0.0, - 'steal': 0.0, - 'system': 2.0, - 'total': 73.0, - 'user': 6.0}, {'cpu_number': 9, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 36.0, + 'idle': 33.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1459,13 +1434,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 64.0, + 'total': 67.0, 'user': 0.0}, {'cpu_number': 10, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 29.0, + 'idle': 33.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1473,14 +1448,14 @@ Quicklook stats: 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, - 'system': 2.0, - 'total': 71.0, - 'user': 5.0}, + 'system': 1.0, + 'total': 67.0, + 'user': 1.0}, {'cpu_number': 11, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 35.0, + 'idle': 34.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1489,15 +1464,30 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 65.0, - 'user': 1.0}, + 'total': 66.0, + 'user': 0.0}, {'cpu_number': 12, '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': 0.0, + 'total': 67.0, + 'user': 1.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, @@ -1506,41 +1496,26 @@ Quicklook stats: 'system': 0.0, 'total': 67.0, 'user': 0.0}, - {'cpu_number': 13, - 'dpc': None, - 'guest': 0.0, - 'guest_nice': 0.0, - 'idle': 33.0, - 'interrupt': None, - 'iowait': 1.0, - 'irq': 0.0, - 'key': 'cpu_number', - 'nice': 0.0, - 'softirq': 0.0, - 'steal': 0.0, - 'system': 1.0, - 'total': 67.0, - 'user': 2.0}, {'cpu_number': 14, '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': 1.0}, {'cpu_number': 15, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 32.0, + 'idle': 33.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1549,9 +1524,9 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 1.0, - 'total': 68.0, - 'user': 2.0}], - 'swap': 100.0} + 'total': 67.0, + 'user': 1.0}], + 'swap': 91.7} >>> gl.quicklook.keys() ['cpu_name', 'cpu_hz_current', 'cpu_hz', 'cpu', 'percpu', 'mem', 'swap', 'cpu_log_core', 'cpu_phys_core', 'load'] >>> gl.quicklook["cpu_name"] @@ -1601,13 +1576,13 @@ Memswap stats: >>> type(gl.memswap) >>> gl.memswap - {'free': 106496, - 'percent': 100.0, - 'sin': 4184350720, - 'sout': 16154378240, - 'time_since_update': 0.32324767112731934, + {'free': 354922496, + 'percent': 91.7, + 'sin': 5044195328, + 'sout': 19269844992, + 'time_since_update': 0.41198039054870605, 'total': 4294963200, - 'used': 4294856704} + 'used': 3940040704} >>> gl.memswap.keys() ['total', 'used', 'free', 'percent', 'sin', 'sout', 'time_since_update'] >>> gl.memswap["total"] @@ -1642,10 +1617,10 @@ Use auto_unit() function to generate a human-readable string with the unit: .. code-block:: python >>> gl.mem["used"] - 15361313408 + 11703642752 >>> gl.auto_unit(gl.mem["used"]) - 14.3G + 10.9G Args: @@ -1671,7 +1646,7 @@ Use bar() function to generate a bar: .. code-block:: python >>> gl.bar(gl.mem["percent"]) - ■■■■■■■■■■■■■■■■■□ + ■■■■■■■■■■■■■□□□□□ Args: @@ -1701,7 +1676,1709 @@ Use top_process() function to generate a list of top processes sorted by CPU or .. code-block:: python >>> gl.top_process() - [{'name': 'code', 'num_threads': 63, 'cpu_times': {'user': 7185.49, 'system': 1053.51, 'children_user': 1321.75, 'children_system': 1276.89, 'iowait': 0.0}, 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'nice': 0, 'status': 'R', 'pid': 1211585, 'io_counters': [1536646144, 1579593728, 1536646144, 1579593728, 1, 257744896, 2011136, 257744896, 2011136, 1, 398440448, 434176, 398440448, 434176, 1, 193552384, 0, 193552384, 0, 1, 6549504, 8192, 6549504, 8192, 1, 13033472, 0, 13033472, 0, 1, 2169856, 8192, 2169856, 8192, 1, 964686848, 1186848768, 964686848, 1186848768, 1, 126272512, 929468416, 126272512, 929468416, 1, 47071232, 1306624, 47071232, 1306624, 1, 5561344, 0, 5561344, 0, 1, 8621056, 5234688, 8621056, 5234688, 1, 12486656, 0, 12486656, 0, 1, 47368192, 0, 47368192, 0, 1, 27514880, 0, 27514880, 0, 1, 3449856, 0, 3449856, 0, 1, 9232384, 0, 9232384, 0, 1, 14253056, 77824, 14253056, 77824, 1, 15806464, 0, 15806464, 0, 1, 72886272, 29454336, 72886272, 29454336, 1, 21232640, 36864, 21232640, 36864, 1, 194560, 0, 194560, 0, 1], 'memory_info': {'rss': 4926939136, 'vms': 1528130531328, 'shared': 40341504, 'text': 148733952, 'lib': 0, 'data': 8207228928, 'dirty': 0}, 'memory_percent': 30.00047387572983, 'cpu_percent': 129.0, 'key': 'pid', 'time_since_update': 0.3744380474090576, '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=739062', '--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,16476947824719290197,4720072013320928602,262144', '--enable-features=DocumentPolicyIncludeJSCallStacksInCrashReports,EarlyEstablishGpuChannel,EstablishGpuChannelAsync', '--disable-features=CalculateNativeWinOcclusion,FontationsLinuxSystemFonts,ScreenAIOCREnabled,SpareRendererForSitePerProcess', '--variations-seed-version'], 'username': 'nicolargo'}, {'name': 'code', 'num_threads': 25, 'cpu_times': {'user': 11073.31, 'system': 814.08, 'children_user': 0.0, 'children_system': 0.0, 'iowait': 0.0}, 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'nice': 0, 'status': 'S', 'pid': 739161, 'io_counters': [398440448, 434176, 398440448, 434176, 1], 'memory_info': {'rss': 691216384, 'vms': 1517477416960, 'shared': 82411520, 'text': 148733952, 'lib': 0, 'data': 2020413440, 'dirty': 0}, 'memory_percent': 4.208864469047185, 'cpu_percent': 5.7, 'key': 'pid', 'time_since_update': 0.3744380474090576, 'cmdline': ['/snap/code/211/usr/share/code/code', '--type=zygote', '--no-sandbox'], 'username': 'nicolargo'}, {'name': 'editors_helper', 'num_threads': 12, 'cpu_times': {'user': 7285.47, 'system': 1099.84, 'children_user': 0.0, 'children_system': 0.0, 'iowait': 0.0}, 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'nice': 0, 'status': 'S', 'pid': 614914, 'io_counters': [76382208, 4452352, 76382208, 4452352, 1, 20915200, 303104, 20915200, 303104, 1, 45486080, 0, 45486080, 0, 1, 41096192, 2019328, 41096192, 2019328, 1, 640000, 0, 640000, 0, 1, 1408000, 20480, 1408000, 20480, 1, 2560000, 0, 2560000, 0, 1], 'memory_info': {'rss': 128499712, 'vms': 61897965568, 'shared': 8572928, 'text': 782336, 'lib': 0, 'data': 479965184, 'dirty': 0}, 'memory_percent': 0.7824436524345989, 'cpu_percent': 5.7, 'key': 'pid', 'time_since_update': 0.3744380474090576, 'cmdline': ['/snap/onlyoffice-desktopeditors/746/opt/onlyoffice/desktopeditors/editors_helper', '--type=zygote', '--no-sandbox', '--force-device-scale-factor=1', '--log-severity=disable', '--user-agent-product=Chrome/109.0.0.0 AscDesktopEditor/9.1.0.173', '--lang=en-US', '--user-data-dir=/home/nicolargo/snap/onlyoffice-desktopeditors/746/.local/share/onlyoffice/desktopeditors/data/cache', '--log-file=/home/nicolargo/snap/onlyoffice-desktopeditors/746/.local/share/onlyoffice/desktopeditors/data/cache/log.log'], 'username': 'nicolargo'}] + [{'pid': 1608782, 'status': 'R', 'nice': 0, 'num_threads': 61, 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'memory_percent': 11.659363160900762, 'memory_info': {'rss': 1914802176, 'vms': 1526362460160, 'shared': 94371840, 'text': 148733952, 'lib': 0, 'data': 4407611392, 'dirty': 0}, 'cpu_times': {'user': 1136.82, 'system': 383.07, 'children_user': 155.82, 'children_system': 383.51, 'iowait': 0.0}, 'name': 'code', 'io_counters': [895778816, 522051584, 895778816, 521465856, 1, 155616256, 225280, 155616256, 225280, 1, 103347200, 253952, 103347200, 253952, 1, 158570496, 45010944, 158570496, 45010944, 1, 12946432, 0, 12946432, 0, 1, 92551168, 0, 92551168, 0, 1, 13459456, 1138688, 13459456, 1138688, 1, 11345920, 0, 11345920, 0, 1, 36054016, 0, 36054016, 0, 1, 15905792, 0, 15905792, 0, 1, 12955648, 4096, 12955648, 4096, 1, 7147520, 0, 7147520, 0, 1, 4421632, 0, 4421632, 0, 1, 6177792, 5541888, 6177792, 5541888, 1, 1113088, 0, 1113088, 0, 1, 1512448, 0, 1512448, 0, 1, 15822848, 0, 15822848, 0, 1], 'cpu_percent': 11.8, 'key': 'pid', 'time_since_update': 0.4391207695007324, '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=1608570', '--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,9883300921707787016,857782282863154824,262144', '--enable-features=DocumentPolicyIncludeJSCallStacksInCrashReports,EarlyEstablishGpuChannel,EstablishGpuChannelAsync', '--disable-features=CalculateNativeWinOcclusion,FontationsLinuxSystemFonts,ScreenAIOCREnabled,SpareRendererForSitePerProcess', '--variations-seed-version'], 'username': 'nicolargo'}, {'pid': 1316902, 'status': 'S', 'nice': 0, 'num_threads': 34, 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'memory_percent': 3.9239653921072257, 'memory_info': {'rss': 644427776, 'vms': 3476258816, 'shared': 81543168, 'text': 610304, 'lib': 0, 'data': 911380480, 'dirty': 0}, 'cpu_times': {'user': 2173.61, 'system': 156.88, 'children_user': 0.0, 'children_system': 0.0, 'iowait': 0.0}, 'name': 'Isolated Web Co', 'io_counters': [84249600, 0, 84249600, 0, 1], 'cpu_percent': 4.7, 'key': 'pid', 'time_since_update': 0.4391207695007324, 'cmdline': ['/snap/firefox/7084/usr/lib/firefox/firefox', '-contentproc', '-isForBrowser', '-prefsHandle', '0:45875', '-prefMapHandle', '1:278271', '-jsInitHandle', '2:224660', '-parentBuildID', '20251017115341', '-sandboxReporter', '3', '-chrootClient', '4', '-ipcHandle', '5', '-initialChannelId', '{3e3f5aae-5240-49bc-a319-7020bc189b34}', '-parentPid', '1209239', '-crashReporter', '6', '-crashHelper', '7', '-greomni', '/snap/firefox/7084/usr/lib/firefox/omni.ja', '-appomni', '/snap/firefox/7084/usr/lib/firefox/browser/omni.ja', '-appDir', '/snap/firefox/7084/usr/lib/firefox/browser', '208', 'tab'], 'username': 'nicolargo'}, {'pid': 1209239, 'status': 'S', 'nice': 0, 'num_threads': 159, 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'memory_percent': 4.365143696579865, 'memory_info': {'rss': 716881920, 'vms': 30611554304, 'shared': 181841920, 'text': 610304, 'lib': 0, 'data': 1354461184, 'dirty': 0}, 'cpu_times': {'user': 5865.62, 'system': 1774.95, 'children_user': 0.18, 'children_system': 1.73, 'iowait': 0.0}, 'name': 'firefox', 'io_counters': [2684273664, 8709328896, 2684273664, 8709328896, 1], 'cpu_percent': 2.4, 'key': 'pid', 'time_since_update': 0.4391207695007324, 'cmdline': ['/snap/firefox/7084/usr/lib/firefox/firefox'], 'username': 'nicolargo'}] + + +Args: + + limit (int, optional): The maximum number of top processes to return. Defaults to 3. + + sorted_by (str, optional): The primary key to sort processes by (e.g., 'cpu_percent'). + Defaults to 'cpu_percent'. + + sorted_by_secondary (str, optional): The secondary key to sort processes by if primary keys are equal + (e.g., 'memory_percent'). Defaults to 'memory_percent'. + +Returns: + + list: A list of dictionaries representing the top processes, excluding those with 'glances' in their + command line. + +Note: + + The 'glances' process is excluded from the returned list to avoid self-generated CPU load affecting + the results. + + +.. _api: + +Python API documentation +======================== + +This documentation describes the Glances Python API. + +Note: This API is only available in Glances 4.4.0 or higher. + + +TL;DR +----- + +You can access the Glances API by importing the `glances.api` module and creating an +instance of the `GlancesAPI` class. This instance provides access to all Glances plugins +and their fields. For example, to access the CPU plugin and its total field, you can +use the following code: + +.. code-block:: python + + >>> from glances import api + >>> gl = api.GlancesAPI() + >>> gl.cpu + {'cpucore': 16, + 'ctx_switches': 1518018188, + 'guest': 0.0, + 'idle': 87.4, + 'interrupts': 1219812329, + 'iowait': 5.1, + 'irq': 0.0, + 'nice': 0.0, + 'soft_interrupts': 529896272, + 'steal': 0.0, + 'syscalls': 0, + 'system': 4.8, + 'total': 7.2, + 'user': 2.5} + >>> gl.cpu["total"] + 7.2 + >>> gl.mem["used"] + 11717655168 + >>> gl.auto_unit(gl.mem["used"]) + 10.9G + +If the stats return a list of items (like network interfaces or processes), you can +access them by their name: + +.. code-block:: python + + >>> gl.network.keys() + ['wlp0s20f3', 'veth33b370c', 'veth19c7711'] + >>> gl.network["wlp0s20f3"] + {'alias': None, + 'bytes_all': 0, + 'bytes_all_gauge': 13043764281, + 'bytes_all_rate_per_sec': 0.0, + 'bytes_recv': 0, + 'bytes_recv_gauge': 10650273101, + 'bytes_recv_rate_per_sec': 0.0, + 'bytes_sent': 0, + 'bytes_sent_gauge': 2393491180, + 'bytes_sent_rate_per_sec': 0.0, + 'interface_name': 'wlp0s20f3', + 'key': 'interface_name', + 'speed': 0, + 'time_since_update': 0.21648859977722168} + +Init Glances Python API +----------------------- + +Init the Glances API: + +.. code-block:: python + + >>> from glances import api + >>> gl = api.GlancesAPI() + +Get Glances plugins list +------------------------ + +Get the plugins list: + +.. code-block:: python + + >>> gl.plugins() + ['alert', 'ports', 'diskio', 'containers', 'processcount', 'programlist', 'gpu', 'percpu', 'system', 'network', 'cpu', 'amps', 'processlist', 'load', 'sensors', 'uptime', 'now', 'fs', 'wifi', 'ip', 'help', 'version', 'psutilversion', 'core', 'mem', 'folders', 'quicklook', 'memswap'] + +Glances alert +------------- + +Alert stats: + +.. code-block:: python + + >>> type(gl.alert) + + >>> gl.alert + [{'avg': 91.73630880003815, + 'begin': 1762177541, + 'count': 4, + 'desc': '', + 'end': -1, + 'global_msg': 'High swap (paging) usage', + 'max': 91.73630880003815, + 'min': 91.73630880003815, + 'sort': 'memory_percent', + 'state': 'CRITICAL', + 'sum': 366.9452352001526, + 'top': ['code', 'code', 'WebExtensions'], + 'type': 'MEMSWAP'}, + {'avg': 71.2747919623194, + 'begin': 1762177541, + 'count': 4, + 'desc': '', + 'end': -1, + 'global_msg': 'High swap (paging) usage', + 'max': 71.34961444597693, + 'min': 71.2182261646743, + 'sort': 'memory_percent', + 'state': 'WARNING', + 'sum': 285.0991678492776, + 'top': [], + 'type': 'MEM'}] + +Alert fields description: + +* begin: Begin timestamp of the event +* end: End timestamp of the event (or -1 if ongoing) +* state: State of the event (WARNING|CRITICAL) +* type: Type of the event (CPU|LOAD|MEM) +* max: Maximum value during the event period +* avg: Average value during the event period +* min: Minimum value during the event period +* sum: Sum of the values during the event period +* count: Number of values during the event period +* top: Top 3 processes name during the event period +* desc: Description of the event +* sort: Sort key of the top processes +* global_msg: Global alert message + +Alert limits: + +.. code-block:: python + + >>> gl.alert.limits + {'alert_disable': ['False'], 'history_size': 1200.0} + +Glances ports +------------- + +Ports stats: + +.. code-block:: python + + >>> type(gl.ports) + + >>> gl.ports + [{'description': 'DefaultGateway', + 'host': '192.168.1.1', + 'indice': 'port_0', + 'port': 0, + 'refresh': 30, + 'rtt_warning': None, + 'status': 0.00549, + 'timeout': 3}] + +Ports fields description: + +* host: Measurement is be done on this host (or IP address) +* port: Measurement is be done on this port (0 for ICMP) +* description: Human readable description for the host/port +* refresh: Refresh time (in seconds) for this host/port +* timeout: Timeout (in seconds) for the measurement +* status: Measurement result (in seconds) +* rtt_warning: Warning threshold (in seconds) for the measurement +* indice: Unique indice for the host/port + +Ports limits: + +.. code-block:: python + + >>> gl.ports.limits + {'history_size': 1200.0, + 'ports_disable': ['False'], + 'ports_port_default_gateway': ['True'], + 'ports_refresh': 30.0, + 'ports_timeout': 3.0} + +Glances diskio +-------------- + +Diskio stats: + +.. code-block:: python + + >>> type(gl.diskio) + + >>> gl.diskio + Return a dict of dict with key= + >>> gl.diskio.keys() + ['nvme0n1', 'nvme0n1p1', 'nvme0n1p2', 'nvme0n1p3', 'dm-0', 'dm-1'] + >>> gl.diskio["nvme0n1"] + {'disk_name': 'nvme0n1', + 'key': 'disk_name', + 'read_bytes': 49126157824, + 'read_count': 2826082, + 'read_latency': 0, + 'read_time': 1021898, + 'write_bytes': 97265005568, + 'write_count': 8791508, + 'write_latency': 0, + 'write_time': 8006374} + +Diskio fields description: + +* disk_name: Disk name. +* read_count: Number of reads. +* write_count: Number of writes. +* read_bytes: Number of bytes read. +* write_bytes: Number of bytes written. +* read_time: Time spent reading. +* write_time: Time spent writing. +* read_latency: Mean time spent reading per operation. +* write_latency: Mean time spent writing per operation. + +Diskio limits: + +.. code-block:: python + + >>> gl.diskio.limits + {'diskio_disable': ['False'], + 'diskio_hide': ['loop.*', '/dev/loop.*'], + 'diskio_hide_zero': ['False'], + 'diskio_rx_latency_careful': 10.0, + 'diskio_rx_latency_critical': 50.0, + 'diskio_rx_latency_warning': 20.0, + 'diskio_tx_latency_careful': 10.0, + 'diskio_tx_latency_critical': 50.0, + 'diskio_tx_latency_warning': 20.0, + 'history_size': 1200.0} + +Glances containers +------------------ + +Containers stats: + +.. code-block:: python + + >>> type(gl.containers) + + >>> gl.containers + Return a dict of dict with key= + >>> gl.containers.keys() + ['homeassistant', 'timescaledb-for-glances', 'prometheus-for-glances'] + >>> gl.containers["homeassistant"] + {'command': '/init', + 'cpu': {'total': 0.0}, + 'cpu_percent': 0.0, + 'created': '2025-11-03T09:43:31.02993333Z', + 'engine': 'docker', + 'id': '3bf16da8d0ac1690a7a9fba938ef52d338a9e8db00a8fcba8f707d87e4886471', + 'image': ('ghcr.io/home-assistant/home-assistant:stable',), + 'io': {}, + 'io_rx': None, + 'io_wx': None, + 'key': 'name', + 'memory': {}, + 'memory_inactive_file': None, + 'memory_limit': None, + 'memory_percent': None, + 'memory_usage': None, + 'name': 'homeassistant', + 'network': {}, + 'network_rx': None, + 'network_tx': None, + 'ports': '', + 'status': 'running', + 'uptime': '4 hours'} + +Containers fields description: + +* name: Container name +* id: Container ID +* image: Container image +* status: Container status +* created: Container creation date +* command: Container command +* cpu_percent: Container CPU consumption +* memory_inactive_file: Container memory inactive file +* memory_limit: Container memory limit +* memory_usage: Container memory usage +* io_rx: Container IO bytes read rate +* io_wx: Container IO bytes write rate +* network_rx: Container network RX bitrate +* network_tx: Container network TX bitrate +* ports: Container ports +* uptime: Container uptime +* engine: Container engine (Docker and Podman are currently supported) +* pod_name: Pod name (only with Podman) +* pod_id: Pod ID (only with Podman) + +Containers limits: + +.. code-block:: python + + >>> gl.containers.limits + {'containers_all': ['False'], + 'containers_disable': ['False'], + 'containers_disable_stats': ['command'], + 'containers_max_name_size': 20.0, + 'history_size': 1200.0} + +Glances processcount +-------------------- + +Processcount stats: + +.. code-block:: python + + >>> type(gl.processcount) + + >>> gl.processcount + {'pid_max': 0, 'running': 1, 'sleeping': 451, 'thread': 2478, 'total': 604} + >>> gl.processcount.keys() + ['total', 'running', 'sleeping', 'thread', 'pid_max'] + >>> gl.processcount["total"] + 604 + +Processcount fields description: + +* total: Total number of processes +* running: Total number of running processes +* sleeping: Total number of sleeping processes +* thread: Total number of threads +* pid_max: Maximum number of processes + +Processcount limits: + +.. code-block:: python + + >>> gl.processcount.limits + {'history_size': 1200.0, 'processcount_disable': ['False']} + +Glances gpu +----------- + +Gpu stats: + +.. code-block:: python + + >>> type(gl.gpu) + + >>> gl.gpu + [] + +Gpu fields description: + +* gpu_id: GPU identification +* name: GPU name +* mem: Memory consumption +* proc: GPU processor consumption +* temperature: GPU temperature +* fan_speed: GPU fan speed + +Gpu limits: + +.. code-block:: python + + >>> gl.gpu.limits + {'gpu_disable': ['False'], + 'gpu_mem_careful': 50.0, + 'gpu_mem_critical': 90.0, + 'gpu_mem_warning': 70.0, + 'gpu_proc_careful': 50.0, + 'gpu_proc_critical': 90.0, + 'gpu_proc_warning': 70.0, + 'gpu_temperature_careful': 60.0, + 'gpu_temperature_critical': 80.0, + 'gpu_temperature_warning': 70.0, + 'history_size': 1200.0} + +Glances percpu +-------------- + +Percpu stats: + +.. code-block:: python + + >>> type(gl.percpu) + + >>> gl.percpu + Return a dict of dict with key= + >>> gl.percpu.keys() + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + >>> gl.percpu["0"] + {'cpu_number': 0, + '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': 0.0} + +Percpu fields description: + +* cpu_number: CPU number +* total: Sum of CPU percentages (except idle) for current CPU number. +* system: Percent time spent in kernel space. System CPU time is the time spent running code in the Operating System kernel. +* user: CPU percent time spent in user space. User CPU time is the time spent on the processor running your program's code (or code in libraries). +* iowait: *(Linux)*: percent time spent by the CPU waiting for I/O operations to complete. +* idle: percent of CPU used by any program. Every program or task that runs on a computer system occupies a certain amount of processing time on the CPU. If the CPU has completed all tasks it is idle. +* irq: *(Linux and BSD)*: percent time spent servicing/handling hardware/software interrupts. Time servicing interrupts (hardware + software). +* nice: *(Unix)*: percent time occupied by user level processes with a positive nice value. The time the CPU has spent running users' processes that have been *niced*. +* steal: *(Linux)*: percentage of time a virtual CPU waits for a real CPU while the hypervisor is servicing another virtual processor. +* guest: *(Linux)*: percent of time spent running a virtual CPU for guest operating systems under the control of the Linux kernel. +* guest_nice: *(Linux)*: percent of time spent running a niced guest (virtual CPU). +* softirq: *(Linux)*: percent of time spent handling software interrupts. +* dpc: *(Windows)*: percent of time spent handling deferred procedure calls. +* interrupt: *(Windows)*: percent of time spent handling software interrupts. + +Percpu limits: + +.. code-block:: python + + >>> gl.percpu.limits + {'history_size': 1200.0, + 'percpu_disable': ['False'], + 'percpu_iowait_careful': 50.0, + 'percpu_iowait_critical': 90.0, + 'percpu_iowait_warning': 70.0, + 'percpu_max_cpu_display': 4.0, + 'percpu_system_careful': 50.0, + 'percpu_system_critical': 90.0, + 'percpu_system_warning': 70.0, + 'percpu_user_careful': 50.0, + 'percpu_user_critical': 90.0, + 'percpu_user_warning': 70.0} + +Glances system +-------------- + +System stats: + +.. code-block:: python + + >>> type(gl.system) + + >>> gl.system + {'hostname': 'nicolargo-xps15', + 'hr_name': 'Ubuntu 24.04 64bit / Linux 6.14.0-33-generic', + 'linux_distro': 'Ubuntu 24.04', + 'os_name': 'Linux', + 'os_version': '6.14.0-33-generic', + 'platform': '64bit'} + >>> gl.system.keys() + ['os_name', 'hostname', 'platform', 'os_version', 'linux_distro', 'hr_name'] + >>> gl.system["os_name"] + 'Linux' + +System fields description: + +* os_name: Operating system name +* hostname: Hostname +* platform: Platform (32 or 64 bits) +* linux_distro: Linux distribution +* os_version: Operating system version +* hr_name: Human readable operating system name + +System limits: + +.. code-block:: python + + >>> gl.system.limits + {'history_size': 1200.0, 'system_disable': ['False'], 'system_refresh': 60} + +Glances network +--------------- + +Network stats: + +.. code-block:: python + + >>> type(gl.network) + + >>> gl.network + Return a dict of dict with key= + >>> gl.network.keys() + ['wlp0s20f3', 'veth33b370c', 'veth19c7711'] + >>> gl.network["wlp0s20f3"] + {'alias': None, + 'bytes_all': 0, + 'bytes_all_gauge': 13043764281, + 'bytes_all_rate_per_sec': 0.0, + 'bytes_recv': 0, + 'bytes_recv_gauge': 10650273101, + 'bytes_recv_rate_per_sec': 0.0, + 'bytes_sent': 0, + 'bytes_sent_gauge': 2393491180, + 'bytes_sent_rate_per_sec': 0.0, + 'interface_name': 'wlp0s20f3', + 'key': 'interface_name', + 'speed': 0, + 'time_since_update': 0.002928495407104492} + +Network fields description: + +* interface_name: Interface name. +* alias: Interface alias name (optional). +* bytes_recv: Number of bytes received. +* bytes_sent: Number of bytes sent. +* bytes_all: Number of bytes received and sent. +* speed: Maximum interface speed (in bit per second). Can return 0 on some operating-system. +* is_up: Is the interface up ? + +Network limits: + +.. code-block:: python + + >>> gl.network.limits + {'history_size': 1200.0, + 'network_disable': ['False'], + 'network_hide': ['docker.*', 'lo'], + 'network_hide_no_ip': ['True'], + 'network_hide_no_up': ['True'], + 'network_hide_zero': ['False'], + 'network_rx_careful': 70.0, + 'network_rx_critical': 90.0, + 'network_rx_warning': 80.0, + 'network_tx_careful': 70.0, + 'network_tx_critical': 90.0, + 'network_tx_warning': 80.0} + +Glances cpu +----------- + +Cpu stats: + +.. code-block:: python + + >>> type(gl.cpu) + + >>> gl.cpu + {'cpucore': 16, + 'ctx_switches': 1518018188, + 'guest': 0.0, + 'idle': 87.4, + 'interrupts': 1219812329, + 'iowait': 5.1, + 'irq': 0.0, + 'nice': 0.0, + 'soft_interrupts': 529896272, + 'steal': 0.0, + 'syscalls': 0, + 'system': 4.8, + 'total': 7.2, + 'user': 2.5} + >>> gl.cpu.keys() + ['total', 'user', 'nice', 'system', 'idle', 'iowait', 'irq', 'steal', 'guest', 'ctx_switches', 'interrupts', 'soft_interrupts', 'syscalls', 'cpucore'] + >>> gl.cpu["total"] + 7.2 + +Cpu fields description: + +* total: Sum of all CPU percentages (except idle). +* system: Percent time spent in kernel space. System CPU time is the time spent running code in the Operating System kernel. +* user: CPU percent time spent in user space. User CPU time is the time spent on the processor running your program's code (or code in libraries). +* iowait: *(Linux)*: percent time spent by the CPU waiting for I/O operations to complete. +* dpc: *(Windows)*: time spent servicing deferred procedure calls (DPCs) +* idle: percent of CPU used by any program. Every program or task that runs on a computer system occupies a certain amount of processing time on the CPU. If the CPU has completed all tasks it is idle. +* irq: *(Linux and BSD)*: percent time spent servicing/handling hardware/software interrupts. Time servicing interrupts (hardware + software). +* nice: *(Unix)*: percent time occupied by user level processes with a positive nice value. The time the CPU has spent running users' processes that have been *niced*. +* steal: *(Linux)*: percentage of time a virtual CPU waits for a real CPU while the hypervisor is servicing another virtual processor. +* guest: *(Linux)*: time spent running a virtual CPU for guest operating systems under the control of the Linux kernel. +* ctx_switches: number of context switches (voluntary + involuntary) per second. A context switch is a procedure that a computer's CPU (central processing unit) follows to change from one task (or process) to another while ensuring that the tasks do not conflict. +* interrupts: number of interrupts per second. +* soft_interrupts: number of software interrupts per second. Always set to 0 on Windows and SunOS. +* syscalls: number of system calls per second. Always 0 on Linux OS. +* cpucore: Total number of CPU core. +* time_since_update: Number of seconds since last update. + +Cpu limits: + +.. code-block:: python + + >>> gl.cpu.limits + {'cpu_ctx_switches_careful': 640000.0, + 'cpu_ctx_switches_critical': 800000.0, + 'cpu_ctx_switches_warning': 720000.0, + 'cpu_disable': ['False'], + 'cpu_iowait_careful': 5.0, + 'cpu_iowait_critical': 6.25, + 'cpu_iowait_warning': 5.625, + 'cpu_steal_careful': 50.0, + 'cpu_steal_critical': 90.0, + 'cpu_steal_warning': 70.0, + 'cpu_system_careful': 50.0, + 'cpu_system_critical': 90.0, + 'cpu_system_log': ['False'], + 'cpu_system_warning': 70.0, + 'cpu_total_careful': 65.0, + 'cpu_total_critical': 85.0, + 'cpu_total_log': ['True'], + 'cpu_total_warning': 75.0, + 'cpu_user_careful': 50.0, + 'cpu_user_critical': 90.0, + 'cpu_user_log': ['False'], + 'cpu_user_warning': 70.0, + 'history_size': 1200.0} + +Glances amps +------------ + +Amps stats: + +.. code-block:: python + + >>> type(gl.amps) + + >>> gl.amps + Return a dict of dict with key= + >>> gl.amps.keys() + ['Dropbox', 'Python', 'Conntrack', 'Nginx', 'Systemd', 'SystemV'] + >>> gl.amps["Dropbox"] + {'count': 0, + 'countmax': None, + 'countmin': 1.0, + 'key': 'name', + 'name': 'Dropbox', + 'refresh': 3.0, + 'regex': True, + 'result': None, + 'timer': 0.18263745307922363} + +Amps fields description: + +* name: AMP name. +* result: AMP result (a string). +* refresh: AMP refresh interval. +* timer: Time until next refresh. +* count: Number of matching processes. +* countmin: Minimum number of matching processes. +* countmax: Maximum number of matching processes. + +Amps limits: + +.. code-block:: python + + >>> gl.amps.limits + {'amps_disable': ['False'], 'history_size': 1200.0} + +Glances processlist +------------------- + +Processlist stats: + +.. code-block:: python + + >>> type(gl.processlist) + + >>> gl.processlist + Return a dict of dict with key= + >>> gl.processlist.keys() + [1608782, 1609441, 1209523, 1209239, 1209604, 1316902, 1608672, 1610135, 1631694, 1676423, 1674764, 5654, 1209619, 1224962, 1695841, 1510111, 1508741, 1209559, 1209632, 6237, 1608552, 1209611, 1608710, 464283, 1610173, 1608754, 1667892, 446730, 1287223, 1511132, 1608755, 1847031, 61459, 1610075, 1608850, 1493680, 1609327, 1609756, 1609114, 1842326, 1842637, 1844409, 1608634, 3476, 1780895, 1493854, 732, 1609326, 1609325, 6612, 1318955, 1608555, 18544, 1350217, 1608554, 1847028, 6069, 1209533, 569516, 1493855, 9513, 2993, 1738682, 6652, 1738626, 6225, 1212793, 1210327, 1609328, 1676656, 1609323, 1493857, 1494015, 5267, 1493861, 5990, 1209509, 1676307, 5782, 2627, 6253, 1, 5857, 5770, 8666, 5762, 5245, 1209504, 7197, 14301, 6624, 2719, 9878, 2953, 5811, 5950, 6647, 1493658, 6285, 1350197, 2652, 5808, 5262, 5265, 5214, 6126, 5268, 6211, 1808423, 5885, 2720, 794, 1684044, 5830, 6512, 2990, 5784, 5589, 3051, 688630, 2838, 5281, 2616, 6013, 5795, 5836, 1841210, 5813, 5800, 5789, 1738862, 5871, 6192, 2493, 5421, 5833, 3556, 1752388, 2620, 20411, 3503, 234055, 2623, 6046, 2642, 688600, 2647, 5794, 1618848, 5740, 5631, 20420, 5335, 6085, 2645, 2841, 6142, 6060, 5786, 6035, 6153, 5832, 6023, 2655, 5404, 5821, 6076, 2494, 5826, 5961, 14320, 2615, 5575, 5947, 5339, 2648, 5586, 2492, 5560, 2653, 1493859, 3487, 1609124, 1493858, 1609104, 5561, 2791, 5646, 5263, 14326, 11442, 1608570, 2491, 1493860, 2614, 2634, 3670, 1287017, 6654, 1847022, 2873, 14329, 1493635, 1350169, 1350176, 3500, 3489, 1493629, 2619, 3526, 1287018, 5252, 5346, 3191, 3495, 1846975, 1847027, 3490, 6438, 2875, 2874, 2718, 1209336, 3192, 1286685, 1287044, 1286689, 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, 134, 135, 136, 137, 138, 139, 140, 142, 145, 146, 147, 148, 149, 150, 152, 155, 156, 157, 158, 165, 176, 185, 186, 211, 233, 262, 263, 264, 265, 271, 274, 275, 276, 277, 278, 279, 356, 359, 361, 362, 363, 364, 365, 452, 453, 616, 621, 622, 623, 629, 664, 665, 766, 767, 801, 977, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1039, 1240, 1241, 1256, 1266, 1267, 1268, 1269, 1270, 1271, 1331, 1334, 1475, 1481, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1934, 1935, 1936, 1938, 1939, 1940, 1941, 1943, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2058, 2059, 2060, 2061, 2062, 2063, 2064, 2066, 2068, 3390, 3522, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610, 3948, 5125, 5134, 14316, 88766, 88767, 88768, 88769, 1618529, 1672035, 1676328, 1676372, 1676373, 1676381, 1676382, 1676390, 1676421, 1676695, 1695966, 1739564, 1762314, 1765022, 1765031, 1766341, 1769332, 1773891, 1775198, 1777553, 1779262, 1783879, 1785824, 1788838, 1799362, 1812136, 1812949, 1816976, 1816978, 1817743, 1818881, 1820441, 1821518, 1823557, 1824294, 1824766, 1824903, 1825104, 1825105, 1825106, 1825905, 1829478, 1830007, 1830009, 1830010, 1830011, 1830076, 1830203, 1831108, 1833543, 1835610, 1836406, 1836769, 1837379, 1838742, 1839897, 1840079, 1840080, 1841400, 1841723, 1841892, 1842308, 1842436, 1843013, 1844698, 1845442, 1846507] + >>> gl.processlist["1608782"] + {'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=1608570', + '--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,9883300921707787016,857782282863154824,262144', + '--enable-features=DocumentPolicyIncludeJSCallStacksInCrashReports,EarlyEstablishGpuChannel,EstablishGpuChannelAsync', + '--disable-features=CalculateNativeWinOcclusion,FontationsLinuxSystemFonts,ScreenAIOCREnabled,SpareRendererForSitePerProcess', + '--variations-seed-version'], + 'cpu_percent': 13.8, + 'cpu_times': {'children_system': 383.53, + 'children_user': 155.83, + 'iowait': 0.0, + 'system': 383.1, + 'user': 1136.93}, + 'gids': {'effective': 1000, 'real': 1000, 'saved': 1000}, + 'io_counters': [895778816, + 523304960, + 895778816, + 522625024, + 1, + 155616256, + 225280, + 155616256, + 225280, + 1, + 103347200, + 253952, + 103347200, + 253952, + 1, + 158570496, + 45010944, + 158570496, + 45010944, + 1, + 12946432, + 0, + 12946432, + 0, + 1, + 92551168, + 0, + 92551168, + 0, + 1, + 13459456, + 1138688, + 13459456, + 1138688, + 1, + 11345920, + 0, + 11345920, + 0, + 1, + 36054016, + 0, + 36054016, + 0, + 1, + 15905792, + 0, + 15905792, + 0, + 1, + 12955648, + 4096, + 12955648, + 4096, + 1, + 7147520, + 0, + 7147520, + 0, + 1, + 4421632, + 0, + 4421632, + 0, + 1, + 6177792, + 5541888, + 6177792, + 5541888, + 1, + 1113088, + 0, + 1113088, + 0, + 1, + 1512448, + 0, + 1512448, + 0, + 1, + 15822848, + 0, + 15822848, + 0, + 1], + 'key': 'pid', + 'memory_info': {'data': 4407611392, + 'dirty': 0, + 'lib': 0, + 'rss': 1916948480, + 'shared': 94371840, + 'text': 148733952, + 'vms': 1526362460160}, + 'memory_percent': 11.672432154712943, + 'name': 'code', + 'nice': 0, + 'num_threads': 61, + 'pid': 1608782, + 'status': 'S', + 'time_since_update': 0.43367981910705566, + 'username': 'nicolargo'} + +Processlist fields description: + +* pid: Process identifier (ID) +* name: Process name +* cmdline: Command line with arguments +* username: Process owner +* num_threads: Number of threads +* cpu_percent: Process CPU consumption (returned value can be > 100.0 in case of a process running multiple threads on different CPU cores) +* memory_percent: Process memory consumption +* memory_info: Process memory information (dict with rss, vms, shared, text, lib, data, dirty keys) +* status: Process status +* nice: Process nice value +* cpu_times: Process CPU times (dict with user, system, iowait keys) +* gids: Process group IDs (dict with real, effective, saved keys) +* io_counters: Process IO counters (list with read_count, write_count, read_bytes, write_bytes, io_tag keys) + +Processlist limits: + +.. code-block:: python + + >>> gl.processlist.limits + {'history_size': 1200.0, + 'processlist_cpu_careful': 50.0, + 'processlist_cpu_critical': 90.0, + 'processlist_cpu_warning': 70.0, + 'processlist_disable': ['False'], + 'processlist_mem_careful': 50.0, + 'processlist_mem_critical': 90.0, + 'processlist_mem_warning': 70.0, + 'processlist_nice_warning': ['-20', + '-19', + '-18', + '-17', + '-16', + '-15', + '-14', + '-13', + '-12', + '-11', + '-10', + '-9', + '-8', + '-7', + '-6', + '-5', + '-4', + '-3', + '-2', + '-1', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19'], + 'processlist_status_critical': ['Z', 'D'], + 'processlist_status_ok': ['R', 'W', 'P', 'I']} + +Glances load +------------ + +Load stats: + +.. code-block:: python + + >>> type(gl.load) + + >>> gl.load + {'cpucore': 16, + 'min1': 2.22509765625, + 'min15': 1.1025390625, + 'min5': 1.40966796875} + >>> gl.load.keys() + ['min1', 'min5', 'min15', 'cpucore'] + >>> gl.load["min1"] + 2.22509765625 + +Load fields description: + +* min1: Average sum of the number of processes waiting in the run-queue plus the number currently executing over 1 minute. +* min5: Average sum of the number of processes waiting in the run-queue plus the number currently executing over 5 minutes. +* min15: Average sum of the number of processes waiting in the run-queue plus the number currently executing over 15 minutes. +* cpucore: Total number of CPU core. + +Load limits: + +.. code-block:: python + + >>> gl.load.limits + {'history_size': 1200.0, + 'load_careful': 0.7, + 'load_critical': 5.0, + 'load_disable': ['False'], + 'load_warning': 1.0} + +Glances sensors +--------------- + +Sensors stats: + +.. code-block:: python + + >>> type(gl.sensors) + + >>> gl.sensors + Return a dict of dict with key=