.. _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': 1319717138, 'guest': 0.0, 'idle': 85.0, 'interrupts': 1068778007, 'iowait': 0.4, 'irq': 0.0, 'nice': 0.0, 'soft_interrupts': 460346290, 'steal': 0.0, 'syscalls': 0, 'system': 4.4, 'total': 14.8, 'user': 10.0} >>> gl.cpu["total"] 14.8 >>> gl.mem["used"] 15361313408 >>> gl.auto_unit(gl.mem["used"]) 14.3G 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': 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, 'interface_name': 'wlp0s20f3', 'key': 'interface_name', 'speed': 0, 'time_since_update': 0.13040733337402344} 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': 99.99752044441266, 'begin': 1762099547, 'count': 2, 'desc': '', 'end': -1, 'global_msg': 'High swap (paging) usage', 'max': 99.99752044441266, 'min': 99.99752044441266, 'sort': 'memory_percent', 'state': 'CRITICAL', 'sum': 199.99504088882532, 'top': ['code', 'code', 'code'], 'type': 'MEMSWAP'}, {'avg': 93.4872553928305, 'begin': 1762099547, 'count': 2, 'desc': '', 'end': -1, 'global_msg': 'High swap (paging) usage', 'max': 93.53610200424492, 'min': 93.43840878141609, 'sort': 'memory_percent', 'state': 'CRITICAL', 'sum': 186.974510785661, 'top': ['code', 'code', 'code'], '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.005563, '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': 44125751808, 'read_count': 2503254, 'read_latency': 0, 'read_time': 880648, 'write_bytes': 82740225024, 'write_count': 7384791, 'write_latency': 0, 'write_time': 6938764} 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() ['timescaledb-for-glances', 'prometheus-for-glances'] >>> gl.containers["timescaledb-for-glances"] {'command': '/docker-entrypoint.sh postgres', 'cpu': {'total': 0.0}, 'cpu_percent': 0.0, 'created': '2025-11-01T15:37:49.229752418Z', 'engine': 'docker', 'id': '7078de8bc380626c26e279a4d6d63df966c29fbc7d3a6a34ada57f8c620609b3', 'image': ('timescale/timescaledb-ha:pg17',), 'io': {}, 'io_rx': None, 'io_wx': None, 'key': 'name', 'memory': {}, 'memory_inactive_file': None, 'memory_limit': None, 'memory_percent': None, 'memory_usage': None, 'name': 'timescaledb-for-glances', 'network': {}, 'network_rx': None, 'network_tx': None, 'ports': '5432->5432/tcp,8008/tcp,8081/tcp', 'status': 'running', 'uptime': 'yesterday'} 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': 2, 'sleeping': 452, 'thread': 2627, 'total': 601} >>> gl.processcount.keys() ['total', 'running', 'sleeping', 'thread', 'pid_max'] >>> gl.processcount["total"] 601 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': 26.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, 'key': 'cpu_number', 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, 'system': 5.0, 'total': 74.0, 'user': 2.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': 11546480273, 'bytes_all_rate_per_sec': 0.0, 'bytes_recv': 0, 'bytes_recv_gauge': 9345920424, 'bytes_recv_rate_per_sec': 0.0, 'bytes_sent': 0, 'bytes_sent_gauge': 2200559849, 'bytes_sent_rate_per_sec': 0.0, 'interface_name': 'wlp0s20f3', 'key': 'interface_name', 'speed': 0, 'time_since_update': 0.0015246868133544922} 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': 1319717138, 'guest': 0.0, 'idle': 85.0, 'interrupts': 1068778007, 'iowait': 0.4, 'irq': 0.0, 'nice': 0.0, 'soft_interrupts': 460346290, 'steal': 0.0, 'syscalls': 0, 'system': 4.4, 'total': 14.8, 'user': 10.0} >>> gl.cpu.keys() ['total', 'user', 'nice', 'system', 'idle', 'iowait', 'irq', 'steal', 'guest', 'ctx_switches', 'interrupts', 'soft_interrupts', 'syscalls', 'cpucore'] >>> gl.cpu["total"] 14.8 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.18061351776123047} 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() [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"] {'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'], 'cpu_percent': 129.0, 'cpu_times': {'children_system': 1276.89, 'children_user': 1321.75, 'iowait': 0.0, 'system': 1053.51, 'user': 7185.49}, 'gids': {'effective': 1000, 'real': 1000, 'saved': 1000}, '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], 'key': 'pid', 'memory_info': {'data': 8207228928, 'dirty': 0, 'lib': 0, 'rss': 4926939136, 'shared': 40341504, 'text': 148733952, 'vms': 1528130531328}, 'memory_percent': 30.00047387572983, 'name': 'code', 'nice': 0, 'num_threads': 63, 'pid': 1211585, 'status': 'R', 'time_since_update': 0.3744380474090576, '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.5322265625, 'min15': 2.0205078125, 'min5': 2.0205078125} >>> gl.load.keys() ['min1', 'min5', 'min15', 'cpucore'] >>> gl.load["min1"] 2.5322265625 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=