From 133f97efd8620c22a12f18c50e3b398c25610f54 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 1 Nov 2025 10:27:34 +0100 Subject: [PATCH] Show used port in container section #2054 --- conf/glances.conf | 4 +- docker-compose/glances.conf | 4 +- docs/aoa/containers.rst | 4 +- docs/api/python.rst | 582 +++++++------ docs/api/restful.rst | 803 ++++++++++-------- docs/man/glances.1 | 2 +- .../js/components/plugin-containers.vue | 8 + glances/outputs/static/public/glances.js | 2 +- glances/plugins/containers/__init__.py | 5 +- glances/plugins/containers/engines/docker.py | 2 +- glances/plugins/containers/engines/podman.py | 3 +- 11 files changed, 821 insertions(+), 598 deletions(-) diff --git a/conf/glances.conf b/conf/glances.conf index 5f3bd5d1..0e683825 100644 --- a/conf/glances.conf +++ b/conf/glances.conf @@ -547,8 +547,8 @@ disable=False # Define the maximum docker size name (default is 20 chars) max_name_size=20 # List of stats to disable (not display) -# Following stats can be disabled: name,status,uptime,cpu,mem,diskio,networkio,command -; disable_stats=diskio,networkio +# Following stats can be disabled: name,status,uptime,cpu,mem,diskio,networkio,ports,command +disable_stats=command # Thresholds for CPU and MEM (in %) ; cpu_careful=50 ; cpu_warning=70 diff --git a/docker-compose/glances.conf b/docker-compose/glances.conf index 5283084e..4b50637a 100755 --- a/docker-compose/glances.conf +++ b/docker-compose/glances.conf @@ -546,8 +546,8 @@ disable=False # Define the maximum docker size name (default is 20 chars) max_name_size=20 # List of stats to disable (not display) -# Following stats can be disabled: name,status,uptime,cpu,mem,diskio,networkio,command -; disable_stats=diskio,networkio +# Following stats can be disabled: name,status,uptime,cpu,mem,diskio,networkio,ports,command +disable_stats=command # Thresholds for CPU and MEM (in %) ; cpu_careful=50 ; cpu_warning=70 diff --git a/docs/aoa/containers.rst b/docs/aoa/containers.rst index 2fd97f18..e7b3e40b 100644 --- a/docs/aoa/containers.rst +++ b/docs/aoa/containers.rst @@ -32,8 +32,8 @@ under the ``[containers]`` section: # Define the maximum containers size name (default is 20 chars) max_name_size=20 # List of stats to disable (not display) - # Following stats can be disabled: name,status,uptime,cpu,mem,diskio,networkio,command - disable_stats=diskio,networkio + # Following stats can be disabled: name,status,uptime,cpu,mem,diskio,networkio,ports,command + disable_stats=command # Global containers' thresholds for CPU and MEM (in %) cpu_careful=50 cpu_warning=70 diff --git a/docs/api/python.rst b/docs/api/python.rst index 00f526c0..b4fedd62 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': 998293638, + 'ctx_switches': 1105771729, 'guest': 0.0, - 'idle': 92.4, - 'interrupts': 824799117, + 'idle': 89.0, + 'interrupts': 908552456, 'iowait': 0.4, 'irq': 0.0, 'nice': 0.0, - 'soft_interrupts': 348627458, + 'soft_interrupts': 385371712, 'steal': 0.0, 'syscalls': 0, - 'system': 4.3, - 'total': 7.9, - 'user': 2.7} + 'system': 6.1, + 'total': 8.1, + 'user': 4.5} >>> gl.cpu["total"] - 7.9 + 8.1 >>> gl.mem["used"] - 11610159744 + 11819129472 >>> gl.auto_unit(gl.mem["used"]) - 10.8G + 11.0G If the stats return a list of items (like network interfaces or processes), you can access them by their name: @@ -48,22 +48,22 @@ access them by their name: .. code-block:: python >>> gl.network.keys() - ['wlp0s20f3'] + ['wlp0s20f3', 'veth33b370c'] >>> gl.network["wlp0s20f3"] {'alias': None, - 'bytes_all': 0, - 'bytes_all_gauge': 8564127462, - 'bytes_all_rate_per_sec': 0.0, - 'bytes_recv': 0, - 'bytes_recv_gauge': 6937520302, - 'bytes_recv_rate_per_sec': 0.0, - 'bytes_sent': 0, - 'bytes_sent_gauge': 1626607160, - 'bytes_sent_rate_per_sec': 0.0, + 'bytes_all': 1849, + 'bytes_all_gauge': 8929939653, + 'bytes_all_rate_per_sec': 12306.0, + 'bytes_recv': 1481, + 'bytes_recv_gauge': 7217068231, + 'bytes_recv_rate_per_sec': 9856.0, + 'bytes_sent': 368, + 'bytes_sent_gauge': 1712871422, + 'bytes_sent_rate_per_sec': 2449.0, 'interface_name': 'wlp0s20f3', 'key': 'interface_name', 'speed': 0, - 'time_since_update': 0.22452616691589355} + 'time_since_update': 0.1502518653869629} Init Glances Python API ----------------------- @@ -95,17 +95,30 @@ Alert stats: >>> type(gl.alert) >>> gl.alert - [{'avg': 70.6037465176369, - 'begin': 1761928894, + [{'avg': 78.58484133228428, + 'begin': 1761989183, 'count': 2, 'desc': '', 'end': -1, - 'global_msg': 'High memory consumption', - 'max': 70.69506735894092, - 'min': 70.5124256763329, + 'global_msg': 'High swap (paging) usage', + 'max': 78.58484133228428, + 'min': 78.58484133228428, 'sort': 'memory_percent', 'state': 'WARNING', - 'sum': 141.2074930352738, + 'sum': 157.16968266456857, + 'top': [], + 'type': 'MEMSWAP'}, + {'avg': 71.89904841388805, + 'begin': 1761989183, + 'count': 2, + 'desc': '', + 'end': -1, + 'global_msg': 'High swap (paging) usage', + 'max': 71.96749851602074, + 'min': 71.83059831175537, + 'sort': 'memory_percent', + 'state': 'WARNING', + 'sum': 143.7980968277761, 'top': [], 'type': 'MEM'}] @@ -148,7 +161,7 @@ Ports stats: 'port': 0, 'refresh': 30, 'rtt_warning': None, - 'status': 0.009506, + 'status': 0.005676, 'timeout': 3}] Ports fields description: @@ -189,14 +202,14 @@ Diskio stats: >>> gl.diskio["nvme0n1"] {'disk_name': 'nvme0n1', 'key': 'disk_name', - 'read_bytes': 35312888320, - 'read_count': 2076006, + 'read_bytes': 37580089856, + 'read_count': 2225108, 'read_latency': 0, - 'read_time': 678236, - 'write_bytes': 66537563136, - 'write_count': 5836388, + 'read_time': 734320, + 'write_bytes': 73558672384, + 'write_count': 6628267, 'write_latency': 0, - 'write_time': 5580960} + 'write_time': 6082658} Diskio fields description: @@ -236,7 +249,34 @@ Containers stats: >>> type(gl.containers) >>> gl.containers - [] + Return a dict of dict with key= + >>> gl.containers.keys() + ['prometheus-for-glances'] + >>> gl.containers["prometheus-for-glances"] + {'command': '/bin/prometheus --config.file=/etc/prometheus/prometheus.yml ' + '--storage.tsdb.path=/prometheus', + 'cpu': {'total': 0.0}, + 'cpu_percent': 0.0, + 'created': '2025-11-01T09:20:16.634313506Z', + 'engine': 'docker', + 'id': 'cbe33e3b3d30eedd1617b22723952c703e0105334b2e44a90fadf0bb0d1cbce9', + 'image': ('prom/prometheus:latest',), + 'io': {}, + 'io_rx': None, + 'io_wx': None, + 'key': 'name', + 'memory': {}, + 'memory_inactive_file': None, + 'memory_limit': None, + 'memory_percent': None, + 'memory_usage': None, + 'name': 'prometheus-for-glances', + 'network': {}, + 'network_rx': None, + 'network_tx': None, + 'ports': '9090->9090/tcp', + 'status': 'running', + 'uptime': '6 mins'} Containers fields description: @@ -254,6 +294,7 @@ Containers fields description: * 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) @@ -266,6 +307,7 @@ Containers limits: >>> gl.containers.limits {'containers_all': ['False'], 'containers_disable': ['False'], + 'containers_disable_stats': ['command'], 'containers_max_name_size': 20.0, 'history_size': 1200.0} @@ -279,11 +321,11 @@ Processcount stats: >>> type(gl.processcount) >>> gl.processcount - {'pid_max': 0, 'running': 1, 'sleeping': 426, 'thread': 2258, 'total': 585} + {'pid_max': 0, 'running': 1, 'sleeping': 437, 'thread': 2472, 'total': 590} >>> gl.processcount.keys() ['total', 'running', 'sleeping', 'thread', 'pid_max'] >>> gl.processcount["total"] - 585 + 590 Processcount fields description: @@ -356,7 +398,7 @@ Percpu stats: 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 44.0, + 'idle': 27.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -365,7 +407,7 @@ Percpu stats: 'softirq': 0.0, 'steal': 0.0, 'system': 10.0, - 'total': 56.0, + 'total': 73.0, 'user': 0.0} Percpu fields description: @@ -452,22 +494,22 @@ Network stats: >>> gl.network Return a dict of dict with key= >>> gl.network.keys() - ['wlp0s20f3'] + ['wlp0s20f3', 'veth33b370c'] >>> gl.network["wlp0s20f3"] {'alias': None, 'bytes_all': 0, - 'bytes_all_gauge': 8564127462, + 'bytes_all_gauge': 8929939653, 'bytes_all_rate_per_sec': 0.0, 'bytes_recv': 0, - 'bytes_recv_gauge': 6937520302, + 'bytes_recv_gauge': 7217068231, 'bytes_recv_rate_per_sec': 0.0, 'bytes_sent': 0, - 'bytes_sent_gauge': 1626607160, + 'bytes_sent_gauge': 1712871422, 'bytes_sent_rate_per_sec': 0.0, 'interface_name': 'wlp0s20f3', 'key': 'interface_name', 'speed': 0, - 'time_since_update': 0.002591848373413086} + 'time_since_update': 0.0033087730407714844} Network fields description: @@ -508,23 +550,23 @@ Cpu stats: >>> gl.cpu {'cpucore': 16, - 'ctx_switches': 998293638, + 'ctx_switches': 1105771729, 'guest': 0.0, - 'idle': 92.4, - 'interrupts': 824799117, + 'idle': 89.0, + 'interrupts': 908552456, 'iowait': 0.4, 'irq': 0.0, 'nice': 0.0, - 'soft_interrupts': 348627458, + 'soft_interrupts': 385371712, 'steal': 0.0, 'syscalls': 0, - 'system': 4.3, - 'total': 7.9, - 'user': 2.7} + 'system': 6.1, + 'total': 8.1, + 'user': 4.5} >>> gl.cpu.keys() ['total', 'user', 'nice', 'system', 'idle', 'iowait', 'irq', 'steal', 'guest', 'ctx_switches', 'interrupts', 'soft_interrupts', 'syscalls', 'cpucore'] >>> gl.cpu["total"] - 7.9 + 8.1 Cpu fields description: @@ -596,7 +638,7 @@ Amps stats: 'refresh': 3.0, 'regex': True, 'result': None, - 'timer': 0.3132622241973877} + 'timer': 0.17803120613098145} Amps fields description: @@ -627,7 +669,7 @@ Processlist stats: >>> gl.processlist Return a dict of dict with key= >>> gl.processlist.keys() - [1211585, 1212589, 1225365, 1209239, 1209523, 1209604, 1224962, 1212999, 739161, 1209611, 1209619, 1209632, 5654, 1215819, 1212908, 22094, 446730, 464283, 1209559, 1212793, 739044, 1213613, 2987, 614914, 1211584, 6237, 18544, 1212316, 1212802, 739264, 1232903, 1237024, 1233337, 1234209, 1236746, 61459, 1212055, 1204226, 739199, 1212051, 1212054, 1212053, 1212056, 6612, 1210327, 739578, 1209533, 1209509, 1237021, 1234565, 3476, 732, 1209504, 9513, 6225, 6069, 739105, 5857, 6652, 569516, 5770, 5990, 8666, 6512, 5782, 6624, 5267, 6253, 6126, 614544, 688630, 5811, 2719, 5808, 2993, 5950, 6647, 5589, 6285, 5762, 2627, 1, 614742, 5421, 2620, 6013, 5265, 9878, 2652, 5789, 2655, 5800, 6211, 5245, 2990, 5836, 5794, 2653, 5830, 5813, 2953, 5214, 5262, 3503, 688600, 3051, 5885, 5268, 7197, 5784, 2493, 234055, 5833, 3556, 6192, 20411, 20420, 6023, 5795, 2720, 2838, 2841, 2647, 5335, 2623, 6076, 2642, 5575, 5631, 14301, 5281, 6142, 2616, 5832, 739047, 5871, 5740, 6060, 614691, 5961, 483484, 6035, 6046, 2645, 5586, 5947, 6085, 5786, 5821, 2648, 614737, 2492, 5560, 14320, 2494, 5339, 3487, 5404, 5826, 6153, 1211852, 794, 5561, 2615, 614728, 5646, 1133647, 2634, 6438, 5263, 1211841, 14326, 408229, 11442, 614678, 739046, 614677, 2791, 2614, 2491, 1237077, 3670, 5067, 6654, 1209336, 2619, 5066, 14329, 2873, 1237015, 3500, 2874, 3489, 3526, 5252, 5346, 3191, 3495, 1237020, 3490, 1195083, 2875, 2982, 2984, 2718, 3192, 5071, 739062, 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, 647462, 1072697, 1133303, 1133346, 1180992, 1189219, 1189348, 1190411, 1191270, 1197553, 1201568, 1202106, 1202210, 1202348, 1204054, 1205852, 1205853, 1208509, 1209041, 1211137, 1213029, 1213711, 1217306, 1218509, 1219369, 1219868, 1221279, 1221680, 1221794, 1224469, 1225031, 1225032, 1225761, 1225971, 1225988, 1226613, 1227250, 1227251, 1227348, 1228427, 1228428, 1228458, 1228970, 1229870, 1230228, 1230985, 1231804, 1232304, 1232305, 1232773, 1233016, 1233075, 1233098, 1233112, 1233158, 1233612, 1234411, 1234412, 1234413, 1234601, 1234748, 1235263, 1235571, 1235678, 1237008, 1237053, 1237054] + [1211585, 1209239, 739161, 1209523, 1316902, 1212589, 1225365, 1209604, 1224962, 1209611, 1209619, 1333270, 1348985, 1209632, 5654, 1338768, 464283, 1336297, 1212999, 1349000, 1209559, 446730, 1348984, 1311079, 1287223, 739044, 614914, 1318955, 6237, 1213613, 1349010, 18544, 1349017, 739264, 1211584, 1350217, 1352164, 1361184, 1209533, 1212055, 1352836, 1360735, 61459, 1356092, 739199, 1333449, 1212054, 1212053, 3476, 1212802, 1351260, 6612, 1212793, 1210327, 1212316, 732, 1209509, 9513, 1361181, 739578, 569516, 739105, 6069, 1212051, 1209504, 6225, 6652, 5857, 2993, 5990, 5770, 6512, 8666, 1212056, 5782, 6624, 5267, 6253, 614544, 6126, 2719, 5811, 5808, 688630, 5950, 1, 1350197, 5589, 6285, 14301, 5762, 6647, 2627, 614742, 5421, 2620, 1287017, 5265, 6013, 9878, 5245, 5789, 5262, 2655, 2652, 5800, 6211, 2990, 5836, 5794, 2653, 5830, 2953, 3051, 5813, 5214, 3503, 5885, 688600, 5268, 5784, 2493, 234055, 5833, 1287018, 7197, 739047, 3556, 6192, 20411, 20420, 6023, 614737, 5795, 2720, 2838, 2841, 2647, 14320, 5335, 2623, 6076, 2642, 5575, 794, 5631, 2616, 6142, 5281, 5871, 5832, 5740, 6060, 5961, 6035, 6046, 614691, 483484, 2645, 5586, 5947, 6085, 5786, 5821, 2648, 2492, 5560, 2494, 5339, 3487, 5404, 5826, 6153, 5561, 2615, 5646, 2634, 5263, 14326, 1293800, 408229, 11442, 614728, 739046, 614678, 2791, 1350169, 1350176, 6438, 2614, 2491, 1211852, 614677, 3670, 6654, 2619, 1209336, 1361175, 14329, 2873, 3500, 2874, 3489, 3526, 5252, 5346, 1342165, 3191, 3495, 1361180, 1286689, 3490, 1286685, 2875, 739062, 2718, 1287044, 3192, 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, 1267862, 1292648, 1293617, 1295627, 1300570, 1301700, 1316506, 1319150, 1321411, 1324227, 1328558, 1331752, 1331757, 1331758, 1332586, 1333049, 1333312, 1334123, 1334628, 1335477, 1335657, 1335658, 1335681, 1335897, 1337368, 1337380, 1337962, 1338339, 1338542, 1339972, 1340928, 1341576, 1341605, 1343600, 1343834, 1345149, 1346089, 1346090, 1346091, 1346092, 1346284, 1346921, 1347818, 1347821, 1347977, 1348200, 1349091, 1349990, 1350092, 1351017, 1351058, 1351243, 1351984, 1352146, 1352368, 1352372, 1352410, 1352642, 1354971, 1355014, 1360913] >>> gl.processlist["1211585"] {'cmdline': ['/proc/self/exe', '--type=utility', @@ -652,87 +694,117 @@ Processlist stats: '--enable-features=DocumentPolicyIncludeJSCallStacksInCrashReports,EarlyEstablishGpuChannel,EstablishGpuChannelAsync', '--disable-features=CalculateNativeWinOcclusion,FontationsLinuxSystemFonts,ScreenAIOCREnabled,SpareRendererForSitePerProcess', '--variations-seed-version'], - 'cpu_percent': 0.0, - 'cpu_times': {'children_system': 39.74, - 'children_user': 45.97, + 'cpu_percent': 6.0, + 'cpu_times': {'children_system': 365.89, + 'children_user': 209.39, 'iowait': 0.0, - 'system': 65.74, - 'user': 1527.87}, + 'system': 309.61, + 'user': 3136.94}, 'gids': {'effective': 1000, 'real': 1000, 'saved': 1000}, - 'io_counters': [677320704, - 584089600, - 677320704, - 584089600, + 'io_counters': [860003328, + 857522176, + 860003328, + 857522176, 1, - 55424000, + 264663040, + 425984, + 264663040, + 425984, + 1, + 146366464, 1560576, - 55424000, + 146366464, 1560576, 1, - 75624448, + 6549504, + 8192, + 6549504, + 8192, + 1, + 187109376, 0, - 75624448, + 187109376, 0, 1, - 217425920, - 380928, - 217425920, - 380928, - 1, - 15147008, + 5561344, 0, - 15147008, + 5561344, 0, 1, - 708527104, - 1009422336, - 708527104, - 1009422336, + 2169856, + 8192, + 2169856, + 8192, 1, - 9617408, + 37666816, + 1306624, + 37666816, + 1306624, + 1, + 798051328, + 1101725696, + 798051328, + 1101725696, + 1, + 9732096, 0, - 9617408, + 9732096, 0, 1, - 38131712, + 8621056, + 5234688, + 8621056, + 5234688, + 1, + 12394496, 0, - 38131712, + 12394496, 0, 1, - 4743168, + 92167168, + 928555008, + 92167168, + 928555008, + 1, + 44052480, 0, - 4743168, + 44052480, 0, 1, - 115712, + 14960640, 0, - 115712, + 14960640, 0, 1, - 72562688, - 928153600, - 72562688, - 928153600, - 1, - 10027008, + 2839552, 0, - 10027008, + 2839552, 0, 1, - 13075456, + 15736832, + 0, + 15736832, + 0, + 1, + 4866048, + 0, + 4866048, + 0, + 1, + 13804544, 77824, - 13075456, + 13804544, 77824, 1, - 34919424, - 15900672, - 34919424, - 15900672, + 43334656, + 25112576, + 43334656, + 25112576, 1, - 276480, - 0, - 276480, - 0, + 1704960, + 36864, + 1704960, + 36864, 1, 194560, 0, @@ -740,20 +812,20 @@ Processlist stats: 0, 1], 'key': 'pid', - 'memory_info': {'data': 3885309952, + 'memory_info': {'data': 4822876160, 'dirty': 0, 'lib': 0, - 'rss': 2365235200, - 'shared': 125329408, + 'rss': 2184364032, + 'shared': 74330112, 'text': 148733952, - 'vms': 1524615458816}, - 'memory_percent': 14.402081062678796, + 'vms': 1526384009216}, + 'memory_percent': 13.300743984895835, 'name': 'code', 'nice': 0, - 'num_threads': 60, + 'num_threads': 62, 'pid': 1211585, 'status': 'S', - 'time_since_update': 0.6288127899169922, + 'time_since_update': 0.35088133811950684, 'username': 'nicolargo'} Processlist fields description: @@ -838,13 +910,13 @@ Load stats: >>> gl.load {'cpucore': 16, - 'min1': 0.919921875, - 'min15': 1.68994140625, - 'min5': 1.3916015625} + 'min1': 1.755859375, + 'min15': 1.095703125, + 'min5': 1.32666015625} >>> gl.load.keys() ['min1', 'min5', 'min15', 'cpucore'] >>> gl.load["min1"] - 0.919921875 + 1.755859375 Load fields description: @@ -883,7 +955,7 @@ Sensors stats: 'label': 'Ambient', 'type': 'temperature_core', 'unit': 'C', - 'value': 35, + 'value': 38, 'warning': 0} Sensors fields description: @@ -921,7 +993,7 @@ Uptime stats: >>> type(gl.uptime) >>> gl.uptime - '18 days, 22:47:59' + '19 days, 15:32:47' Uptime limits: @@ -940,11 +1012,11 @@ Now stats: >>> type(gl.now) >>> gl.now - {'custom': '2025-10-31 17:41:35 CET', 'iso': '2025-10-31T17:41:35+01:00'} + {'custom': '2025-11-01 10:26:23 CET', 'iso': '2025-11-01T10:26:23+01:00'} >>> gl.now.keys() ['iso', 'custom'] >>> gl.now["iso"] - '2025-10-31T17:41:35+01:00' + '2025-11-01T10:26:23+01:00' Now fields description: @@ -973,14 +1045,14 @@ Fs stats: ['/', '/zsfpool'] >>> gl.fs["/"] {'device_name': '/dev/mapper/ubuntu--vg-ubuntu--lv', - 'free': 711915118592, + 'free': 712119742464, 'fs_type': 'ext4', 'key': 'mnt_point', 'mnt_point': '/', 'options': 'rw,relatime', 'percent': 25.3, 'size': 1003736440832, - 'used': 240758816768} + 'used': 240554192896} Fs fields description: @@ -1020,8 +1092,8 @@ Wifi stats: ['wlp0s20f3'] >>> gl.wifi["wlp0s20f3"] {'key': 'ssid', - 'quality_level': -57.0, - 'quality_link': 53.0, + 'quality_level': -59.0, + 'quality_link': 51.0, 'ssid': 'wlp0s20f3'} Wifi limits: @@ -1153,16 +1225,16 @@ Mem stats: >>> type(gl.mem) >>> gl.mem - {'active': 9882959872, - 'available': 4812711296, - 'buffers': 266194944, - 'cached': 4643712640, - 'free': 731377664, - 'inactive': 3671056384, - 'percent': 70.7, - 'shared': 754536448, + {'active': 8500617216, + 'available': 4603741568, + 'buffers': 249065472, + 'cached': 3894492800, + 'free': 1372172288, + 'inactive': 4348563456, + 'percent': 72.0, + 'shared': 781660160, 'total': 16422871040, - 'used': 11610159744} + 'used': 11819129472} >>> gl.mem.keys() ['total', 'available', 'percent', 'used', 'free', 'active', 'inactive', 'buffers', 'cached', 'shared'] >>> gl.mem["total"] @@ -1232,19 +1304,19 @@ Quicklook stats: >>> type(gl.quicklook) >>> gl.quicklook - {'cpu': 7.9, + {'cpu': 8.1, 'cpu_hz': 4475000000.0, - 'cpu_hz_current': 702385562.5, + 'cpu_hz_current': 1566476437.4999998, 'cpu_log_core': 16, 'cpu_name': '13th Gen Intel(R) Core(TM) i7-13620H', 'cpu_phys_core': 10, - 'load': 10.6, - 'mem': 70.7, + 'load': 6.8, + 'mem': 72.0, 'percpu': [{'cpu_number': 0, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 44.0, + 'idle': 27.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1253,13 +1325,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 10.0, - 'total': 56.0, + 'total': 73.0, 'user': 0.0}, {'cpu_number': 1, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 53.0, + 'idle': 36.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1268,13 +1340,13 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 47.0, - 'user': 1.0}, + 'total': 64.0, + 'user': 0.0}, {'cpu_number': 2, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 52.0, + 'idle': 37.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1282,29 +1354,14 @@ Quicklook stats: 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, - 'system': 2.0, - 'total': 48.0, - 'user': 1.0}, + 'system': 0.0, + 'total': 63.0, + 'user': 0.0}, {'cpu_number': 3, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 52.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': 48.0, - 'user': 1.0}, - {'cpu_number': 4, - 'dpc': None, - 'guest': 0.0, - 'guest_nice': 0.0, - 'idle': 50.0, + 'idle': 37.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1313,39 +1370,24 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 1.0, - 'total': 50.0, - 'user': 4.0}, - {'cpu_number': 5, + 'total': 63.0, + 'user': 0.0}, + {'cpu_number': 4, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 54.0, + 'idle': 22.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': 46.0, - 'user': 1.0}, - {'cpu_number': 6, - 'dpc': None, - 'guest': 0.0, - 'guest_nice': 0.0, - 'idle': 36.0, - 'interrupt': None, - 'iowait': 2.0, + 'iowait': 1.0, 'irq': 0.0, 'key': 'cpu_number', 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, 'system': 10.0, - 'total': 64.0, - 'user': 9.0}, - {'cpu_number': 7, + 'total': 78.0, + 'user': 2.0}, + {'cpu_number': 5, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, @@ -1357,74 +1399,59 @@ Quicklook stats: 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, - 'system': 14.0, + 'system': 1.0, 'total': 65.0, - 'user': 2.0}, + 'user': 1.0}, + {'cpu_number': 6, + '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': 4.0, + 'total': 74.0, + 'user': 6.0}, + {'cpu_number': 7, + 'dpc': None, + 'guest': 0.0, + 'guest_nice': 0.0, + 'idle': 36.0, + 'interrupt': None, + 'iowait': 0.0, + 'irq': 0.0, + 'key': 'cpu_number', + 'nice': 0.0, + 'softirq': 0.0, + 'steal': 0.0, + 'system': 0.0, + 'total': 64.0, + 'user': 0.0}, {'cpu_number': 8, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 51.0, + 'idle': 34.0, 'interrupt': None, - 'iowait': 0.0, + 'iowait': 1.0, 'irq': 0.0, 'key': 'cpu_number', 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, - 'system': 1.0, - 'total': 49.0, - 'user': 2.0}, + 'system': 0.0, + 'total': 66.0, + 'user': 1.0}, {'cpu_number': 9, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 55.0, - 'interrupt': None, - 'iowait': 0.0, - 'irq': 0.0, - 'key': 'cpu_number', - 'nice': 0.0, - 'softirq': 0.0, - 'steal': 0.0, - 'system': 0.0, - 'total': 45.0, - 'user': 1.0}, - {'cpu_number': 10, - 'dpc': None, - 'guest': 0.0, - 'guest_nice': 0.0, - 'idle': 54.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': 46.0, - 'user': 2.0}, - {'cpu_number': 11, - 'dpc': None, - 'guest': 0.0, - 'guest_nice': 0.0, - 'idle': 55.0, - 'interrupt': None, - 'iowait': 0.0, - 'irq': 0.0, - 'key': 'cpu_number', - 'nice': 0.0, - 'softirq': 0.0, - 'steal': 0.0, - 'system': 0.0, - 'total': 45.0, - 'user': 0.0}, - {'cpu_number': 12, - 'dpc': None, - 'guest': 0.0, - 'guest_nice': 0.0, - 'idle': 53.0, + 'idle': 36.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1433,13 +1460,58 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 1.0, - 'total': 47.0, + 'total': 64.0, + 'user': 0.0}, + {'cpu_number': 10, + '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': 11, + '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': 1.0}, + {'cpu_number': 12, + 'dpc': None, + 'guest': 0.0, + 'guest_nice': 0.0, + 'idle': 36.0, + 'interrupt': None, + 'iowait': 0.0, + 'irq': 0.0, + 'key': 'cpu_number', + 'nice': 0.0, + 'softirq': 0.0, + 'steal': 0.0, + 'system': 0.0, + 'total': 64.0, 'user': 0.0}, {'cpu_number': 13, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 54.0, + 'idle': 35.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1448,28 +1520,28 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 1.0, - 'total': 46.0, + 'total': 65.0, 'user': 1.0}, {'cpu_number': 14, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 53.0, + 'idle': 33.0, 'interrupt': None, - 'iowait': 0.0, + 'iowait': 1.0, 'irq': 0.0, 'key': 'cpu_number', 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, 'system': 1.0, - 'total': 47.0, + 'total': 67.0, 'user': 1.0}, {'cpu_number': 15, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, - 'idle': 55.0, + 'idle': 34.0, 'interrupt': None, 'iowait': 0.0, 'irq': 0.0, @@ -1478,9 +1550,9 @@ Quicklook stats: 'softirq': 0.0, 'steal': 0.0, 'system': 0.0, - 'total': 45.0, - 'user': 0.0}], - 'swap': 39.1} + 'total': 66.0, + 'user': 1.0}], + 'swap': 78.6} >>> 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"] @@ -1530,13 +1602,13 @@ Memswap stats: >>> type(gl.memswap) >>> gl.memswap - {'free': 2614173696, - 'percent': 39.1, - 'sin': 3562110976, - 'sout': 12783652864, - 'time_since_update': 0.5980007648468018, + {'free': 919773184, + 'percent': 78.6, + 'sin': 3890126848, + 'sout': 14980149248, + 'time_since_update': 0.3526928424835205, 'total': 4294963200, - 'used': 1680789504} + 'used': 3375190016} >>> gl.memswap.keys() ['total', 'used', 'free', 'percent', 'sin', 'sout', 'time_since_update'] >>> gl.memswap["total"] @@ -1571,10 +1643,10 @@ Use auto_unit() function to generate a human-readable string with the unit: .. code-block:: python >>> gl.mem["used"] - 11610159744 + 11819129472 >>> gl.auto_unit(gl.mem["used"]) - 10.8G + 11.0G Args: @@ -1630,7 +1702,7 @@ Use top_process() function to generate a list of top processes sorted by CPU or .. code-block:: python >>> gl.top_process() - [{'cpu_times': {'user': 4774.06, 'system': 719.13, 'children_user': 0.0, 'children_system': 0.0, 'iowait': 0.0}, 'pid': 614914, 'io_counters': [39147520, 4452352, 39147520, 4452352, 1, 20328448, 303104, 20328448, 303104, 1, 45191168, 0, 45191168, 0, 1, 24870912, 2011136, 24870912, 2011136, 1, 1375232, 20480, 1375232, 20480, 1, 640000, 0, 640000, 0, 1, 2560000, 0, 2560000, 0, 1], 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'cpu_percent': 8.3, 'nice': 0, 'memory_info': {'rss': 129925120, 'vms': 61981892608, 'shared': 10063872, 'text': 782336, 'lib': 0, 'data': 563851264, 'dirty': 0}, 'status': 'S', 'name': 'editors_helper', 'memory_percent': 0.7911230605388715, 'num_threads': 26, 'key': 'pid', 'time_since_update': 0.6288127899169922, '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'}, {'cpu_times': {'user': 3306.36, 'system': 1105.85, 'children_user': 38.53, 'children_system': 3.75, 'iowait': 0.0}, 'pid': 614544, 'io_counters': [1053751296, 70397952, 1053751296, 70397952, 1], 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'cpu_percent': 5.0, 'nice': 0, 'memory_info': {'rss': 16834560, 'vms': 3240562688, 'shared': 9850880, 'text': 2777088, 'lib': 0, 'data': 429776896, 'dirty': 0}, 'status': 'S', 'name': 'DesktopEditors', 'memory_percent': 0.10250680261080587, 'num_threads': 23, 'key': 'pid', 'time_since_update': 0.6288127899169922, 'cmdline': ['./DesktopEditors'], 'username': 'nicolargo'}, {'cpu_times': {'user': 1176.64, 'system': 600.29, 'children_user': 0.0, 'children_system': 0.0, 'iowait': 0.0}, 'pid': 614691, 'io_counters': [45191168, 0, 45191168, 0, 1], 'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'cpu_percent': 3.3, 'nice': 0, 'memory_info': {'rss': 7172096, 'vms': 2322735104, 'shared': 5500928, 'text': 782336, 'lib': 0, 'data': 212623360, 'dirty': 0}, 'status': 'S', 'name': 'editors_helper', 'memory_percent': 0.043671389628107314, 'num_threads': 22, 'key': 'pid', 'time_since_update': 0.6288127899169922, 'cmdline': ['/snap/onlyoffice-desktopeditors/746/opt/onlyoffice/desktopeditors/editors_helper', '--type=zygote', '--no-zygote-sandbox', '--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'}] + [{'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'io_counters': [865858560, 2310115328, 865858560, 2310103040, 1], 'num_threads': 165, 'status': 'S', 'cpu_percent': 86.4, 'pid': 1209239, 'memory_info': {'rss': 705908736, 'vms': 30212091904, 'shared': 197472256, 'text': 610304, 'lib': 0, 'data': 1121816576, 'dirty': 0}, 'memory_percent': 4.2983272186736965, 'nice': 0, 'name': 'firefox', 'cpu_times': {'user': 1240.84, 'system': 381.15, 'children_user': 0.09, 'children_system': 1.17, 'iowait': 0.0}, 'key': 'pid', 'time_since_update': 0.35088133811950684, 'cmdline': ['/snap/firefox/7084/usr/lib/firefox/firefox'], 'username': 'nicolargo'}, {'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'io_counters': [860003328, 857522176, 860003328, 857522176, 1, 264663040, 425984, 264663040, 425984, 1, 146366464, 1560576, 146366464, 1560576, 1, 6549504, 8192, 6549504, 8192, 1, 187109376, 0, 187109376, 0, 1, 5561344, 0, 5561344, 0, 1, 2169856, 8192, 2169856, 8192, 1, 37666816, 1306624, 37666816, 1306624, 1, 798051328, 1101725696, 798051328, 1101725696, 1, 9732096, 0, 9732096, 0, 1, 8621056, 5234688, 8621056, 5234688, 1, 12394496, 0, 12394496, 0, 1, 92167168, 928555008, 92167168, 928555008, 1, 44052480, 0, 44052480, 0, 1, 14960640, 0, 14960640, 0, 1, 2839552, 0, 2839552, 0, 1, 15736832, 0, 15736832, 0, 1, 4866048, 0, 4866048, 0, 1, 13804544, 77824, 13804544, 77824, 1, 43334656, 25112576, 43334656, 25112576, 1, 1704960, 36864, 1704960, 36864, 1, 194560, 0, 194560, 0, 1], 'num_threads': 62, 'status': 'S', 'cpu_percent': 6.0, 'pid': 1211585, 'memory_info': {'rss': 2184364032, 'vms': 1526384009216, 'shared': 74330112, 'text': 148733952, 'lib': 0, 'data': 4822876160, 'dirty': 0}, 'memory_percent': 13.300743984895835, 'nice': 0, 'name': 'code', 'cpu_times': {'user': 3136.94, 'system': 309.61, 'children_user': 209.39, 'children_system': 365.89, 'iowait': 0.0}, 'key': 'pid', 'time_since_update': 0.35088133811950684, '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'}, {'gids': {'real': 1000, 'effective': 1000, 'saved': 1000}, 'io_counters': [7255040, 0, 7255040, 0, 1], 'num_threads': 29, 'status': 'S', 'cpu_percent': 3.0, 'pid': 1209523, 'memory_info': {'rss': 619003904, 'vms': 24993234944, 'shared': 111763456, 'text': 610304, 'lib': 0, 'data': 749641728, 'dirty': 0}, 'memory_percent': 3.769157673419812, 'nice': 0, 'name': 'WebExtensions', 'cpu_times': {'user': 250.21, 'system': 37.54, 'children_user': 0.0, 'children_system': 0.0, 'iowait': 0.0}, 'key': 'pid', 'time_since_update': 0.35088133811950684, 'cmdline': ['/snap/firefox/7084/usr/lib/firefox/firefox', '-contentproc', '-isForBrowser', '-prefsHandle', '0:39856', '-prefMapHandle', '1:278271', '-jsInitHandle', '2:224660', '-parentBuildID', '20251017115341', '-sandboxReporter', '3', '-chrootClient', '4', '-ipcHandle', '5', '-initialChannelId', '{dedbeb09-6fe3-42c8-9c1d-5394b07e14d3}', '-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', '3', 'tab'], 'username': 'nicolargo'}] Args: diff --git a/docs/api/restful.rst b/docs/api/restful.rst index 24982cb4..39af8cd9 100644 --- a/docs/api/restful.rst +++ b/docs/api/restful.rst @@ -160,7 +160,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.5460190773010254}, + "timer": 0.3574202060699463}, {"count": 0, "countmax": 20.0, "countmin": None, @@ -169,7 +169,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.5458920001983643}] + "timer": 0.3573644161224365}] Fields descriptions: @@ -197,7 +197,7 @@ Get a specific item when field matches the given value:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.5460190773010254}]} + "timer": 0.3574202060699463}]} GET cloud --------- @@ -238,7 +238,30 @@ GET containers Get plugin stats:: # curl http://localhost:61208/api/4/containers - [] + [{"command": "/bin/prometheus --config.file=/etc/prometheus/prometheus.yml " + "--storage.tsdb.path=/prometheus", + "cpu": {"total": 0.0}, + "cpu_percent": 0.0, + "created": "2025-11-01T09:20:16.634313506Z", + "engine": "docker", + "id": "cbe33e3b3d30eedd1617b22723952c703e0105334b2e44a90fadf0bb0d1cbce9", + "image": ["prom/prometheus:latest"], + "io": {"cumulative_ior": 1171456, "cumulative_iow": 0}, + "io_rx": None, + "io_wx": None, + "key": "name", + "memory": {"inactive_file": 118784, "limit": 16422871040, "usage": 31776768}, + "memory_inactive_file": 118784, + "memory_limit": 16422871040, + "memory_percent": None, + "memory_usage": 31776768, + "name": "prometheus-for-glances", + "network": {"cumulative_rx": 10392, "cumulative_tx": 0}, + "network_rx": None, + "network_tx": None, + "ports": "9090->9090/tcp", + "status": "running", + "uptime": "6 mins"}] Fields descriptions: @@ -256,11 +279,50 @@ Fields descriptions: * **io_wx**: Container IO bytes write rate (unit is *bytepersecond*) * **network_rx**: Container network RX bitrate (unit is *bitpersecond*) * **network_tx**: Container network TX bitrate (unit is *bitpersecond*) +* **ports**: Container ports (unit is *None*) * **uptime**: Container uptime (unit is *None*) * **engine**: Container engine (Docker and Podman are currently supported) (unit is *None*) * **pod_name**: Pod name (only with Podman) (unit is *None*) * **pod_id**: Pod ID (only with Podman) (unit is *None*) +Get a specific field:: + + # curl http://localhost:61208/api/4/containers/name + {"name": ["prometheus-for-glances"]} + +Get a specific item when field matches the given value:: + + # curl http://localhost:61208/api/4/containers/name/value/prometheus-for-glances + {"prometheus-for-glances": [{"command": "/bin/prometheus " + "--config.file=/etc/prometheus/prometheus.yml " + "--storage.tsdb.path=/prometheus", + "cpu": {"total": 0.0}, + "cpu_percent": 0.0, + "created": "2025-11-01T09:20:16.634313506Z", + "engine": "docker", + "id": "cbe33e3b3d30eedd1617b22723952c703e0105334b2e44a90fadf0bb0d1cbce9", + "image": ["prom/prometheus:latest"], + "io": {"cumulative_ior": 1171456, + "cumulative_iow": 0}, + "io_rx": None, + "io_wx": None, + "key": "name", + "memory": {"inactive_file": 118784, + "limit": 16422871040, + "usage": 31776768}, + "memory_inactive_file": 118784, + "memory_limit": 16422871040, + "memory_percent": None, + "memory_usage": 31776768, + "name": "prometheus-for-glances", + "network": {"cumulative_rx": 10392, + "cumulative_tx": 0}, + "network_rx": None, + "network_tx": None, + "ports": "9090->9090/tcp", + "status": "running", + "uptime": "6 mins"}]} + GET core -------- @@ -286,19 +348,19 @@ Get plugin stats:: # curl http://localhost:61208/api/4/cpu {"cpucore": 16, - "ctx_switches": 998318715, + "ctx_switches": 1105794859, "guest": 0.0, - "idle": 92.8, - "interrupts": 824822604, - "iowait": 0.1, + "idle": 92.5, + "interrupts": 908568634, + "iowait": 0.3, "irq": 0.0, "nice": 0.0, - "soft_interrupts": 348639599, + "soft_interrupts": 385380898, "steal": 0.0, "syscalls": 0, - "system": 3.1, - "total": 6.8, - "user": 3.9} + "system": 3.2, + "total": 7.4, + "user": 4.0} Fields descriptions: @@ -331,7 +393,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/cpu/total - {"total": 6.8} + {"total": 7.4} GET diskio ---------- @@ -341,14 +403,14 @@ Get plugin stats:: # curl http://localhost:61208/api/4/diskio [{"disk_name": "nvme0n1", "key": "disk_name", - "read_bytes": 35321641472, - "read_count": 2076215, + "read_bytes": 37580458496, + "read_count": 2225150, "read_latency": 0, - "read_time": 678295, - "write_bytes": 66537743360, - "write_count": 5836394, + "read_time": 734407, + "write_bytes": 73560740864, + "write_count": 6628318, "write_latency": 0, - "write_time": 5581004}, + "write_time": 6082869}, {"disk_name": "nvme0n1p1", "key": "disk_name", "read_bytes": 18111488, @@ -400,14 +462,14 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/diskio/disk_name/value/nvme0n1 {"nvme0n1": [{"disk_name": "nvme0n1", "key": "disk_name", - "read_bytes": 35321641472, - "read_count": 2076215, + "read_bytes": 37580458496, + "read_count": 2225150, "read_latency": 0, - "read_time": 678295, - "write_bytes": 66537743360, - "write_count": 5836394, + "read_time": 734407, + "write_bytes": 73560740864, + "write_count": 6628318, "write_latency": 0, - "write_time": 5581004}]} + "write_time": 6082869}]} GET folders ----------- @@ -434,14 +496,14 @@ Get plugin stats:: # curl http://localhost:61208/api/4/fs [{"device_name": "/dev/mapper/ubuntu--vg-ubuntu--lv", - "free": 711914008576, + "free": 712119742464, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", "options": "rw,relatime", "percent": 25.3, "size": 1003736440832, - "used": 240759926784}, + "used": 240554192896}, {"device_name": "zsfpool", "free": 41680896, "fs_type": "zfs", @@ -472,14 +534,14 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/fs/mnt_point/value// {"/": [{"device_name": "/dev/mapper/ubuntu--vg-ubuntu--lv", - "free": 711914008576, + "free": 712119742464, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", "options": "rw,relatime", "percent": 25.3, "size": 1003736440832, - "used": 240759926784}]} + "used": 240554192896}]} GET gpu ------- @@ -552,9 +614,9 @@ Get plugin stats:: # curl http://localhost:61208/api/4/load {"cpucore": 16, - "min1": 0.84619140625, - "min15": 1.6806640625, - "min5": 1.3681640625} + "min1": 1.615234375, + "min15": 1.08935546875, + "min5": 1.30419921875} Fields descriptions: @@ -566,7 +628,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/load/min1 - {"min1": 0.84619140625} + {"min1": 1.615234375} GET mem ------- @@ -574,16 +636,16 @@ GET mem Get plugin stats:: # curl http://localhost:61208/api/4/mem - {"active": 9787387904, - "available": 4854789504, - "buffers": 266203136, - "cached": 4649422464, - "free": 763551744, - "inactive": 3674578944, - "percent": 70.4, - "shared": 750358528, + {"active": 8491327488, + "available": 4636374400, + "buffers": 249085952, + "cached": 3882036864, + "free": 1404788736, + "inactive": 4348567552, + "percent": 71.8, + "shared": 769191936, "total": 16422871040, - "used": 11568081536} + "used": 11786496640} Fields descriptions: @@ -610,13 +672,13 @@ GET memswap Get plugin stats:: # curl http://localhost:61208/api/4/memswap - {"free": 2614173696, - "percent": 39.1, - "sin": 3562110976, - "sout": 12783652864, + {"free": 920166400, + "percent": 78.6, + "sin": 3890495488, + "sout": 14980149248, "time_since_update": 1, "total": 4294963200, - "used": 1680789504} + "used": 3374796800} Fields descriptions: @@ -641,18 +703,32 @@ Get plugin stats:: # curl http://localhost:61208/api/4/network [{"alias": None, "bytes_all": 0, - "bytes_all_gauge": 8564131509, + "bytes_all_gauge": 8929959073, "bytes_all_rate_per_sec": 0, "bytes_recv": 0, - "bytes_recv_gauge": 6937522590, + "bytes_recv_gauge": 7217084374, "bytes_recv_rate_per_sec": 0, "bytes_sent": 0, - "bytes_sent_gauge": 1626608919, + "bytes_sent_gauge": 1712874699, "bytes_sent_rate_per_sec": 0, "interface_name": "wlp0s20f3", "key": "interface_name", "speed": 0, - "time_since_update": 0.5493752956390381}] + "time_since_update": 0.3589339256286621}, + {"alias": None, + "bytes_all": 0, + "bytes_all_gauge": 10392, + "bytes_all_rate_per_sec": 0, + "bytes_recv": 0, + "bytes_recv_gauge": 0, + "bytes_recv_rate_per_sec": 0, + "bytes_sent": 0, + "bytes_sent_gauge": 10392, + "bytes_sent_rate_per_sec": 0, + "interface_name": "veth33b370c", + "key": "interface_name", + "speed": 10485760000, + "time_since_update": 0.3589339256286621}] Fields descriptions: @@ -674,25 +750,25 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/network/interface_name - {"interface_name": ["wlp0s20f3"]} + {"interface_name": ["wlp0s20f3", "veth33b370c"]} Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/network/interface_name/value/wlp0s20f3 {"wlp0s20f3": [{"alias": None, "bytes_all": 0, - "bytes_all_gauge": 8564131509, + "bytes_all_gauge": 8929959073, "bytes_all_rate_per_sec": 0, "bytes_recv": 0, - "bytes_recv_gauge": 6937522590, + "bytes_recv_gauge": 7217084374, "bytes_recv_rate_per_sec": 0, "bytes_sent": 0, - "bytes_sent_gauge": 1626608919, + "bytes_sent_gauge": 1712874699, "bytes_sent_rate_per_sec": 0, "interface_name": "wlp0s20f3", "key": "interface_name", "speed": 0, - "time_since_update": 0.5493752956390381}]} + "time_since_update": 0.3589339256286621}]} GET now ------- @@ -700,7 +776,7 @@ GET now Get plugin stats:: # curl http://localhost:61208/api/4/now - {"custom": "2025-10-31 17:41:39 CET", "iso": "2025-10-31T17:41:39+01:00"} + {"custom": "2025-11-01 10:26:27 CET", "iso": "2025-11-01T10:26:27+01:00"} Fields descriptions: @@ -710,7 +786,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/now/iso - {"iso": "2025-10-31T17:41:39+01:00"} + {"iso": "2025-11-01T10:26:27+01:00"} GET percpu ---------- @@ -722,7 +798,7 @@ Get plugin stats:: "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 41.0, + "idle": 25.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -730,14 +806,14 @@ Get plugin stats:: "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 9.0, - "total": 59.0, + "system": 6.0, + "total": 75.0, "user": 0.0}, {"cpu_number": 1, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 52.0, + "idle": 34.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -746,8 +822,8 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 0.0, - "total": 48.0, - "user": 0.0}] + "total": 66.0, + "user": 1.0}] Fields descriptions: @@ -783,7 +859,7 @@ Get plugin stats:: "port": 0, "refresh": 30, "rtt_warning": None, - "status": 0.008039, + "status": 0.005746, "timeout": 3}] Fields descriptions: @@ -811,7 +887,7 @@ Get a specific item when field matches the given value:: "port": 0, "refresh": 30, "rtt_warning": None, - "status": 0.008039, + "status": 0.005746, "timeout": 3}]} GET processcount @@ -820,7 +896,7 @@ GET processcount Get plugin stats:: # curl http://localhost:61208/api/4/processcount - {"pid_max": 0, "running": 1, "sleeping": 426, "thread": 2256, "total": 585} + {"pid_max": 0, "running": 1, "sleeping": 437, "thread": 2469, "total": 590} Fields descriptions: @@ -833,7 +909,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/processcount/total - {"total": 585} + {"total": 590} GET processlist --------------- @@ -865,84 +941,114 @@ Get plugin stats:: "--disable-features=CalculateNativeWinOcclusion,FontationsLinuxSystemFonts,ScreenAIOCREnabled,SpareRendererForSitePerProcess", "--variations-seed-version"], "cpu_percent": 0.0, - "cpu_times": {"children_system": 39.8, - "children_user": 46.0, + "cpu_times": {"children_system": 365.94, + "children_user": 209.41, "iowait": 0.0, - "system": 65.78, - "user": 1527.99}, + "system": 309.67, + "user": 3137.06}, "gids": {"effective": 1000, "real": 1000, "saved": 1000}, - "io_counters": [677320704, - 584089600, + "io_counters": [860003328, + 857522176, 0, 0, 0, - 55424000, + 264663040, + 425984, + 0, + 0, + 0, + 146366464, 1560576, 0, 0, 0, - 75624448, + 6549504, + 8192, + 0, + 0, + 0, + 187473920, 0, 0, 0, 0, - 217425920, - 380928, - 0, - 0, - 0, - 15147008, + 5561344, 0, 0, 0, 0, - 708527104, - 1009422336, + 2169856, + 8192, 0, 0, 0, - 9617408, + 37666816, + 1306624, + 0, + 0, + 0, + 798051328, + 1101725696, + 0, + 0, + 0, + 9732096, 0, 0, 0, 0, - 38131712, + 8621056, + 5234688, + 0, + 0, + 0, + 12394496, 0, 0, 0, 0, - 4743168, + 92167168, + 928555008, + 0, + 0, + 0, + 44052480, 0, 0, 0, 0, - 115712, + 14960640, 0, 0, 0, 0, - 72562688, - 928153600, - 0, - 0, - 0, - 10027008, + 2839552, 0, 0, 0, 0, - 13075456, + 15736832, + 0, + 0, + 0, + 0, + 4866048, + 0, + 0, + 0, + 0, + 13804544, 77824, 0, 0, 0, - 34919424, - 15900672, + 43334656, + 25112576, 0, 0, 0, - 276480, - 0, + 1704960, + 36864, 0, 0, 0, @@ -952,47 +1058,43 @@ Get plugin stats:: 0, 0], "key": "pid", - "memory_info": {"data": 3882950656, + "memory_info": {"data": 4822351872, "dirty": 0, "lib": 0, - "rss": 2363559936, - "shared": 125329408, + "rss": 2182926336, + "shared": 74330112, "text": 148733952, - "vms": 1524615458816}, - "memory_percent": 14.391880264073487, + "vms": 1526384009216}, + "memory_percent": 13.291989754307904, "name": "code", "nice": 0, - "num_threads": 60, + "num_threads": 62, "pid": 1211585, "status": "S", "time_since_update": 1, "username": "nicolargo"}, - {"cmdline": ["/snap/code/211/usr/share/code/code", - "/home/nicolargo/.vscode/extensions/ms-python.vscode-pylance-2025.9.1/dist/server.bundle.js", - "--cancellationReceive=file:e7a14392c4758265d7d3a71b1d463835c5e01b0740", - "--node-ipc", - "--clientProcessId=1211585"], + {"cmdline": ["/snap/firefox/7084/usr/lib/firefox/firefox"], "cpu_percent": 0.0, - "cpu_times": {"children_system": 0.51, - "children_user": 1.74, + "cpu_times": {"children_system": 1.17, + "children_user": 0.09, "iowait": 0.0, - "system": 13.96, - "user": 201.67}, + "system": 381.16, + "user": 1240.86}, "gids": {"effective": 1000, "real": 1000, "saved": 1000}, - "io_counters": [55424000, 1560576, 0, 0, 0], + "io_counters": [865858560, 2310123520, 0, 0, 0], "key": "pid", - "memory_info": {"data": 2138763264, + "memory_info": {"data": 1121800192, "dirty": 0, "lib": 0, - "rss": 1388883968, - "shared": 71200768, - "text": 148733952, - "vms": 1501606658048}, - "memory_percent": 8.457010742014571, - "name": "code", + "rss": 705474560, + "shared": 197472256, + "text": 610304, + "vms": 30212075520}, + "memory_percent": 4.295683490917797, + "name": "firefox", "nice": 0, - "num_threads": 16, - "pid": 1212589, + "num_threads": 164, + "pid": 1209239, "status": "S", "time_since_update": 1, "username": "nicolargo"}] @@ -1020,99 +1122,135 @@ Get plugin stats:: # curl http://localhost:61208/api/4/programlist [{"childrens": [1211585, - 1212589, - 1212999, 739161, - 1212793, + 1212589, + 1348985, + 1212999, + 1349000, + 1348984, + 1311079, 739044, 1213613, - 1211584, - 1212316, - 1212802, + 1349010, + 1349017, 739264, + 1211584, 739199, + 1212802, + 1212793, + 1212316, 739578, 739105, 739047, 739046], "cmdline": ["code"], "cpu_percent": 0, - "cpu_times": {"children_system": 3070.65, - "children_user": 6265.74, - "system": 1151.0200000000002, - "user": 12423.759999999998}, - "io_counters": [677320704, - 584089600, + "cpu_times": {"children_system": 3398.31, + "children_user": 6430.239999999999, + "system": 1547.4099999999996, + "user": 15293.210000000005}, + "io_counters": [860003328, + 857522176, 0, 0, 0, - 55424000, + 264663040, + 425984, + 0, + 0, + 0, + 146366464, 1560576, 0, 0, 0, - 75624448, + 6549504, + 8192, + 0, + 0, + 0, + 187473920, 0, 0, 0, 0, - 217425920, - 380928, - 0, - 0, - 0, - 15147008, + 5561344, 0, 0, 0, 0, - 708527104, - 1009422336, + 2169856, + 8192, 0, 0, 0, - 9617408, + 37666816, + 1306624, + 0, + 0, + 0, + 798051328, + 1101725696, + 0, + 0, + 0, + 9732096, 0, 0, 0, 0, - 38131712, + 8621056, + 5234688, + 0, + 0, + 0, + 12394496, 0, 0, 0, 0, - 4743168, + 92167168, + 928555008, + 0, + 0, + 0, + 44052480, 0, 0, 0, 0, - 115712, + 14960640, 0, 0, 0, 0, - 72562688, - 928153600, - 0, - 0, - 0, - 10027008, + 2839552, 0, 0, 0, 0, - 13075456, + 15736832, + 0, + 0, + 0, + 0, + 4866048, + 0, + 0, + 0, + 0, + 13804544, 77824, 0, 0, 0, - 34919424, - 15900672, + 43334656, + 25112576, 0, 0, 0, - 276480, - 0, + 1704960, + 36864, 0, 0, 0, @@ -1121,41 +1259,41 @@ Get plugin stats:: 0, 0, 0], - "memory_info": {"data": 15352049664, - "rss": 5592924160, - "shared": 965193728, - "text": 2379743232, - "vms": 18141696012288}, - "memory_percent": 34.05570284500025, + "memory_info": {"data": 20761034752, + "rss": 5454123008, + "shared": 1215102976, + "text": 3272146944, + "vms": 27128402255872}, + "memory_percent": 33.210533010432734, "name": "code", "nice": 0, - "nprocs": 16, - "num_threads": 291, + "nprocs": 22, + "num_threads": 360, "pid": "_", "status": "S", "time_since_update": 1, "username": "nicolargo"}, - {"childrens": [1225365], - "cmdline": ["cloudcode_cli"], + {"childrens": [1209239], + "cmdline": ["firefox"], "cpu_percent": 0, - "cpu_times": {"children_system": 0.0, - "children_user": 0.0, + "cpu_times": {"children_system": 1.17, + "children_user": 0.09, "iowait": 0.0, - "system": 3.12, - "user": 24.16}, - "io_counters": [397312, 0, 0, 0, 0], - "memory_info": {"data": 1312440320, + "system": 381.16, + "user": 1240.86}, + "io_counters": [865858560, 2310123520, 0, 0, 0], + "memory_info": {"data": 1121800192, "dirty": 0, "lib": 0, - "rss": 859901952, - "shared": 69767168, - "text": 35688448, - "vms": 2622726144}, - "memory_percent": 5.2360025838697695, - "name": "cloudcode_cli", + "rss": 705474560, + "shared": 197472256, + "text": 610304, + "vms": 30212075520}, + "memory_percent": 4.295683490917797, + "name": "firefox", "nice": 0, "nprocs": 1, - "num_threads": 20, + "num_threads": 164, "pid": "_", "status": "S", "time_since_update": 1, @@ -1191,109 +1329,19 @@ GET quicklook Get plugin stats:: # curl http://localhost:61208/api/4/quicklook - {"cpu": 6.8, + {"cpu": 7.4, "cpu_hz": 4475000000.0, - "cpu_hz_current": 636889500.0, + "cpu_hz_current": 693664187.5, "cpu_log_core": 16, "cpu_name": "13th Gen Intel(R) Core(TM) i7-13620H", "cpu_phys_core": 10, - "load": 10.5, - "mem": 70.4, + "load": 6.8, + "mem": 71.8, "percpu": [{"cpu_number": 0, "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": 9.0, - "total": 59.0, - "user": 0.0}, - {"cpu_number": 1, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 52.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": 48.0, - "user": 0.0}, - {"cpu_number": 2, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 53.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": 47.0, - "user": 0.0}, - {"cpu_number": 3, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 54.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": 46.0, - "user": 0.0}, - {"cpu_number": 4, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 32.0, - "interrupt": None, - "iowait": 2.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 16.0, - "total": 68.0, - "user": 3.0}, - {"cpu_number": 5, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 46.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 4.0, - "total": 54.0, - "user": 2.0}, - {"cpu_number": 6, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 40.0, + "idle": 25.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1302,13 +1350,103 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 6.0, - "total": 60.0, - "user": 7.0}, + "total": 75.0, + "user": 0.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": 0.0, + "total": 66.0, + "user": 1.0}, + {"cpu_number": 2, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 34.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 66.0, + "user": 0.0}, + {"cpu_number": 3, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 34.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 66.0, + "user": 0.0}, + {"cpu_number": 4, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 21.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 9.0, + "total": 79.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": 2.0, + "total": 68.0, + "user": 0.0}, + {"cpu_number": 6, + "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": 3.0, + "total": 75.0, + "user": 6.0}, {"cpu_number": 7, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 51.0, + "idle": 35.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1317,13 +1455,13 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 0.0, - "total": 49.0, - "user": 1.0}, + "total": 65.0, + "user": 0.0}, {"cpu_number": 8, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 50.0, + "idle": 33.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1332,13 +1470,13 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 1.0, - "total": 50.0, - "user": 2.0}, + "total": 67.0, + "user": 0.0}, {"cpu_number": 9, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 53.0, + "idle": 35.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1347,13 +1485,13 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 0.0, - "total": 47.0, - "user": 0.0}, + "total": 65.0, + "user": 1.0}, {"cpu_number": 10, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 52.0, + "idle": 32.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1361,14 +1499,14 @@ Get plugin stats:: "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 1.0, - "total": 48.0, + "system": 2.0, + "total": 68.0, "user": 1.0}, {"cpu_number": 11, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 54.0, + "idle": 35.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1377,13 +1515,13 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 0.0, - "total": 46.0, + "total": 65.0, "user": 0.0}, {"cpu_number": 12, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 52.0, + "idle": 34.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1392,28 +1530,28 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 1.0, - "total": 48.0, + "total": 66.0, "user": 1.0}, {"cpu_number": 13, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 52.0, + "idle": 32.0, "interrupt": None, - "iowait": 0.0, + "iowait": 1.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 1.0, - "total": 48.0, - "user": 1.0}, + "system": 0.0, + "total": 68.0, + "user": 2.0}, {"cpu_number": 14, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 52.0, + "idle": 34.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1422,13 +1560,13 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 1.0, - "total": 48.0, + "total": 66.0, "user": 1.0}, {"cpu_number": 15, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 52.0, + "idle": 34.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -1437,9 +1575,9 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 0.0, - "total": 48.0, - "user": 0.0}], - "swap": 39.1} + "total": 66.0, + "user": 1.0}], + "swap": 78.6} Fields descriptions: @@ -1477,14 +1615,14 @@ Get plugin stats:: "label": "Ambient", "type": "temperature_core", "unit": "C", - "value": 35, + "value": 39, "warning": 0}, {"critical": None, "key": "label", "label": "Ambient 3", "type": "temperature_core", "unit": "C", - "value": 29, + "value": 28, "warning": 0}] Fields descriptions: @@ -1548,7 +1686,7 @@ Get a specific item when field matches the given value:: "label": "Ambient", "type": "temperature_core", "unit": "C", - "value": 35, + "value": 39, "warning": 0}]} GET smart @@ -1592,7 +1730,7 @@ GET uptime Get plugin stats:: # curl http://localhost:61208/api/4/uptime - "18 days, 22:48:03" + "19 days, 15:32:51" GET version ----------- @@ -1637,8 +1775,8 @@ Get plugin stats:: # curl http://localhost:61208/api/4/wifi [{"key": "ssid", - "quality_level": -59.0, - "quality_link": 51.0, + "quality_level": -61.0, + "quality_link": 49.0, "ssid": "wlp0s20f3"}] Get a specific field:: @@ -1650,8 +1788,8 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/wifi/ssid/value/wlp0s20f3 {"wlp0s20f3": [{"key": "ssid", - "quality_level": -59.0, - "quality_link": 51.0, + "quality_level": -61.0, + "quality_link": 49.0, "ssid": "wlp0s20f3"}]} GET all stats @@ -1715,34 +1853,34 @@ GET stats history History of a plugin:: # curl http://localhost:61208/api/4/cpu/history - {"system": [["2025-10-31T16:41:40.974748+00:00", 3.1], - ["2025-10-31T16:41:42.076051+00:00", 1.1], - ["2025-10-31T16:41:43.125788+00:00", 1.1]], - "user": [["2025-10-31T16:41:40.974745+00:00", 3.9], - ["2025-10-31T16:41:42.076048+00:00", 1.3], - ["2025-10-31T16:41:43.125785+00:00", 1.3]]} + {"system": [["2025-11-01T09:26:28.555042+00:00", 3.2], + ["2025-11-01T09:26:29.627052+00:00", 1.0], + ["2025-11-01T09:26:30.662369+00:00", 1.0]], + "user": [["2025-11-01T09:26:28.555036+00:00", 4.0], + ["2025-11-01T09:26:29.627050+00:00", 1.7], + ["2025-11-01T09:26:30.662367+00:00", 1.7]]} Limit history to last 2 values:: # curl http://localhost:61208/api/4/cpu/history/2 - {"system": [["2025-10-31T16:41:42.076051+00:00", 1.1], - ["2025-10-31T16:41:43.125788+00:00", 1.1]], - "user": [["2025-10-31T16:41:42.076048+00:00", 1.3], - ["2025-10-31T16:41:43.125785+00:00", 1.3]]} + {"system": [["2025-11-01T09:26:29.627052+00:00", 1.0], + ["2025-11-01T09:26:30.662369+00:00", 1.0]], + "user": [["2025-11-01T09:26:29.627050+00:00", 1.7], + ["2025-11-01T09:26:30.662367+00:00", 1.7]]} History for a specific field:: # curl http://localhost:61208/api/4/cpu/system/history - {"system": [["2025-10-31T16:41:39.715798+00:00", 3.1], - ["2025-10-31T16:41:40.974748+00:00", 3.1], - ["2025-10-31T16:41:42.076051+00:00", 1.1], - ["2025-10-31T16:41:43.125788+00:00", 1.1]]} + {"system": [["2025-11-01T09:26:27.367614+00:00", 3.2], + ["2025-11-01T09:26:28.555042+00:00", 3.2], + ["2025-11-01T09:26:29.627052+00:00", 1.0], + ["2025-11-01T09:26:30.662369+00:00", 1.0]]} Limit history for a specific field to last 2 values:: # curl http://localhost:61208/api/4/cpu/system/history - {"system": [["2025-10-31T16:41:42.076051+00:00", 1.1], - ["2025-10-31T16:41:43.125788+00:00", 1.1]]} + {"system": [["2025-11-01T09:26:29.627052+00:00", 1.0], + ["2025-11-01T09:26:30.662369+00:00", 1.0]]} GET limits (used for thresholds) -------------------------------- @@ -1754,6 +1892,7 @@ All limits/thresholds:: "amps": {"amps_disable": ["False"], "history_size": 1200.0}, "containers": {"containers_all": ["False"], "containers_disable": ["False"], + "containers_disable_stats": ["command"], "containers_max_name_size": 20.0, "history_size": 1200.0}, "core": {"history_size": 1200.0}, diff --git a/docs/man/glances.1 b/docs/man/glances.1 index d590e06a..e380655a 100644 --- a/docs/man/glances.1 +++ b/docs/man/glances.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "GLANCES" "1" "Oct 31, 2025" "4.4.0_dev7" "Glances" +.TH "GLANCES" "1" "Nov 01, 2025" "4.4.0_dev7" "Glances" .SH NAME glances \- An eye on your system .SH SYNOPSIS diff --git a/glances/outputs/static/js/components/plugin-containers.vue b/glances/outputs/static/js/components/plugin-containers.vue index d7860cac..bed2a9fd 100644 --- a/glances/outputs/static/js/components/plugin-containers.vue +++ b/glances/outputs/static/js/components/plugin-containers.vue @@ -59,6 +59,9 @@ : $filters.bytes(container.limit) }} + + {{ container.ports }} + {{ container.command }} @@ -94,6 +97,7 @@ IOWps RXps TXps + Ports Command @@ -159,6 +163,9 @@ : $filters.bits(container.network_tx) }} + + {{ container.ports }} + {{ container.command }} @@ -228,6 +235,7 @@ export default { io_wx: containerData.io_wx, network_rx: containerData.network_rx, network_tx: containerData.network_tx, + ports: containerData.ports, command: containerData.command, image: containerData.image, engine: containerData.engine, diff --git a/glances/outputs/static/public/glances.js b/glances/outputs/static/public/glances.js index f88e3f65..7c7978ef 100644 --- a/glances/outputs/static/public/glances.js +++ b/glances/outputs/static/public/glances.js @@ -53,4 +53,4 @@ let pp;const dp="undefined"!=typeof window&&window.trustedTypes;if(dp)try{pp=dp. * Licensed under the MIT license */ -const fd="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function hd(t,e,r,n){t.addEventListener?t.addEventListener(e,r,n):t.attachEvent&&t.attachEvent("on".concat(e),r)}function gd(t,e,r,n){t.removeEventListener?t.removeEventListener(e,r,n):t.detachEvent&&t.detachEvent("on".concat(e),r)}function bd(t,e){const r=e.slice(0,e.length-1);for(let e=0;e=0;)e[r-1]+=",",e.splice(r,1),r=e.lastIndexOf("");return e}const vd={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":fd?173:189,"=":fd?61:187,";":fd?59:186,"'":222,"[":219,"]":221,"\\":220},xd={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},wd={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},_d={16:!1,18:!1,17:!1,91:!1},kd={};for(let t=1;t<20;t++)vd["f".concat(t)]=111+t;let Sd=[],Ad=null,Ed="all";const Cd=new Map,Td=t=>vd[t.toLowerCase()]||xd[t.toLowerCase()]||t.toUpperCase().charCodeAt(0);function Od(t){Ed=t||"all"}function Dd(){return Ed||"all"}function Id(t){if(void 0===t)Object.keys(kd).forEach((t=>{Array.isArray(kd[t])&&kd[t].forEach((t=>Pd(t))),delete kd[t]})),Md(null);else if(Array.isArray(t))t.forEach((t=>{t.key&&Pd(t)}));else if("object"==typeof t)t.key&&Pd(t);else if("string"==typeof t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{let{key:e,scope:r,method:n,splitKey:i="+"}=t;yd(e).forEach((t=>{const e=t.split(i),o=e.length,s=e[o-1],a="*"===s?"*":Td(s);if(!kd[a])return;r||(r=Dd());const l=o>1?bd(xd,e):[],c=[];kd[a]=kd[a].filter((t=>{const e=(!n||t.method===n)&&t.scope===r&&function(t,e){const r=t.length>=e.length?t:e,n=t.length>=e.length?e:t;let i=!0;for(let t=0;tMd(t)))}))};function jd(t,e,r,n){if(e.element!==n)return;let i;if(e.scope===r||"all"===e.scope){i=e.mods.length>0;for(const t in _d)Object.prototype.hasOwnProperty.call(_d,t)&&(!_d[t]&&e.mods.indexOf(+t)>-1||_d[t]&&-1===e.mods.indexOf(+t))&&(i=!1);(0!==e.mods.length||_d[16]||_d[18]||_d[17]||_d[91])&&!i&&"*"!==e.shortcut||(e.keys=[],e.keys=e.keys.concat(Sd),!1===e.method(t,e)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function Nd(t,e){const r=kd["*"];let n=t.keyCode||t.which||t.charCode;if(!Ld.filter.call(this,t))return;if(93!==n&&224!==n||(n=91),-1===Sd.indexOf(n)&&229!==n&&Sd.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach((e=>{const r=wd[e];t[e]&&-1===Sd.indexOf(r)?Sd.push(r):!t[e]&&Sd.indexOf(r)>-1?Sd.splice(Sd.indexOf(r),1):"metaKey"===e&&t[e]&&(Sd=Sd.filter((t=>t in wd||t===n)))})),n in _d){_d[n]=!0;for(const t in xd)xd[t]===n&&(Ld[t]=!0);if(!r)return}for(const e in _d)Object.prototype.hasOwnProperty.call(_d,e)&&(_d[e]=t[wd[e]]);t.getModifierState&&(!t.altKey||t.ctrlKey)&&t.getModifierState("AltGraph")&&(-1===Sd.indexOf(17)&&Sd.push(17),-1===Sd.indexOf(18)&&Sd.push(18),_d[17]=!0,_d[18]=!0);const i=Dd();if(r)for(let n=0;n1&&(i=bd(xd,t)),(t="*"===(t=t[t.length-1])?"*":Td(t))in kd||(kd[t]=[]),kd[t].push({keyup:l,keydown:c,scope:o,mods:i,shortcut:n[a],method:r,key:n[a],splitKey:u,element:s});if(void 0!==s&&window){if(!Cd.has(s)){const t=function(){return Nd(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,s)},e=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;Nd(t,s),function(t){let e=t.keyCode||t.which||t.charCode;const r=Sd.indexOf(e);if(r>=0&&Sd.splice(r,1),t.key&&"meta"===t.key.toLowerCase()&&Sd.splice(0,Sd.length),93!==e&&224!==e||(e=91),e in _d){_d[e]=!1;for(const t in xd)xd[t]===e&&(Ld[t]=!1)}}(t)};Cd.set(s,{keydownListener:t,keyupListenr:e,capture:p}),hd(s,"keydown",t,p),hd(s,"keyup",e,p)}if(!Ad){const t=()=>{Sd=[]};Ad={listener:t,capture:p},hd(window,"focus",t,p)}}}function Md(t){const e=Object.values(kd).flat();if(e.findIndex((e=>{let{element:r}=e;return r===t}))<0){const{keydownListener:e,keyupListenr:r,capture:n}=Cd.get(t)||{};e&&r&&(gd(t,"keyup",r,n),gd(t,"keydown",e,n),Cd.delete(t))}if(e.length<=0||Cd.size<=0){if(Object.keys(Cd).forEach((t=>{const{keydownListener:e,keyupListenr:r,capture:n}=Cd.get(t)||{};e&&r&&(gd(t,"keyup",r,n),gd(t,"keydown",e,n),Cd.delete(t))})),Cd.clear(),Object.keys(kd).forEach((t=>delete kd[t])),Ad){const{listener:t,capture:e}=Ad;gd(window,"focus",t,e),Ad=null}}}const Rd={getPressedKeyString:function(){return Sd.map((t=>{return e=t,Object.keys(vd).find((t=>vd[t]===e))||(t=>Object.keys(xd).find((e=>xd[e]===t)))(t)||String.fromCharCode(t);var e}))},setScope:Od,getScope:Dd,deleteScope:function(t,e){let r,n;t||(t=Dd());for(const e in kd)if(Object.prototype.hasOwnProperty.call(kd,e))for(r=kd[e],n=0;n{let{element:e}=t;return Md(e)}))}else n++;Dd()===t&&Od(e||"all")},getPressedKeyCodes:function(){return Sd.slice(0)},getAllKeyCodes:function(){const t=[];return Object.keys(kd).forEach((e=>{kd[e].forEach((e=>{let{key:r,scope:n,mods:i,shortcut:o}=e;t.push({scope:n,shortcut:o,mods:i,keys:r.split("+").map((t=>Td(t)))})}))})),t},isPressed:function(t){return"string"==typeof t&&(t=Td(t)),-1!==Sd.indexOf(t)},filter:function(t){const e=t.target||t.srcElement,{tagName:r}=e;let n=!0;const i="INPUT"===r&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||"TEXTAREA"===r||"SELECT"===r)&&!e.readOnly)&&(n=!1),n},trigger:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(kd).forEach((r=>{kd[r].filter((r=>r.scope===e&&r.shortcut===t)).forEach((t=>{t&&t.method&&t.method()}))}))},unbind:Id,keyMap:vd,modifier:xd,modifierMap:wd};for(const t in Rd)Object.prototype.hasOwnProperty.call(Rd,t)&&(Ld[t]=Rd[t]);if("undefined"!=typeof window){const t=window.hotkeys;Ld.noConflict=e=>(e&&window.hotkeys===Ld&&(window.hotkeys=t),Ld),window.hotkeys=Ld}const qd=Ra({args:void 0,config:void 0,data:void 0,status:"IDLE"});var Bd=r(4644),$d=r.n(Bd);const Ud=new class{limits={};limitSuffix=["critical","careful","warning"];setLimits(t){this.limits=t}getLimit(t,e){return null!=this.limits[t]&&null!=this.limits[t][e]?this.limits[t][e]:null}getAlert(t,e,r,n,i){var o=(i=i||!1)?"_log":"",s=100*(r=r||0)/(n=n||100);if(null!=this.limits[t])for(var a=0;a=this.limits[t][l]){var c=l.lastIndexOf("_");return l.substring(c+1)+o}}return"ok"+o}getAlertLog(t,e,r,n){return this.getAlert(t,e,r,n,!0)}};const Fd=new class{data=void 0;init(t=60){let e;const r=()=>(qd.status="PENDING",Promise.all([fetch("api/4/all",{method:"GET"}).then((t=>t.json())),fetch("api/4/all/views",{method:"GET"}).then((t=>t.json()))]).then((t=>{const e={stats:t[0],views:t[1],isBsd:"FreeBSD"===t[0].system?.os_name,isLinux:"Linux"===t[0].system?.os_name,isSunOS:"SunOS"===t[0].system?.os_name,isMac:"Darwin"===t[0].system?.os_name,isWindows:"Windows"===t[0].system?.os_name};this.data=e,qd.data=e,qd.status="SUCCESS"})).catch((t=>{console.log(t),qd.status="FAILURE"})).then((()=>{e&&clearTimeout(e),e=setTimeout(r,1e3*t)})));r(),fetch("api/4/all/limits",{method:"GET"}).then((t=>t.json())).then((t=>{Ud.setLimits(t)})),fetch("api/4/args",{method:"GET"}).then((t=>t.json())).then(((t={})=>{qd.args={...qd.args,...t}})),fetch("api/4/config",{method:"GET"}).then((t=>t.json())).then(((t={})=>{qd.config={...qd.config,...t}}))}getData(){return this.data}};const zd=new class{constructor(){this.favico=new($d())({animation:"none"})}badge(t){this.favico.badge(t)}reset(){this.favico.reset()}},Hd={key:0},Vd={class:"container-fluid"},Gd={class:"row"},Wd={class:"col-sm-12 col-lg-24 title"},Kd={class:"row"},Xd={class:"col-sm-12 col-lg-24"},Qd={class:"table table-sm table-borderless table-striped table-hover"};const Zd={data:()=>({help:void 0}),mounted(){fetch("api/4/help",{method:"GET"}).then((t=>t.json())).then((t=>this.help=t))}};var Yd=r(6262);const Jd=(0,Yd.A)(Zd,[["render",function(t,e,r,n,i,o){return i.help?(xu(),Au("div",Hd,[Iu("div",Vd,[Iu("div",Gd,[Iu("div",Wd,As(i.help.version)+" "+As(i.help.psutil_version),1)]),e[0]||(e[0]=Iu("div",{class:"row"}," ",-1)),Iu("div",Kd,[Iu("div",Xd,As(i.help.configuration_file),1)]),e[1]||(e[1]=Iu("div",{class:"row"}," ",-1))]),Iu("table",Qd,[Iu("thead",null,[Iu("tr",null,[Iu("th",null,As(i.help.header_sort.replace(":","")),1),Iu("th",null,As(i.help.header_show_hide.replace(":","")),1),Iu("th",null,As(i.help.header_toggle.replace(":","")),1),Iu("th",null,As(i.help.header_miscellaneous.replace(":","")),1)])]),Iu("tbody",null,[Iu("tr",null,[Iu("td",null,As(i.help.sort_auto),1),Iu("td",null,As(i.help.show_hide_application_monitoring),1),Iu("td",null,As(i.help.toggle_bits_bytes),1),Iu("td",null,As(i.help.misc_erase_process_filter),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_cpu),1),Iu("td",null,As(i.help.show_hide_diskio),1),Iu("td",null,As(i.help.toggle_count_rate),1),Iu("td",null,As(i.help.misc_generate_history_graphs),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_io_rate),1),Iu("td",null,As(i.help.show_hide_containers),1),Iu("td",null,As(i.help.toggle_used_free),1),Iu("td",null,As(i.help.misc_help),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_mem),1),Iu("td",null,As(i.help.show_hide_top_extended_stats),1),Iu("td",null,As(i.help.toggle_bar_sparkline),1),Iu("td",null,As(i.help.misc_accumulate_processes_by_program),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_process_name),1),Iu("td",null,As(i.help.show_hide_filesystem),1),Iu("td",null,As(i.help.toggle_separate_combined),1),e[2]||(e[2]=Iu("td",null," ",-1))]),Iu("tr",null,[Iu("td",null,As(i.help.sort_cpu_times),1),Iu("td",null,As(i.help.show_hide_gpu),1),Iu("td",null,As(i.help.toggle_live_cumulative),1),Iu("td",null,As(i.help.misc_reset_processes_summary_min_max),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_user),1),Iu("td",null,As(i.help.show_hide_ip),1),Iu("td",null,As(i.help.toggle_linux_percentage),1),Iu("td",null,As(i.help.misc_quit),1)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_tcp_connection),1),Iu("td",null,As(i.help.toggle_cpu_individual_combined),1),Iu("td",null,As(i.help.misc_reset_history),1)]),Iu("tr",null,[e[4]||(e[4]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_alert),1),Iu("td",null,As(i.help.toggle_gpu_individual_combined),1),Iu("td",null,As(i.help.misc_delete_warning_alerts),1)]),Iu("tr",null,[e[5]||(e[5]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_network),1),Iu("td",null,As(i.help.toggle_short_full),1),Iu("td",null,As(i.help.misc_delete_warning_and_critical_alerts),1)]),Iu("tr",null,[e[6]||(e[6]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.sort_cpu_times),1),e[7]||(e[7]=Iu("td",null," ",-1)),e[8]||(e[8]=Iu("td",null," ",-1))]),Iu("tr",null,[e[9]||(e[9]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_irq),1),e[10]||(e[10]=Iu("td",null," ",-1)),e[11]||(e[11]=Iu("td",null," ",-1))]),Iu("tr",null,[e[12]||(e[12]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_raid_plugin),1),e[13]||(e[13]=Iu("td",null," ",-1)),e[14]||(e[14]=Iu("td",null," ",-1))]),Iu("tr",null,[e[15]||(e[15]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_sensors),1),e[16]||(e[16]=Iu("td",null," ",-1)),e[17]||(e[17]=Iu("td",null," ",-1))]),Iu("tr",null,[e[18]||(e[18]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_wifi_module),1),e[19]||(e[19]=Iu("td",null," ",-1)),e[20]||(e[20]=Iu("td",null," ",-1))]),Iu("tr",null,[e[21]||(e[21]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_processes),1),e[22]||(e[22]=Iu("td",null," ",-1)),e[23]||(e[23]=Iu("td",null," ",-1))]),Iu("tr",null,[e[24]||(e[24]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_left_sidebar),1),e[25]||(e[25]=Iu("td",null," ",-1)),e[26]||(e[26]=Iu("td",null," ",-1))]),Iu("tr",null,[e[27]||(e[27]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_quick_look),1),e[28]||(e[28]=Iu("td",null," ",-1)),e[29]||(e[29]=Iu("td",null," ",-1))]),Iu("tr",null,[e[30]||(e[30]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_cpu_mem_swap),1),e[31]||(e[31]=Iu("td",null," ",-1)),e[32]||(e[32]=Iu("td",null," ",-1))]),Iu("tr",null,[e[33]||(e[33]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_all),1),e[34]||(e[34]=Iu("td",null," ",-1)),e[35]||(e[35]=Iu("td",null," ",-1))])])]),e[36]||(e[36]=Mu('
 

For an exhaustive list of key bindings, click here.

 

Press h to came back to Glances.

',5))])):Ru("v-if",!0)}]]),tm={id:"alerts",class:"plugin"},em={key:0,class:"title"},rm={key:1,class:"title"},nm={class:"table table-sm table-borderless"},im={scope:"row"},om={scope:"row"},sm={scope:"row"};var am=r(2543);const lm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.alert},alerts(){return(this.stats||[]).map((t=>{const e={};if(e.state=t.state,e.type=t.type,e.begin=1e3*t.begin,e.end=1e3*t.end,e.ongoing=-1==t.end,e.min=t.min,e.avg=t.avg,e.max=t.max,t.top.length>0&&(e.top=": "+t.top.join(", ")),!e.ongoing){const t=e.end-e.begin,r=parseInt(t/1e3%60),n=parseInt(t/6e4%60),i=parseInt(t/36e5%24);e.duration=(0,am.padStart)(i,2,"0")+":"+(0,am.padStart)(n,2,"0")+":"+(0,am.padStart)(r,2,"0")}return e}))},hasAlerts(){return this.countAlerts>0},countAlerts(){return this.alerts.length},hasOngoingAlerts(){return this.countOngoingAlerts>0},countOngoingAlerts(){return this.alerts.filter((({ongoing:t})=>t)).length}},watch:{countOngoingAlerts(){this.countOngoingAlerts?zd.badge(this.countOngoingAlerts):zd.reset()}},methods:{formatDate(t){const e=(new Date).getTimezoneOffset(),r=Math.trunc(Math.abs(e)/60),n=Math.abs(e%60);let i=e<=0?"+":"-";i+=String(r).padStart(2,"0")+String(n).padStart(2,"0");const o=new Date(t);return String(o.getFullYear())+"-"+String(o.getMonth()+1).padStart(2,"0")+"-"+String(o.getDate()).padStart(2,"0")+" "+String(o.getHours()).padStart(2,"0")+":"+String(o.getMinutes()).padStart(2,"0")+":"+String(o.getSeconds()).padStart(2,"0")+"("+i+")"},clear(){fetch("api/4/events/clear/all",{method:"POST",headers:{"Content-Type":"application/json"}}).then((t=>t.json())).then((t=>product.value=t))}}},cm=(0,Yd.A)(lm,[["render",function(t,e,r,n,i,o){return xu(),Au("section",tm,[o.hasAlerts?(xu(),Au("span",em,[Lu(" Warning or critical alerts (last "+As(o.countAlerts)+" entries) ",1),Iu("span",null,[Iu("button",{class:"button",onClick:e[0]||(e[0]=t=>o.clear())},"Clear alerts")])])):(xu(),Au("span",rm,"No warning or critical alert detected")),Iu("table",nm,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.alerts,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",im,[Iu("span",null,As(o.formatDate(e.begin)),1)]),Iu("td",om,[Iu("span",null,"("+As(e.ongoing?"ongoing":e.duration)+")",1)]),Iu("td",sm,[Al(Iu("span",null,As(e.state)+" on ",513),[[xp,!e.ongoing]]),Iu("span",{class:xs(e.state.toLowerCase())},As(e.type),3),Iu("span",null,"("+As(t.$filters.number(e.max,1))+")",1),Iu("span",null,As(e.top),1)])])))),128))])])])}]]),um={key:0,id:"cloud",class:"plugin"},pm={class:"title"};const dm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.cloud},provider(){return void 0!==this.stats.id?`${stats.platform}`:null},instance(){const{stats:t}=this;return void 0!==this.stats.id?`${t.type} instance ${t.name} (${t.region})`:null}}},mm=(0,Yd.A)(dm,[["render",function(t,e,r,n,i,o){return o.instance||o.provider?(xu(),Au("section",um,[Iu("span",pm,As(o.provider),1),Lu(" "+As(o.instance),1)])):Ru("v-if",!0)}]]),fm={id:"connections",class:"plugin"},hm={class:"table table-sm table-borderless margin-bottom"},gm={class:"text-end"},bm={class:"text-end"},ym={class:"text-end"},vm={class:"text-end"};const xm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.connections},view(){return this.data.views.connections},listen(){return this.stats.LISTEN},initiated(){return this.stats.initiated},established(){return this.stats.ESTABLISHED},terminated(){return this.stats.terminated},tracked(){return{count:this.stats.nf_conntrack_count,max:this.stats.nf_conntrack_max}}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},wm=(0,Yd.A)(xm,[["render",function(t,e,r,n,i,o){return xu(),Au("section",fm,[Iu("table",hm,[e[5]||(e[5]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"TCP CONNECTIONS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("td",{scope:"row"},"Listen",-1)),Iu("td",gm,As(o.listen),1)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"Initiated",-1)),Iu("td",bm,As(o.initiated),1)]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"Established",-1)),Iu("td",ym,As(o.established),1)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"Terminated",-1)),Iu("td",vm,As(o.terminated),1)]),Iu("tr",null,[e[4]||(e[4]=Iu("td",{scope:"row"},"Tracked",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("nf_conntrack_percent")])},As(o.tracked.count)+"/"+As(o.tracked.max),3)])])])])}]]),_m={id:"cpu",class:"plugin"},km={class:"table-responsive"},Sm={class:"table-sm table-borderless"},Am={class:"justify-content-between"},Em={scope:"col"},Cm={class:"table table-sm table-borderless"},Tm={key:0,scope:"col"},Om={class:"d-none d-xl-block d-xxl-block"},Dm={class:"table table-sm table-borderless"},Im={scope:"col"},Pm={scope:"col",class:"text-end"},jm={scope:"col"},Nm={scope:"col",class:"text-end"},Lm={scope:"col"},Mm={scope:"col",class:"text-end"},Rm={key:0,scope:"col"},qm={scope:"col"},Bm={class:"d-none d-xxl-block"},$m={class:"table table-sm table-borderless"},Um={key:0,scope:"col"},Fm={scope:"col"},zm={scope:"col",class:"text-end"},Hm={key:0,scope:"col"},Vm={key:1,scope:"col",class:"text-end"},Gm={key:0,scope:"col"},Wm={key:1,scope:"col",class:"text-end"};const Km={props:{data:{type:Object}},computed:{stats(){return this.data.stats.cpu},view(){return this.data.views.cpu},isLinux(){return this.data.isLinux},isSunOS(){return this.data.isSunOS},isWindows(){return this.data.isWindows},total(){return this.stats.total},user(){return this.stats.user},system(){return this.stats.system},idle(){return this.stats.idle},nice(){return this.stats.nice},irq(){return this.stats.irq},iowait(){return this.stats.iowait},dpc(){return this.stats.dpc},steal(){return this.stats.steal},guest(){return this.stats.guest},ctx_switches(){const{stats:t}=this;return t.ctx_switches?Math.floor(t.ctx_switches/t.time_since_update):null},interrupts(){const{stats:t}=this;return t.interrupts?Math.floor(t.interrupts/t.time_since_update):null},soft_interrupts(){const{stats:t}=this;return t.soft_interrupts?Math.floor(t.soft_interrupts/t.time_since_update):null},syscalls(){const{stats:t}=this;return t.syscalls?Math.floor(t.syscalls/t.time_since_update):null}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},Xm=(0,Yd.A)(Km,[["render",function(t,e,r,n,i,o){return xu(),Au("section",_m,[Ru(" d-none d-xxl-block "),Iu("div",km,[Iu("table",Sm,[Iu("tbody",null,[Iu("tr",Am,[Iu("td",Em,[Iu("table",Cm,[Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"CPU",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("total")])},[Iu("span",null,As(o.total)+"%",1)],2)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"col"},"user:",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("user")])},[Iu("span",null,As(o.user)+"%",1)],2)]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"col"},"system:",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("system")])},[Iu("span",null,As(o.system)+"%",1)],2)]),Iu("tr",null,[null!=o.iowait?(xu(),Au("td",Tm,"iowait:")):Ru("v-if",!0),null!=o.iowait?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("iowait")])},[Iu("span",null,As(o.iowait)+"%",1)],2)):Ru("v-if",!0)])])])]),Iu("td",null,[Iu("template",Om,[Iu("table",Dm,[Iu("tbody",null,[Iu("tr",null,[Al(Iu("td",Im,"idle:",512),[[xp,null!=o.idle]]),Al(Iu("td",Pm,[Iu("span",null,As(o.idle)+"%",1)],512),[[xp,null!=o.idle]])]),Iu("tr",null,[Al(Iu("td",jm,"irq:",512),[[xp,null!=o.irq]]),Al(Iu("td",Nm,[Iu("span",null,As(o.irq)+"%",1)],512),[[xp,null!=o.irq]])]),Iu("tr",null,[Al(Iu("td",Lm,"nice:",512),[[xp,null!=o.nice]]),Al(Iu("td",Mm,[Iu("span",null,As(o.nice)+"%",1)],512),[[xp,null!=o.nice]])]),Iu("tr",null,[null==o.iowait&&null!=o.dpc?(xu(),Au("td",Rm,"dpc:")):Ru("v-if",!0),null==o.iowait&&null!=o.dpc?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("dpc")])},[Iu("span",null,As(o.dpc)+"%",1)],2)):Ru("v-if",!0),Al(Iu("td",qm,"steal:",512),[[xp,null!=o.steal]]),Al(Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("steal")])},[Iu("span",null,As(o.steal)+"%",1)],2),[[xp,null!=o.steal]])])])])])]),Iu("td",null,[Iu("template",Bm,[Iu("table",$m,[Iu("tbody",null,[Iu("tr",null,[null!=o.nice&&null!=o.ctx_switches?(xu(),Au("td",Um," ctx_sw:")):Ru("v-if",!0),null!=o.nice&&null!=o.ctx_switches?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("ctx_switches")])},[Iu("span",null,As(o.ctx_switches),1)],2)):Ru("v-if",!0)]),Iu("tr",null,[Al(Iu("td",Fm,"inter:",512),[[xp,null!=o.interrupts]]),Al(Iu("td",zm,[Iu("span",null,As(o.interrupts),1)],512),[[xp,null!=o.interrupts]])]),Iu("tr",null,[o.isWindows||o.isSunOS||null==o.soft_interrupts?Ru("v-if",!0):(xu(),Au("td",Hm,"sw_int: ")),o.isWindows||o.isSunOS||null==o.soft_interrupts?Ru("v-if",!0):(xu(),Au("td",Vm,[Iu("span",null,As(o.soft_interrupts),1)]))]),Iu("tr",null,[o.isLinux&&null!=o.guest?(xu(),Au("td",Gm,"guest:")):Ru("v-if",!0),o.isLinux&&null!=o.guest?(xu(),Au("td",Wm,[Iu("span",null,As(o.guest)+"%",1)])):Ru("v-if",!0)])])])])])])])])])])}]]),Qm={key:0,id:"diskio",class:"plugin"},Zm={class:"table table-sm table-borderless margin-bottom"},Ym={scope:"col",class:"text-end w-25"},Jm={scope:"col",class:"text-end w-25"},tf={scope:"col",class:"text-end w-25"},ef={scope:"col",class:"text-end w-25"},rf={scope:"col",class:"text-end w-25"},nf={scope:"col",class:"text-end w-25"},of={scope:"row",class:"text-truncate"};var sf=r(4728),af=r.n(sf);function lf(t,e){return cf(t=8*Math.round(t),e)+"b"}function cf(t,e){if(e=e||!1,isNaN(parseFloat(t))||!isFinite(t)||0==t)return t;const r=["Y","Z","E","P","T","G","M","K"],n={Y:12089258196146292e8,Z:11805916207174113e5,E:0x1000000000000000,P:0x4000000000000,T:1099511627776,G:1073741824,M:1048576,K:1024};for(var i=0;i1){var a=0;return s<10?a=2:s<100&&(a=1),e?a="MK"==o?0:(0,am.min)([1,a]):"K"==o&&(a=0),parseFloat(s).toFixed(a)+o}}return t.toFixed(0)}function uf(t){return void 0===t||""===t?"?":t}function pf(t,e,r){return e=e||0,r=r||" ",String(t).padStart(e,r)}function df(t,e){return"function"!=typeof t.slice&&(t=String(t)),t.slice(0,e)}function mf(t,e,r=!0){return e=e||8,t.length>e?r?t.substring(0,e-1)+"_":"_"+t.substring(t.length-e+1):t}function ff(t){if(void 0===t)return t;var e=function(t){var e=document.createElement("div");return e.innerText=t,e.innerHTML}(t),r=e.replace(/\n/g,"
");return af()(r)}function hf(t,e){return void 0===t||isNaN(t)?"-":new Intl.NumberFormat("en-US","number"==typeof e?{maximumFractionDigits:e}:e).format(t)}function gf(t){for(var e=0,r=0;r`${t}: ${e}`)).join(" / ")}const vf={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.diskio},view(){return this.data.views.diskio},disks(){const t=this.stats.map((t=>({name:t.disk_name,alias:void 0!==t.alias?t.alias:null,bitrate:{txps:cf(t.read_bytes_rate_per_sec),rxps:cf(t.write_bytes_rate_per_sec)},count:{txps:cf(t.read_count_rate_per_sec),rxps:cf(t.write_count_rate_per_sec)},latency:{txps:cf(t.read_latency),rxps:cf(t.write_latency)}}))).filter((t=>{const e=this.view[t.name].read_bytes_rate_per_sec,r=this.view[t.name].write_bytes_rate_per_sec;return!(e&&!1!==e.hidden||r&&!1!==r.hidden)}));return(0,am.orderBy)(t,["name"])},hasDisks(){return this.disks.length>0}},methods:{getDecoration(t,e){return null==this.view[t][e]?null==this.view[e]?void 0:this.view[e].decoration.toLowerCase():this.view[t][e].decoration.toLowerCase()}}},xf=(0,Yd.A)(vf,[["render",function(t,e,r,n,i,o){return o.hasDisks?(xu(),Au("section",Qm,[Iu("table",Zm,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"DISK I/O",-1)),Al(Iu("th",Ym,"Rps",512),[[xp,!o.args.diskio_iops&&!o.args.diskio_latency]]),Al(Iu("th",Jm,"Wps",512),[[xp,!o.args.diskio_iops&&!o.args.diskio_latency]]),Al(Iu("th",tf,"ms/opR",512),[[xp,o.args.diskio_latency]]),Al(Iu("th",ef,"ms/opW",512),[[xp,o.args.diskio_latency]]),Al(Iu("th",rf,"IORps",512),[[xp,o.args.diskio_iops]]),Al(Iu("th",nf,"IOWps",512),[[xp,o.args.diskio_iops]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.disks,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",of,As(t.$filters.minSize(e.alias?e.alias:e.name,16)),1),Al(Iu("td",{class:xs(["text-end w-25",o.getDecoration(e.name,"write_bytes_rate_per_sec")])},As(e.bitrate.txps),3),[[xp,!o.args.diskio_iops&&!o.args.diskio_latency]]),Al(Iu("td",{class:xs(["text-end w-25",o.getDecoration(e.name,"read_bytes_rate_per_sec")])},As(e.bitrate.rxps),3),[[xp,!o.args.diskio_iops&&!o.args.diskio_latency]]),Al(Iu("td",{class:xs(["text-end w-25",o.getDecoration(e.name,"write_latency")])},As(e.latency.txps),3),[[xp,o.args.diskio_latency]]),Al(Iu("td",{class:xs(["text-end w-25",o.getDecoration(e.name,"read_latency")])},As(e.latency.rxps),3),[[xp,o.args.diskio_latency]]),Al(Iu("td",{class:"text-end w-25"},As(e.count.txps),513),[[xp,o.args.diskio_iops]]),Al(Iu("td",{class:"text-end w-25"},As(e.count.rxps),513),[[xp,o.args.diskio_iops]])])))),128))])])])):Ru("v-if",!0)}]]),wf={key:0,id:"containers",class:"plugin"},_f={class:"table-responsive d-md-none"},kf={class:"table table-sm table-borderless table-striped table-hover"},Sf={scope:"col"},Af={scope:"col"},Ef={scope:"col"},Cf={scope:"col"},Tf={class:"table-responsive d-none d-md-block"},Of={class:"table table-sm table-borderless table-striped table-hover"},Df={scope:"col"},If={scope:"col"},Pf={scope:"col"},jf={scope:"col"},Nf={scope:"col"},Lf={scope:"col"},Mf={scope:"col"},Rf={scope:"col"},qf={scope:"col"},Bf={scope:"col"};const $f={props:{data:{type:Object}},data:()=>({store:qd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key},stats(){return this.data.stats.containers},views(){return this.data.views.containers},containers(){const{sorter:t}=this,e=(this.stats||[]).map((t=>{let e;return null!=t.memory_usage?(e=t.memory_usage,null!=t.memory_inactive_file&&(e-=t.memory_inactive_file)):e=void 0,{id:t.id,name:t.name,status:t.status,uptime:t.uptime,cpu_percent:t.cpu.total,memory_usage:e,limit:t.memory.limit,io_rx:t.io_rx,io_wx:t.io_wx,network_rx:t.network_rx,network_tx:t.network_tx,command:t.command,image:t.image,engine:t.engine,pod_id:t.pod_id}}));return(0,am.orderBy)(e,[t.column].map((t=>e=>e["memory_percent"===t?"memory_usage":t]??-1/0),[]),[t.isReverseColumn(t.column)?"desc":"asc"])},showEngine(){return this.views.show_engine_name},showPod(){return this.views.show_pod_name}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["cpu_percent","memory_percent","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["name"].includes(t)},getColumnLabel:function(t){return{io_counters:"disk IO",cpu_percent:"CPU consumption",memory_usage:"memory consumption",cpu_times:"uptime",name:"container name",None:"None"}[t]||t}})}}},methods:{getDisableStats:()=>Ud.getLimit("containers","containers_disable_stats")||[]}},Uf=(0,Yd.A)($f,[["render",function(t,e,r,n,i,o){return o.containers.length?(xu(),Au("section",wf,[e[6]||(e[6]=Iu("span",{class:"title"},"CONTAINERS",-1)),Al(Iu("span",null,As(o.containers.length)+" sorted by "+As(i.sorter.getColumnLabel(i.sorter.column)),513),[[xp,o.containers.length>1]]),Iu("div",_f,[Iu("table",kf,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",Sf,"Pod",512),[[xp,o.showPod]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[0]||(e[0]=t=>o.args.sort_processes_key="name")}," Name ",2),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",Af,"Status",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===i.sorter.column&&"sort"]),onClick:e[1]||(e[1]=t=>o.args.sort_processes_key="cpu_percent")}," CPU% ",2),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===i.sorter.column&&"sort"]),onClick:e[2]||(e[2]=t=>o.args.sort_processes_key="memory_percent")}," MEM ",2),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Ef,"MAX",512),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Cf,"Command",512),[[xp,!o.getDisableStats().includes("command")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.containers,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row"},As(e.pod_id||"-"),513),[[xp,o.showPod]]),Al(Iu("td",{scope:"row"},As(e.name),513),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",{scope:"row",class:xs(["Paused"===e.status&&"careful","exited"===e.status&&"warning",!["Paused","exited"].includes(e.status)&&"ok"])},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row"},As(t.$filters.number(e.cpu_percent,1)),513),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.memory_usage??NaN)?"-":t.$filters.bytes(e.memory_usage)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.limit??NaN)?"-":t.$filters.bytes(e.limit)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.command),513),[[xp,!o.getDisableStats().includes("command")]])])))),128))])])]),Iu("div",Tf,[Iu("table",Of,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",Df,"Engine",512),[[xp,o.showEngine]]),Al(Iu("td",If,"Pod",512),[[xp,o.showPod]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[3]||(e[3]=t=>o.args.sort_processes_key="name")}," Name ",2),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",Pf,"Status",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",jf,"Uptime",512),[[xp,!o.getDisableStats().includes("uptime")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===i.sorter.column&&"sort"]),onClick:e[4]||(e[4]=t=>o.args.sort_processes_key="cpu_percent")}," CPU% ",2),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===i.sorter.column&&"sort"]),onClick:e[5]||(e[5]=t=>o.args.sort_processes_key="memory_percent")}," MEM ",2),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Nf,"MAX",512),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Lf,"IORps",512),[[xp,!o.getDisableStats().includes("diskio")]]),Al(Iu("td",Mf,"IOWps",512),[[xp,!o.getDisableStats().includes("diskio")]]),Al(Iu("td",Rf,"RXps",512),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",qf,"TXps",512),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",Bf,"Command",512),[[xp,!o.getDisableStats().includes("command")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.containers,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row"},As(e.engine),513),[[xp,o.showEngine]]),Al(Iu("td",{scope:"row"},As(e.pod_id||"-"),513),[[xp,o.showPod]]),Al(Iu("td",{scope:"row"},As(e.name),513),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",{scope:"row",class:xs(["Paused"===e.status&&"careful","exited"===e.status&&"warning",!["Paused","exited"].includes(e.status)&&"ok"])},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row"},As(e.uptime),513),[[xp,!o.getDisableStats().includes("uptime")]]),Al(Iu("td",{scope:"row"},As(t.$filters.number(e.cpu_percent,1)),513),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.memory_usage??NaN)?"-":t.$filters.bytes(e.memory_usage)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.limit??NaN)?"-":t.$filters.bytes(e.limit)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.io_rx??NaN)?"-":t.$filters.bytes(e.io_rx)),513),[[xp,!o.getDisableStats().includes("iodisk")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.io_wx??NaN)?"-":t.$filters.bytes(e.io_wx)),513),[[xp,!o.getDisableStats().includes("iodisk")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.network_rx??NaN)?"-":t.$filters.bits(e.network_rx)),513),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.network_tx??NaN)?"-":t.$filters.bits(e.network_tx)),513),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.command),513),[[xp,!o.getDisableStats().includes("command")]])])))),128))])])])])):Ru("v-if",!0)}]]),Ff={key:0,id:"folders",class:"plugin"},zf={class:"table table-sm table-borderless margin-bottom"},Hf={scope:"row"},Vf={key:0,class:"visible-lg-inline"};const Gf={props:{data:{type:Object}},computed:{stats(){return this.data.stats.folders},folders(){return this.stats.map((t=>({path:t.path,size:t.size,errno:t.errno,careful:t.careful,warning:t.warning,critical:t.critical})))},hasFolders(){return this.folders.length>0}},methods:{getDecoration:t=>t.errno>0?"error":null!==t.critical&&t.size>1e6*t.critical?"critical":null!==t.warning&&t.size>1e6*t.warning?"warning":null!==t.careful&&t.size>1e6*t.careful?"careful":"ok"}},Wf=(0,Yd.A)(Gf,[["render",function(t,e,r,n,i,o){return o.hasFolders?(xu(),Au("section",Ff,[Iu("table",zf,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"FOLDERS"),Iu("th",{scope:"col",class:"text-end"},"Size")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.folders,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Hf,As(e.path),1),Iu("td",{class:xs(["text-end",o.getDecoration(e)])},[e.errno>0?(xu(),Au("span",Vf,"?")):Ru("v-if",!0),Lu(" "+As(t.$filters.bytes(e.size)),1)],2)])))),128))])])])):Ru("v-if",!0)}]]),Kf={key:0,id:"fs",class:"plugin"},Xf={class:"table table-sm table-borderless margin-bottom"},Qf={key:0,scope:"col",class:"text-end w-25"},Zf={key:1,scope:"col",class:"text-end w-25"},Yf={scope:"row"},Jf={key:0,class:"visible-lg-inline"},th={scope:"row",class:"text-end"};const eh={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.fs},view(){return this.data.views.fs},fileSystems(){const t=this.stats.map((t=>({name:t.device_name,mountPoint:t.mnt_point,percent:t.percent,size:t.size,used:t.used,free:t.free,alias:void 0!==t.alias?t.alias:null})));return(0,am.orderBy)(t,["mnt_point"])},hasFs(){return this.fileSystems.length>0}},methods:{getDecoration(t,e){if(null!=this.view[t][e])return this.view[t][e].decoration.toLowerCase()}}},rh=(0,Yd.A)(eh,[["render",function(t,e,r,n,i,o){return o.hasFs?(xu(),Au("section",Kf,[Iu("table",Xf,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"FILE SYSTEM",-1)),o.args.fs_free_space?(xu(),Au("th",Zf,"Free")):(xu(),Au("th",Qf,"Used")),e[1]||(e[1]=Iu("th",{scope:"col",class:"text-end w-25"},"Total",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.fileSystems,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Yf,[Lu(As(t.$filters.minSize(e.alias?e.alias:e.mountPoint,16,t.begin=!1))+" ",1),(e.alias?e.alias:e.mountPoint).length+e.name.length<=15?(xu(),Au("span",Jf," ("+As(e.name)+") ",1)):Ru("v-if",!0)]),o.args.fs_free_space?(xu(),Au("td",{key:1,scope:"row",class:xs(["text-end",o.getDecoration(e.mountPoint,"used")])},As(t.$filters.bytes(e.free)),3)):(xu(),Au("td",{key:0,scope:"row",class:xs(["text-end",o.getDecoration(e.mountPoint,"used")])},As(t.$filters.bytes(e.used)),3)),Iu("td",th,As(t.$filters.bytes(e.size)),1)])))),128))])])])):Ru("v-if",!0)}]]),nh={key:0,id:"gpu",class:"plugin"},ih={class:"title text-truncate"},oh={key:0,class:"table-responsive"},sh={key:1,class:"col text-end"},ah={key:1,class:"col text-end"},lh={key:1,class:"col text-end"},ch={key:1,class:"table-responsive"},uh={class:"table table-sm table-borderless"},ph={class:"col"},dh={key:1,class:"col"},mh={key:3,class:"col text-end"},fh={key:2,class:"table-responsive"},hh={class:"table table-sm table-borderless"},gh={key:1,class:"col"},bh={key:1,class:"col"},yh={key:1,class:"col"};const vh={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.gpu},view(){return this.data.views.gpu},gpus(){return this.stats},name(){let t="GPU";const{stats:e}=this;return 1===e.length?t=e[0].name:e.length&&(t=`${e.length} GPU ${e[0].name}`),t},mean(){const t={proc:null,mem:null,temperature:null},{stats:e}=this;if(!e.length)return t;for(const r of e)t.proc+=r.proc,t.mem+=r.mem,t.temperature+=r.temperature;return t.proc=t.proc/e.length,t.mem=t.mem/e.length,t.temperature=t.temperature/e.length,t}},methods:{getDecoration(t,e){if(void 0!==this.view[t][e])return this.view[t][e].decoration.toLowerCase()},getMeanDecoration:t=>"DEFAULT"}},xh=(0,Yd.A)(vh,[["render",function(t,e,r,n,i,o){return null!=o.gpus?(xu(),Au("section",nh,[Iu("div",ih,As(o.name),1),Ru(" single gpu "),1===o.gpus.length?(xu(),Au("div",oh,[(xu(!0),Au(fu,null,oc(o.gpus,((r,n)=>(xu(),Au("table",{key:n,class:"table table-sm table-borderless"},[Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{class:"col"},"proc:",-1)),null!=r.proc?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"proc")])},[Iu("span",null,As(t.$filters.number(r.proc,0))+"%",1)],2)):Ru("v-if",!0),null==r.proc?(xu(),Au("td",sh,e[0]||(e[0]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{class:"col"},"mem:",-1)),null!=r.mem?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"mem")])},[Iu("span",null,As(t.$filters.number(r.mem,0))+"%",1)],2)):Ru("v-if",!0),null==r.mem?(xu(),Au("td",ah,e[2]||(e[2]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[5]||(e[5]=Iu("td",{class:"col"},"temp:",-1)),null!=r.temperature?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"temperature")])},[Iu("span",null,As(t.$filters.number(r.temperature,0)),1)],2)):Ru("v-if",!0),null==r.temperature?(xu(),Au("td",lh,e[4]||(e[4]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])])])))),128))])):Ru("v-if",!0),Ru(" multiple gpus - one line per gpu (no mean) "),!o.args.meangpu&&o.gpus.length>1?(xu(),Au("div",ch,[Iu("table",uh,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.gpus,((r,n)=>(xu(),Au("tr",{key:n},[Iu("td",ph,As(r.gpu_id)+":",1),null!=r.proc?(xu(),Au("td",{key:0,class:xs(["col",o.getDecoration(r.gpu_id,"proc")])},[Iu("span",null,As(t.$filters.number(r.proc,0))+"%",1)],2)):Ru("v-if",!0),null==r.proc?(xu(),Au("td",dh,e[6]||(e[6]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0),e[8]||(e[8]=Iu("td",{class:"col"},"mem:",-1)),null!=r.mem?(xu(),Au("td",{key:2,class:xs(["col text-end",o.getDecoration(r.gpu_id,"mem")])},[Iu("span",null,As(t.$filters.number(r.mem,0))+"% ",1)],2)):Ru("v-if",!0),null==r.mem?(xu(),Au("td",mh,e[7]||(e[7]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])))),128))])])])):Ru("v-if",!0),Ru(" multiple gpus - mean "),o.args.meangpu&&o.gpus.length>1?(xu(),Au("div",fh,[Iu("table",hh,[Iu("tbody",null,[Iu("tr",null,[e[10]||(e[10]=Iu("td",{class:"col"},"proc mean:",-1)),null!=o.mean.proc?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("proc")])},[Iu("span",null,As(t.$filters.number(o.mean.proc,0))+"%",1)],2)):Ru("v-if",!0),null==o.mean.proc?(xu(),Au("td",gh,e[9]||(e[9]=[Iu("span",null,"N/A",-1),Lu(">")]))):Ru("v-if",!0)]),Iu("tr",null,[e[12]||(e[12]=Iu("td",{class:"col"},"mem mean:",-1)),null!=o.mean.mem?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("mem")])},[Iu("span",null,As(t.$filters.number(o.mean.mem,0))+"%",1)],2)):Ru("v-if",!0),null==o.mean.mem?(xu(),Au("td",bh,e[11]||(e[11]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[14]||(e[14]=Iu("td",{class:"col"},"temp mean:",-1)),null!=o.mean.temperature?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("temperature")])},[Iu("span",null,As(t.$filters.number(o.mean.temperature,0))+"°C",1)],2)):Ru("v-if",!0),null==o.mean.temperature?(xu(),Au("td",yh,e[13]||(e[13]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])])])])):Ru("v-if",!0)])):Ru("v-if",!0)}]]),wh={id:"system",class:"plugin"},_h={key:0,class:"critical"},kh={class:"title"};const Sh={props:{data:{type:Object}},data:()=>({store:qd}),computed:{stats(){return this.data.stats.system},hostname(){return this.stats.hostname},isDisconnected(){return"FAILURE"===this.store.status}}},Ah=(0,Yd.A)(Sh,[["render",function(t,e,r,n,i,o){return xu(),Au("section",wh,[o.isDisconnected?(xu(),Au("span",_h,"Disconnected from")):Ru("v-if",!0),Iu("span",kh,As(o.hostname),1)])}]]),Eh={key:0,id:"ip",class:"plugin"},Ch={key:0,class:"title"},Th={key:1},Oh={key:2,class:"title"},Dh={key:3},Ih={key:4,class:"text-truncate"};const Ph={props:{data:{type:Object}},computed:{ipStats(){return this.data.stats.ip},address(){return this.ipStats.address},gateway(){return this.ipStats.gateway},maskCdir(){return this.ipStats.mask_cidr},publicAddress(){return this.ipStats.public_address},publicInfo(){return this.ipStats.public_info_human}}},jh=(0,Yd.A)(Ph,[["render",function(t,e,r,n,i,o){return o.address?(xu(),Au("section",Eh,[o.address?(xu(),Au("span",Ch,"IP")):Ru("v-if",!0),o.address?(xu(),Au("span",Th,As(o.address)+"/"+As(o.maskCdir),1)):Ru("v-if",!0),o.publicAddress?(xu(),Au("span",Oh,"Pub")):Ru("v-if",!0),o.publicAddress?(xu(),Au("span",Dh,As(o.publicAddress),1)):Ru("v-if",!0),o.publicInfo?(xu(),Au("span",Ih,As(o.publicInfo),1)):Ru("v-if",!0)])):Ru("v-if",!0)}]]),Nh={id:"irq",class:"plugin"},Lh={class:"table table-sm table-borderless margin-bottom"},Mh={scope:"row"},Rh={scope:"row",class:"text-end"};const qh={props:{data:{type:Object}},computed:{stats(){return this.data.stats.irq},irqs(){return this.stats.map((t=>({irq_line:t.irq_line,irq_rate:t.irq_rate})))}}},Bh=(0,Yd.A)(qh,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Nh,[Iu("table",Lh,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"IRQ"),Iu("th",{scope:"col",class:"text-end"},"Rate/s")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.irqs,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",Mh,As(t.irq_line),1),Iu("td",Rh,As(t.irq_rate),1)])))),128))])])])}]]),$h={key:0,id:"load",class:"plugin"},Uh={class:"table-responsive"},Fh={class:"table table-sm table-borderless"},zh={scope:"col",class:"text-end"},Hh={class:"text-end"};const Vh={props:{data:{type:Object}},computed:{stats(){return this.data.stats.load},view(){return this.data.views.load},cpucore(){return this.stats.cpucore},min1(){return this.stats.min1},min5(){return this.stats.min5},min15(){return this.stats.min15}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},Gh=(0,Yd.A)(Vh,[["render",function(t,e,r,n,i,o){return null!=o.cpucore?(xu(),Au("section",$h,[Iu("div",Uh,[Iu("table",Fh,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"LOAD",-1)),Iu("td",zh,As(o.cpucore)+"-core",1)])]),Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"1 min:",-1)),Iu("td",Hh,[Iu("span",null,As(t.$filters.number(o.min1,2)),1)])]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"5 min:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("min5")])},[Iu("span",null,As(t.$filters.number(o.min5,2)),1)],2)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"15 min:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("min15")])},[Iu("span",null,As(t.$filters.number(o.min15,2)),1)],2)])])])])])):Ru("v-if",!0)}]]),Wh={id:"mem",class:"plugin"},Kh={class:"table-responsive"},Xh={class:"table-sm table-borderless"},Qh={class:"justify-content-between"},Zh={scope:"col"},Yh={class:"table table-sm table-borderless"},Jh={class:"text-end"},tg={key:0},eg={key:1},rg={class:"d-none d-xl-block d-xxl-block"},ng={class:"table table-sm table-borderless"},ig={scope:"col"},og={scope:"col"},sg={scope:"col"},ag={scope:"col"},lg={scope:"col"},cg={scope:"col"},ug={scope:"col"},pg={scope:"col"};const dg={props:{data:{type:Object}},data:()=>({store:qd}),computed:{config(){return this.store.config||{}},available_args(){return this.config.mem.available||!1},stats(){return this.data.stats.mem},view(){return this.data.views.mem},percent(){return this.stats.percent.toFixed(1)},total(){return this.stats.total},used(){return this.stats.used},available(){return this.stats.available},free(){return this.stats.free},active(){return this.stats.active},inactive(){return this.stats.inactive},buffers(){return this.stats.buffers},cached(){return this.stats.cached}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},mg=(0,Yd.A)(dg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Wh,[Ru(" d-none d-xxl-block "),Iu("div",Kh,[Iu("table",Xh,[Iu("tbody",null,[Iu("tr",Qh,[Iu("td",Zh,[Iu("table",Yh,[Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"MEM",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("percent")])},[Iu("span",null,As(o.percent)+"%",1)],2)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"total:",-1)),Iu("td",Jh,[Iu("span",null,As(t.$filters.bytes(o.total)),1)])]),o.available_args?Ru("v-if",!0):(xu(),Au("tr",tg,[e[2]||(e[2]=Iu("td",{scope:"row"},"used:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("used")])},[Iu("span",null,As(t.$filters.bytes(o.used,2)),1)],2)])),o.available_args?(xu(),Au("tr",eg,[e[3]||(e[3]=Iu("td",{scope:"row"},"avail:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("available")])},[Iu("span",null,As(t.$filters.bytes(o.available,2)),1)],2)])):Ru("v-if",!0),Iu("tr",null,[e[4]||(e[4]=Iu("td",{scope:"row"},"free:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("free")])},[Iu("span",null,As(t.$filters.bytes(o.free,2)),1)],2)])])])]),Iu("td",null,[Iu("template",rg,[Iu("table",ng,[Iu("tbody",null,[Iu("tr",null,[Al(Iu("td",ig," active: ",512),[[xp,null!=o.active]]),Al(Iu("td",og,[Iu("span",null,As(t.$filters.bytes(o.active)),1)],512),[[xp,null!=o.active]])]),Iu("tr",null,[Al(Iu("td",sg," inactive: ",512),[[xp,null!=o.inactive]]),Al(Iu("td",ag,[Iu("span",null,As(t.$filters.bytes(o.inactive)),1)],512),[[xp,null!=o.inactive]])]),Iu("tr",null,[Al(Iu("td",lg," buffers: ",512),[[xp,null!=o.buffers]]),Al(Iu("td",cg,[Iu("span",null,As(t.$filters.bytes(o.buffers)),1)],512),[[xp,null!=o.buffers]])]),Iu("tr",null,[Al(Iu("td",ug," cached: ",512),[[xp,null!=o.cached]]),Al(Iu("td",pg,[Iu("span",null,As(t.$filters.bytes(o.cached)),1)],512),[[xp,null!=o.cached]])])])])])])])])])])])}]]),fg={id:"memswap",class:"plugin"},hg={class:"table-responsive"},gg={class:"table table-sm table-borderless"},bg={class:"text-end"},yg={class:"text-end"};const vg={props:{data:{type:Object}},computed:{stats(){return this.data.stats.memswap},view(){return this.data.views.memswap},percent(){return this.stats.percent},total(){return this.stats.total},used(){return this.stats.used},free(){return this.stats.free}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},xg=(0,Yd.A)(vg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",fg,[Iu("div",hg,[Iu("table",gg,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"SWAP",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("percent")])},[Iu("span",null,As(o.percent)+"%",1)],2)])]),Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"total:",-1)),Iu("td",bg,[Iu("span",null,As(t.$filters.bytes(o.total)),1)])]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"used:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("used")])},[Iu("span",null,As(t.$filters.bytes(o.used,2)),1)],2)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"free:",-1)),Iu("td",yg,[Iu("span",null,As(t.$filters.bytes(o.free,2)),1)])])])])])])}]]),wg={key:0,id:"network",class:"plugin"},_g={class:"table table-sm table-borderless margin-bottom"},kg={scope:"col",class:"text-end w-25"},Sg={scope:"col",class:"text-end w-25"},Ag={scope:"col",class:"text-end w-25"},Eg={scope:"col",class:"text-end w-25"},Cg={scope:"col",class:"text-end w-25"},Tg={scope:"col",class:"text-end w-25"},Og={scope:"col",class:"text-end w-25"},Dg={scope:"col",class:"text-end w-25"},Ig={scope:"row",class:"visible-lg-inline text-truncate"},Pg={class:"text-end"},jg={class:"text-end"};const Ng={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.network},view(){return this.data.views.network},networks(){const t=this.stats.map((t=>{const e=void 0!==t.alias?t.alias:null;return{interfaceName:t.interface_name,ifname:e||t.interface_name,bytes_recv_rate_per_sec:t.bytes_recv_rate_per_sec,bytes_sent_rate_per_sec:t.bytes_sent_rate_per_sec,bytes_all_rate_per_sec:t.bytes_all_rate_per_sec,bytes_recv:t.bytes_recv,bytes_sent:t.bytes_sent,bytes_all:t.bytes_all}})).filter((t=>{const e=this.view[t.interfaceName].bytes_recv_rate_per_sec,r=this.view[t.interfaceName].bytes_sent_rate_per_sec;return!(e&&!1!==e.hidden||r&&!1!==r.hidden)}));return(0,am.orderBy)(t,["interfaceName"])},hasNetworks(){return this.networks.length>0}},methods:{getDecoration(t,e){if(null!=this.view[t][e])return this.view[t][e].decoration.toLowerCase()}}},Lg=(0,Yd.A)(Ng,[["render",function(t,e,r,n,i,o){return o.hasNetworks?(xu(),Au("section",wg,[Iu("table",_g,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"NETWORK",-1)),Al(Iu("th",kg,"Rxps",512),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",Sg,"Txps",512),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",Ag,null,512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",Eg,"Rx+Txps",512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",Cg,"Rx",512),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",Tg,"Tx",512),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",Og,null,512),[[xp,o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",Dg,"Rx+Tx",512),[[xp,o.args.network_cumul&&o.args.network_sum]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.networks,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Ig,As(t.$filters.minSize(e.alias?e.alias:e.ifname,16)),1),Al(Iu("td",{class:xs(["text-end",o.getDecoration(e.interfaceName,"bytes_recv_rate_per_sec")])},As(o.args.byte?t.$filters.bytes(e.bytes_recv_rate_per_sec):t.$filters.bits(e.bytes_recv_rate_per_sec)),3),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",{class:xs(["text-end",o.getDecoration(e.interfaceName,"bytes_sent_rate_per_sec")])},As(o.args.byte?t.$filters.bytes(e.bytes_sent_rate_per_sec):t.$filters.bits(e.bytes_sent_rate_per_sec)),3),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",Pg,null,512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_all_rate_per_sec):t.$filters.bits(e.bytes_all_rate_per_sec)),513),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_recv):t.$filters.bits(e.bytes_recv)),513),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_sent):t.$filters.bits(e.bytes_sent)),513),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",jg,null,512),[[xp,o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_all):t.$filters.bits(e.bytes_all)),513),[[xp,o.args.network_cumul&&o.args.network_sum]])])))),128))])])])):Ru("v-if",!0)}]]),Mg={id:"now",class:"plugin"};const Rg={props:{data:{type:Object}},computed:{date_custom(){return this.data.stats.now.custom}}},qg=(0,Yd.A)(Rg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Mg,[Iu("span",null,As(o.date_custom),1)])}]]),Bg={id:"percpu",class:"plugin"},$g={class:"table-responsive"},Ug={class:"table-sm table-borderless"},Fg={key:0,scope:"col"},zg={key:1,scope:"col"},Hg={key:0,scope:"col"},Vg={key:1,scope:"col"};const Gg={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},percpuStats(){return this.data.stats.percpu}},methods:{getUserAlert:t=>Ud.getAlert("percpu","percpu_user_",t.user),getSystemAlert:t=>Ud.getAlert("percpu","percpu_system_",t.system),getIOWaitAlert:t=>Ud.getAlert("percpu","percpu_iowait_",t.system)}},Wg=(0,Yd.A)(Gg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Bg,[Ru(" d-none d-xl-block d-xxl-block "),Iu("div",$g,[Iu("table",Ug,[Iu("thead",null,[Iu("tr",null,[o.args.disable_quicklook?(xu(),Au("th",Fg,"CPU")):Ru("v-if",!0),o.args.disable_quicklook?(xu(),Au("td",zg,"total")):Ru("v-if",!0),e[0]||(e[0]=Iu("td",{scope:"col"},"user",-1)),e[1]||(e[1]=Iu("td",{scope:"col"},"system",-1)),e[2]||(e[2]=Iu("td",{scope:"col"},"idle",-1)),e[3]||(e[3]=Iu("td",{scope:"col"},"iowait",-1)),e[4]||(e[4]=Iu("td",{scope:"col"},"steel",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.percpuStats,((t,e)=>(xu(),Au("tr",{key:e},[o.args.disable_quicklook?(xu(),Au("td",Hg,"CPU"+As(t.cpu_number),1)):Ru("v-if",!0),o.args.disable_quicklook?(xu(),Au("td",Vg,As(t.total)+"%",1)):Ru("v-if",!0),Iu("td",{scope:"col",class:xs(o.getUserAlert(t))},As(t.user)+"%",3),Iu("td",{scope:"col",class:xs(o.getSystemAlert(t))},As(t.system)+"%",3),Al(Iu("td",{scope:"col"},As(t.idle)+"%",513),[[xp,null!=t.idle]]),Al(Iu("td",{scope:"col",class:xs(o.getIOWaitAlert(t))},As(t.iowait)+"%",3),[[xp,null!=t.iowait]]),Al(Iu("td",{scope:"col"},As(t.steal)+"%",513),[[xp,null!=t.steal]])])))),128))])])])])}]]),Kg={key:0,id:"ports",class:"plugin"},Xg={class:"table table-sm table-borderless margin-bottom"},Qg={scope:"row"},Zg={key:0},Yg={key:1},Jg={key:2},tb={key:3},eb={key:0},rb={key:1},nb={key:2};const ib={props:{data:{type:Object}},computed:{stats(){return this.data.stats.ports},ports(){return this.stats},hasPorts(){return this.ports.length>0}},methods:{getPortDecoration:t=>null===t.status?"careful":!1===t.status?"critical":null!==t.rtt_warning&&t.status>t.rtt_warning?"warning":"ok",getWebDecoration:t=>null===t.status?"careful":-1===[200,301,302].indexOf(t.status)?"critical":null!==t.rtt_warning&&t.elapsed>t.rtt_warning?"warning":"ok"}},ob=(0,Yd.A)(ib,[["render",function(t,e,r,n,i,o){return o.hasPorts?(xu(),Au("section",Kg,[Iu("table",Xg,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.ports,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Qg,[Ru(" prettier-ignore "),Lu(" "+As(t.$filters.minSize(e.description?e.description:e.host+" "+e.port,20)),1)]),e.host?(xu(),Au("td",{key:0,scope:"row",class:xs(["text-end",o.getPortDecoration(e)])},["null"==e.status?(xu(),Au("span",Zg,"Scanning")):"false"==e.status?(xu(),Au("span",Yg,"Timeout")):"true"==e.status?(xu(),Au("span",Jg,"Open")):(xu(),Au("span",tb,As(t.$filters.number(1e3*e.status,0))+"ms",1))],2)):Ru("v-if",!0),e.url?(xu(),Au("td",{key:1,scope:"row",class:xs(["text-end",o.getPortDecoration(e)])},["null"==e.status?(xu(),Au("span",eb,"Scanning")):"Error"==e.status?(xu(),Au("span",rb,"Error")):(xu(),Au("span",nb,"Code "+As(e.status),1))],2)):Ru("v-if",!0)])))),128))])])])):Ru("v-if",!0)}]]),sb={key:0},ab={key:1},lb={key:0,class:"row"},cb={class:"col-lg-18"};const ub={key:0,id:"amps",class:"plugin"},pb={class:"table table-sm table-borderless"},db={key:0},mb=["innerHTML"];const fb={props:{data:{type:Object}},computed:{stats(){return this.data.stats.amps},processes(){return this.stats.filter((t=>null!==t.result))},hasAmps(){return this.processes.length>0}},methods:{getNameDecoration(t){const e=t.count,r=t.countmin,n=t.countmax;let i="ok";return i=e>0?(null===r||e>=r)&&(null===n||e<=n)?"ok":"careful":null===r?"ok":"critical",i}}},hb=(0,Yd.A)(fb,[["render",function(t,e,r,n,i,o){return o.hasAmps?(xu(),Au("section",ub,[Iu("table",pb,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",{class:xs(o.getNameDecoration(e))},As(e.name),3),e.regex?(xu(),Au("td",db,As(e.count),1)):Ru("v-if",!0),Iu("td",{class:"process-result",innerHTML:t.$filters.nl2br(e.result)},null,8,mb)])))),128))])]),Ru('
\n
\n
\n {{ process.name }}\n
\n
{{ process.count }}
\n
\n
\n ')])):Ru("v-if",!0)}]]),gb={id:"processcount",class:"plugin"},bb={class:"title"};const yb={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.processcount},total(){return this.stats.total||0},running(){return this.stats.running||0},sleeping(){return this.stats.sleeping||0},stopped(){return this.stats.stopped||0},thread(){return this.stats.thread||0}}},vb=(0,Yd.A)(yb,[["render",function(t,e,r,n,i,o){return xu(),Au("section",gb,[e[0]||(e[0]=Iu("span",{class:"title"},"TASKS",-1)),Iu("span",null,As(o.total)+" ("+As(o.thread)+" thr),",1),Iu("span",null,As(o.running)+" run,",1),Iu("span",null,As(o.sleeping)+" slp,",1),Iu("span",null,As(o.stopped)+" oth",1),Iu("span",null,As(o.args.programs?"Programs":"Threads"),1),Iu("span",bb,As(r.sorter.auto?"sorted automatically":"sorted"),1),Iu("span",null,"by "+As(r.sorter.getColumnLabel(r.sorter.column)),1)])}]]),xb={key:0,id:"processlist",class:"plugin"},wb={key:0,class:"extendedstats"},_b={class:"careful"},kb={class:"careful"},Sb={class:"careful"},Ab={class:"careful"},Eb={class:"table-responsive d-lg-none"},Cb={class:"table table-sm table-borderless table-striped table-hover"},Tb={scope:"col"},Ob=["onClick"],Db={class:"table-responsive-md d-none d-lg-block"},Ib={class:"table table-sm table-borderless table-striped table-hover"},Pb={scope:"col"},jb={scope:"col"},Nb={scope:"col"},Lb={scope:"col"},Mb={scope:"col"},Rb=["onClick"],qb={key:0,scope:"row",class:""},Bb={key:1,id:"processlist",class:"plugin"},$b={class:"table-responsive d-lg-none"},Ub={class:"table table-sm table-borderless table-striped table-hover"},Fb={class:"table-responsive d-none d-lg-block"},zb={class:"table table-sm table-borderless table-striped table-hover"},Hb={class:""},Vb={class:""},Gb={scope:"row"},Wb={scope:"row",class:"table-cell widtd-60"};const Kb={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats_processlist(){return this.data.stats.processlist},stats_core(){return this.data.stats.core},cpucore(){return 0!==this.stats_core.log?this.stats_core.log:1},extended_stats(){return this.stats_processlist.find((t=>!0===t.extended_stats))||null},processes(){const{sorter:t}=this,e=(this.stats_processlist||[]).map((t=>this.updateProcess(t,this.data.stats.isWindows,this.args,this.cpucore)));return(0,am.orderBy)(e,[t.column].reduce(((t,e)=>("io_counters"===e&&(e=["io_read","io_write"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"]).slice(0,this.limit)},ioReadWritePresentProcesses(){return(this.stats_processlist||[]).some((({io_counters:t})=>t))},stats_programlist(){return this.data.stats.programlist},programs(){const{sorter:t}=this,e=this.data.stats.isWindows,r=(this.stats_programlist||[]).map((t=>(t.memvirt="?",t.memres="?",t.memory_info&&(t.memvirt=t.memory_info.vms,t.memres=t.memory_info.rss),e&&null!==t.username&&(t.username=(0,am.last)(t.username.split("\\"))),t.timeforhuman="?",t.cpu_times&&(t.timeplus=bf([t.cpu_times.user,t.cpu_times.system]),t.timeforhuman=t.timeplus.hours.toString().padStart(2,"0")+":"+t.timeplus.minutes.toString().padStart(2,"0")+":"+t.timeplus.seconds.toString().padStart(2,"0")),null===t.num_threads&&(t.num_threads=-1),null===t.cpu_percent&&(t.cpu_percent=-1),null===t.memory_percent&&(t.memory_percent=-1),t.io_read=null,t.io_write=null,t.io_counters&&(t.io_read=(t.io_counters[0]-t.io_counters[2])/t.time_since_update,t.io_write=(t.io_counters[1]-t.io_counters[3])/t.time_since_update),t.isNice=void 0!==t.nice&&(e&&32!=t.nice||!e&&0!=t.nice),Array.isArray(t.cmdline)&&(t.cmdline=t.cmdline.join(" ").replace(/\n/g," ")),"string"==typeof t.cmdline&&0!==t.cmdline.length||(t.cmdline=t.name),t)));return(0,am.orderBy)(r,[t.column].reduce(((t,e)=>("io_counters"===e&&(e=["io_read","io_write"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"]).slice(0,this.limit)},ioReadWritePresentPrograms(){return(this.stats_programlist||[]).some((({io_counters:t})=>t))},limit(){return void 0!==this.config.outputs?this.config.outputs.max_processes_display:void 0}},methods:{updateProcess:(t,e,r,n)=>(t.memvirt="?",t.memres="?",t.memory_info&&(t.memvirt=t.memory_info.vms,t.memres=t.memory_info.rss),e&&null!==t.username&&(t.username=(0,am.last)(t.username.split("\\"))),t.timeforhuman="?",t.cpu_times&&(t.timeplus=bf([t.cpu_times.user,t.cpu_times.system]),t.timeforhuman=t.timeplus.hours.toString().padStart(2,"0")+":"+t.timeplus.minutes.toString().padStart(2,"0")+":"+t.timeplus.seconds.toString().padStart(2,"0")),null===t.num_threads&&(t.num_threads=-1),t.irix=1,null===t.cpu_percent?t.cpu_percent=-1:r.disable_irix&&(t.irix=n),null===t.memory_percent&&(t.memory_percent=-1),t.io_read=null,t.io_write=null,t.io_counters&&(t.io_read=(t.io_counters[0]-t.io_counters[2])/t.time_since_update,t.io_write=(t.io_counters[1]-t.io_counters[3])/t.time_since_update),t.isNice=void 0!==t.nice&&(e&&32!=t.nice||!e&&0!=t.nice),Array.isArray(t.cmdline)&&(t.name=t.name+" "+t.cmdline.slice(1).join(" ").replace(/\n/g," "),t.cmdline=t.cmdline.join(" ").replace(/\n/g," ")),"string"==typeof t.cmdline&&0!==t.cmdline.length||(t.cmdline=t.name),t),getCpuPercentAlert:t=>Ud.getAlert("processlist","processlist_cpu_",t.cpu_percent),getMemoryPercentAlert:t=>Ud.getAlert("processlist","processlist_mem_",t.cpu_percent),getDisableStats:()=>Ud.getLimit("processlist","processlist_disable_stats")||[],getDisableVms:()=>"true"===(Ud.getLimit("processlist","processlist_disable_virtual_memory")||["False"])[0].toLowerCase(),setExtendedStats(t){fetch("api/4/processes/extended/"+t.toString(),{method:"POST"}).then((t=>t.json())),this.$forceUpdate()},disableExtendedStats(){fetch("api/4/processes/extended/disable",{method:"POST"}).then((t=>t.json())),this.$forceUpdate()}}},Xb={components:{GlancesPluginAmps:hb,GlancesPluginProcesscount:vb,GlancesPluginProcesslist:(0,Yd.A)(Kb,[["render",function(t,e,r,n,i,o){return xu(),Au(fu,null,[Ru(" Display processes "),o.args.programs?Ru("v-if",!0):(xu(),Au("section",xb,[null!==o.extended_stats?(xu(),Au("div",wb,[Iu("div",null,[e[24]||(e[24]=Iu("span",{class:"title"},"Pinned task: ",-1)),Iu("span",null,As(t.$filters.limitTo(o.extended_stats.cmdline,80)),1),Iu("span",null,[Iu("button",{class:"button",onClick:e[0]||(e[0]=t=>o.disableExtendedStats())},"Unpin")])]),Iu("div",null,[e[25]||(e[25]=Iu("span",null,"CPU Min/Max/Mean: ",-1)),Iu("span",_b,As(t.$filters.number(o.extended_stats.cpu_min,1))+"% / "+As(t.$filters.number(o.extended_stats.cpu_max,1))+"% / "+As(t.$filters.number(o.extended_stats.cpu_mean,1))+"%",1),e[26]||(e[26]=Iu("span",null,"Affinity: ",-1)),Iu("span",kb,As(o.extended_stats.cpu_affinity|t.length),1)]),Iu("div",null,[e[27]||(e[27]=Iu("span",null,"MEM Min/Max/Mean: ",-1)),Iu("span",Sb,As(t.$filters.number(o.extended_stats.memory_min,1))+"% / "+As(t.$filters.number(o.extended_stats.memory_max,1))+"% / "+As(t.$filters.number(o.extended_stats.memory_mean,1))+"%",1),e[28]||(e[28]=Iu("span",null,"Memory info: ",-1)),Iu("span",Ab,As(t.$filters.dictToString(o.extended_stats.memory_info)),1)])])):Ru("v-if",!0),Iu("div",Eb,[Iu("table",Cb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[1]||(e[1]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[2]||(e[2]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",Tb," PID ",512),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[3]||(e[3]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[4]||(e[4]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r,style:{cursor:"pointer"},onClick:t=>o.setExtendedStats(e)},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(e.pid),513),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])],8,Ob)))),128))])])]),Iu("div",Db,[Iu("table",Ib,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[5]||(e[5]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[6]||(e[6]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",Pb," VIRT ",512),[[xp,!o.getDisableStats().includes("memory_info")&&!o.getDisableVms()]]),Al(Iu("td",jb," RES ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",Nb," PID ",512),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[7]||(e[7]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","timemillis"===r.sorter.column&&"sort"]),onClick:e[8]||(e[8]=e=>t.$emit("update:sorter","timemillis"))}," TIME+ ",2),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","num_threads"===r.sorter.column&&"sort"]),onClick:e[9]||(e[9]=e=>t.$emit("update:sorter","num_threads"))}," THR ",2),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",Lb,"NI",512),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",Mb,"S ",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"col",class:xs(["",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[10]||(e[10]=e=>t.$emit("update:sorter","io_counters"))}," IORps ",2),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"col",class:xs(["text-start",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[11]||(e[11]=e=>t.$emit("update:sorter","io_counters"))}," IOWps ",2),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[12]||(e[12]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r,style:{cursor:"pointer"},onClick:t=>o.setExtendedStats(e.pid)},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memvirt)),513),[[xp,!o.getDisableStats().includes("memory_info")&&!o.getDisableVms()]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memres)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(e.pid),513),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"row"},As(e.username),513),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:""},As(e.timeforhuman),513),[[xp,!o.getDisableStats().includes("cpu_times")]]),"?"==e.timeplus?Al((xu(),Au("td",qb,"?",512)),[[xp,!o.getDisableStats().includes("cpu_times")]]):Ru("v-if",!0),Al(Iu("td",{scope:"row",class:""},As(-1==e.num_threads?"?":e.num_threads),513),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",{scope:"row",class:xs({nice:e.isNice})},As(t.$filters.exclamation(e.nice)),3),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",{scope:"row",class:xs({status:"R"==e.status})},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:""},As(t.$filters.bytes(e.io_read)),513),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-start"},As(t.$filters.bytes(e.io_write)),513),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])],8,Rb)))),128))])])])])),Ru(" Display programs "),o.args.programs?(xu(),Au("section",Bb,[Iu("div",$b,[Iu("table",Ub,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[13]||(e[13]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[14]||(e[14]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",null," NPROCS ",512),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[15]||(e[15]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.programs,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(e.nprocs),513),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])])))),128))])])]),Iu("div",Fb,[Iu("table",zb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[16]||(e[16]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[17]||(e[17]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",Hb," VIRT ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",Vb," RES ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",null," NPROCS ",512),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[18]||(e[18]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","timemillis"===r.sorter.column&&"sort"]]),onClick:e[19]||(e[19]=e=>t.$emit("update:sorter","timemillis"))}," TIME+ ",2),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","num_threads"===r.sorter.column&&"sort"]]),onClick:e[20]||(e[20]=e=>t.$emit("update:sorter","num_threads"))}," THR ",2),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",Gb,"NI",512),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",Wb,"S ",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[21]||(e[21]=e=>t.$emit("update:sorter","io_counters"))}," IORps ",2),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:xs(["text-start",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[22]||(e[22]=e=>t.$emit("update:sorter","io_counters"))}," IOWps ",2),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[23]||(e[23]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.programs,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memvirt)),513),[[xp,!o.getDisableStats().includes("memory_info")&&!o.getDisableVms()]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memres)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(e.nprocs),513),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row"},As(e.username),513),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:""},As(e.timeforhuman),513),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"row",class:""},As(-1==e.num_threads?"?":e.num_threads),513),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",{scope:"row",class:xs({nice:e.isNice})},As(t.$filters.exclamation(e.nice)),3),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",{scope:"row",class:xs({status:"R"==e.status})},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:""},As(t.$filters.bytes(e.io_read)),513),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-start"},As(t.$filters.bytes(e.io_write)),513),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])])))),128))])])])])):Ru("v-if",!0)],64)}]])},props:{data:{type:Object}},data:()=>({store:qd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["cpu_percent","memory_percent","username","timemillis","num_threads","io_counters","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["username","name"].includes(t)},getColumnLabel:function(t){return{cpu_percent:"CPU consumption",memory_percent:"memory consumption",username:"user name",timemillis:"process time",cpu_times:"process time",io_counters:"disk IO",name:"process name",None:"None"}[t]||t}})}}}},Qb=(0,Yd.A)(Xb,[["render",function(t,e,r,n,i,o){const s=ec("glances-plugin-processcount"),a=ec("glances-plugin-amps"),l=ec("glances-plugin-processlist");return o.args.disable_process?(xu(),Au("div",sb,"PROCESSES DISABLED (press 'z' to display)")):(xu(),Au("div",ab,[Pu(s,{sorter:i.sorter,data:r.data},null,8,["sorter","data"]),o.args.disable_amps?Ru("v-if",!0):(xu(),Au("div",lb,[Iu("div",cb,[Pu(a,{data:r.data},null,8,["data"])])])),Pu(l,{sorter:i.sorter,data:r.data,"onUpdate:sorter":e[0]||(e[0]=t=>o.args.sort_processes_key=t)},null,8,["sorter","data"])]))}]]),Zb={id:"quicklook",class:"plugin"},Yb={class:"d-flex justify-content-between"},Jb={class:"text-start text-truncate"},ty={key:0,class:"text-end d-none d-xxl-block frequency"},ey={class:"table-responsive"},ry={class:"table table-sm table-borderless"},ny={key:0},iy={scope:"col",class:"progress"},oy=["aria-valuenow"],sy={scope:"col",class:"text-end"},ay={scope:"col"},ly={scope:"col",class:"progress"},cy=["aria-valuenow"],uy={scope:"col",class:"text-end"},py={scope:"col"},dy={scope:"col",class:"progress"},my=["aria-valuenow"],fy={scope:"col",class:"text-end"};const hy={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats(){return this.data.stats.quicklook},view(){return this.data.views.quicklook},cpu(){return this.stats.cpu},cpu_name(){return this.stats.cpu_name},cpu_hz_current(){return(this.stats.cpu_hz_current/1e6).toFixed(0)},cpu_hz(){return(this.stats.cpu_hz/1e6).toFixed(0)},percpus(){const t=this.stats.percpu.map((({cpu_number:t,total:e})=>({number:t,total:e}))),e=parseInt(this.config.percpu.max_cpu_display);if(this.stats.percpu.length>e){var r=t.sort((function(t,e){return e.total-t.total}));const n={number:"x",total:Number((r.slice(e).reduce(((t,{total:e})=>t+e),0)/(this.stats.percpu.length-e)).toFixed(1))};(r=r.slice(0,e)).push(n)}return this.stats.percpu.length<=e?t:r},stats_list_after_cpu(){return this.view.list.filter((t=>!t.includes("cpu")))}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},gy=(0,Yd.A)(hy,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Zb,[Iu("div",Yb,[Iu("span",Jb,As(o.cpu_name),1),o.cpu_hz_current?(xu(),Au("span",ty,As(o.cpu_hz_current)+"/"+As(o.cpu_hz)+"Ghz ",1)):Ru("v-if",!0)]),Iu("div",ey,[Iu("table",ry,[o.args.percpu?Ru("v-if",!0):(xu(),Au("tr",ny,[e[0]||(e[0]=Iu("td",{scope:"col"},"CPU",-1)),Iu("td",iy,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":o.cpu,"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${o.cpu}%;`)},"   ",14,oy)]),Iu("td",sy,[Iu("span",null,As(o.cpu)+"%",1)])])),o.args.percpu?(xu(!0),Au(fu,{key:1},oc(o.percpus,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",ay,"CPU"+As(t.number),1),Iu("td",ly,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":t.total,"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${t.total}%;`)},"   ",14,cy)]),Iu("td",uy,[Iu("span",null,As(t.total)+"%",1)])])))),128)):Ru("v-if",!0),(xu(!0),Au(fu,null,oc(o.stats_list_after_cpu,(t=>(xu(),Au("tr",null,[Iu("td",py,As(t.toUpperCase()),1),Iu("td",dy,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration(t)}`),role:"progressbar","aria-valuenow":o.stats[t],"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${o.stats[t]}%;`)},"   ",14,my)]),Iu("td",fy,[Iu("span",null,As(o.stats[t])+"%",1)])])))),256))])])])}]]),by={key:0,id:"raid",class:"plugin"},yy={class:"table table-sm table-borderless margin-bottom"},vy={scope:"col"},xy={scope:"row"},wy={class:"warning"};const _y={props:{data:{type:Object}},computed:{stats(){return this.data.stats.raid},disks(){const t=Object.entries(this.stats).map((([t,e])=>{const r=Object.entries(e.components).map((([t,e])=>({number:e,name:t})));return{name:t,type:null==e.type?"UNKNOWN":e.type,used:e.used,available:e.available,status:e.status,degraded:e.used0}},methods:{getAlert:t=>t.inactive?"critical":t.degraded?"warning":"ok"}},ky=(0,Yd.A)(_y,[["render",function(t,e,r,n,i,o){return o.hasDisks?(xu(),Au("section",by,[Iu("table",yy,[Iu("thead",null,[Iu("tr",null,[Iu("th",vy,"RAID disks "+As(o.disks.length),1),e[0]||(e[0]=Iu("th",{scope:"col",class:"text-end"},"Used",-1)),e[1]||(e[1]=Iu("th",{scope:"col",class:"text-end"},"Total",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.disks,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",xy,[Lu(As(t.type.toUpperCase())+" "+As(t.name)+" ",1),Al(Iu("div",wy,"└─ Degraded mode",512),[[xp,t.degraded]]),Al(Iu("div",null,"   └─ "+As(t.config),513),[[xp,t.degraded]]),Al(Iu("div",{class:"critical"},"└─ Status "+As(t.status),513),[[xp,t.inactive]]),t.inactive?(xu(!0),Au(fu,{key:0},oc(t.components,((e,r)=>(xu(),Au("div",{key:r},"    "+As(r===t.components.length-1?"└─":"├─")+" disk "+As(e.number)+": "+As(e.name),1)))),128)):Ru("v-if",!0)]),Al(Iu("td",{scope:"row",class:xs(["text-end",o.getAlert(t)])},As(t.used),3),[[xp,"active"==t.status]]),Al(Iu("td",{scope:"row",class:xs(["text-end",o.getAlert(t)])},As(t.available),3),[[xp,"active"==t.status]])])))),128))])])])):Ru("v-if",!0)}]]),Sy={key:0,id:"smart",class:"plugin"},Ay={class:"table table-sm table-borderless margin-bottom"},Ey={scope:"row"},Cy={scope:"row"},Ty={scope:"row",class:"text-end text-truncate"};const Oy={props:{data:{type:Object}},computed:{stats(){return this.data.stats.smart},drives(){return(Array.isArray(this.stats)?this.stats:[]).map((t=>({name:t.DeviceName,details:Object.entries(t).filter((([t])=>"DeviceName"!==t)).sort((([,t],[,e])=>t.namee.name?1:0)).map((([t,e])=>e))})))},hasDrives(){return this.drives.length>0}}},Dy=(0,Yd.A)(Oy,[["render",function(t,e,r,n,i,o){return o.hasDrives?(xu(),Au("section",Sy,[Iu("table",Ay,[e[1]||(e[1]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"SMART DISKS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.drives,((t,r)=>(xu(),Au(fu,{key:r},[Iu("tr",null,[Iu("td",Ey,As(t.name),1),e[0]||(e[0]=Iu("td",{scope:"col",class:"text-end"},null,-1))]),(xu(!0),Au(fu,null,oc(t.details,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",Cy,As(t.name),1),Iu("td",Ty,As(t.raw),1)])))),128))],64)))),128))])])])):Ru("v-if",!0)}]]),Iy={key:0,id:"sensors",class:"plugin"},Py={class:"table table-sm table-borderless"},jy={scope:"row"};const Ny={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.sensors},view(){return this.data.views.sensors},sensors(){return this.stats.map((t=>(this.args.fahrenheit&&"battery"!=t.type&&"fan_speed"!=t.type&&(t.value=parseFloat(1.8*t.value+32).toFixed(1),t.unit="F"),t)))},hasSensors(){return this.sensors.length>0}},methods:{getDecoration(t){if(void 0!==this.view[t].value.decoration)return this.view[t].value.decoration.toLowerCase()}}},Ly=(0,Yd.A)(Ny,[["render",function(t,e,r,n,i,o){return o.hasSensors?(xu(),Au("section",Iy,[Iu("table",Py,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"SENSORS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.sensors,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",jy,As(t.label),1),Iu("td",{class:xs(["text-end",o.getDecoration(t.label)])},As(t.value)+As(t.unit),3)])))),128))])])])):Ru("v-if",!0)}]]),My={id:"system",class:"plugin"},Ry={key:0,class:"critical"},qy={class:"title"},By={key:1,class:"text-truncate"};const $y={props:{data:{type:Object}},data:()=>({store:qd}),computed:{stats(){return this.data.stats.system},hostname(){return this.stats.hostname},humanReadableName(){return this.stats.hr_name},isDisconnected(){return"FAILURE"===this.store.status}}},Uy=(0,Yd.A)($y,[["render",function(t,e,r,n,i,o){return xu(),Au("section",My,[o.isDisconnected?(xu(),Au("span",Ry,"Disconnected from")):Ru("v-if",!0),Iu("span",qy,As(o.hostname),1),o.isDisconnected?Ru("v-if",!0):(xu(),Au("span",By,As(o.humanReadableName),1))])}]]),Fy={id:"uptime",class:"plugin"};const zy={props:{data:{type:Object}},computed:{value(){return this.data.stats.uptime}}},Hy=(0,Yd.A)(zy,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Fy,[Iu("span",null,"Uptime: "+As(o.value),1)])}]]),Vy={key:0,id:"vms",class:"plugin"},Gy={class:"table table-sm table-borderless table-striped table-hover"};const Wy={props:{data:{type:Object}},data:()=>({store:qd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key},stats(){return this.data.stats.vms},views(){return this.data.views.vms},vms(){const{sorter:t}=this,e=(this.stats||[]).map((t=>({id:t.id,name:t.name,status:null!=t.status?t.status:"-",cpu_count:null!=t.cpu_count?t.cpu_count:"-",cpu_time:null!=t.cpu_time?t.cpu_time:"-",cpu_time_rate_per_sec:null!=t.cpu_time_rate_per_sec?t.cpu_time_rate_per_sec:"?",memory_usage:null!=t.memory_usage?t.memory_usage:"-",memory_total:null!=t.memory_total?t.memory_total:"-",load_1min:null!=t.load_1min?t.load_1min:"-",load_5min:null!=t.load_5min?t.load_5min:"-",load_15min:null!=t.load_15min?t.load_15min:"-",release:t.release,image:t.image,engine:t.engine,engine_version:t.engine_version})));return(0,am.orderBy)(e,[t.column].reduce(((t,e)=>("memory_usage"===e&&(e=["memory_usage"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"])},showEngine(){return this.views.show_engine_name}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["load_1min","cpu_time","memory_usage","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_time",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["name"].includes(t)},getColumnLabel:function(t){return{load_1min:"load",cpu_time:"CPU time",memory_usage:"memory consumption",name:"VM name",None:"None"}[t]||t}})}}}},Ky=(0,Yd.A)(Wy,[["render",function(t,e,r,n,i,o){return o.vms.length?(xu(),Au("section",Vy,[e[8]||(e[8]=Iu("span",{class:"title"},"VMs",-1)),Al(Iu("span",null,As(o.vms.length)+" sorted by "+As(i.sorter.getColumnLabel(i.sorter.column)),513),[[xp,o.vms.length>1]]),Iu("table",Gy,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",null,"Engine",512),[[xp,o.showEngine]]),Iu("td",{class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[0]||(e[0]=t=>o.args.sort_processes_key="name")}," Name ",2),e[4]||(e[4]=Iu("td",null,"Status",-1)),e[5]||(e[5]=Iu("td",null,"Core",-1)),Iu("td",{class:xs(["sortable","cpu_time"===i.sorter.column&&"sort"]),onClick:e[1]||(e[1]=t=>o.args.sort_processes_key="cpu_time")}," CPU% ",2),Iu("td",{class:xs(["sortable","memory_usage"===i.sorter.column&&"sort"]),onClick:e[2]||(e[2]=t=>o.args.sort_processes_key="memory_usage")}," MEM ",2),e[6]||(e[6]=Iu("td",null,"/ MAX",-1)),Iu("td",{class:xs(["sortable","load_1min"===i.sorter.column&&"sort"]),onClick:e[3]||(e[3]=t=>o.args.sort_processes_key="load_1min")}," LOAD 1/5/15min ",2),e[7]||(e[7]=Iu("td",null,"Release",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.vms,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",null,As(e.engine),513),[[xp,o.showEngine]]),Iu("td",null,As(e.name),1),Iu("td",{class:xs("stopped"==e.status?"careful":"ok")},As(e.status),3),Iu("td",null,As(t.$filters.number(e.cpu_count,1)),1),Iu("td",null,As(t.$filters.number(e.cpu_time,1)),1),Iu("td",null,As(t.$filters.bytes(e.memory_usage)),1),Iu("td",null," / "+As(t.$filters.bytes(e.memory_total)),1),Iu("td",null,As(t.$filters.number(e.load_1min))+"/"+As(t.$filters.number(e.load_5min))+"/"+As(t.$filters.number(e.load_15min)),1),Iu("td",null,As(e.release),1)])))),128))])])])):Ru("v-if",!0)}]]),Xy={key:0,id:"wifi",class:"plugin"},Qy={class:"table table-sm table-borderless margin-bottom"},Zy={scope:"row"};const Yy={props:{data:{type:Object}},computed:{stats(){return this.data.stats.wifi},view(){return this.data.views.wifi},hotspots(){const t=this.stats.map((t=>{if(""!==t.ssid)return{ssid:t.ssid,quality_level:t.quality_level}})).filter(Boolean);return(0,am.orderBy)(t,["ssid"])},hasHotpots(){return this.hotspots.length>0}},methods:{getDecoration(t,e){if(void 0!==this.view[t.ssid][e])return this.view[t.ssid][e].decoration.toLowerCase()}}},Jy=(0,Yd.A)(Yy,[["render",function(t,e,r,n,i,o){return o.hasHotpots?(xu(),Au("section",Xy,[Iu("table",Qy,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"WIFI"),Iu("th",{scope:"col",class:"text-end"},"dBm")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.hotspots,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Zy,As(t.$filters.limitTo(e.ssid,20)),1),Iu("td",{scope:"row",class:xs(["text-end",o.getDecoration(e,"quality_level")])},As(e.quality_level),3)])))),128))])])])):Ru("v-if",!0)}]]),tv=JSON.parse('{"r":["quicklook","cpu","percpu","gpu","mem","memswap","load"],"H":["network","ports","wifi","connections","diskio","fs","irq","folders","raid","smart","sensors"]}'),ev={components:{GlancesHelp:Jd,GlancesPluginAlert:cm,GlancesPluginCloud:mm,GlancesPluginConnections:wm,GlancesPluginCpu:Xm,GlancesPluginDiskio:xf,GlancesPluginContainers:Uf,GlancesPluginFolders:Wf,GlancesPluginFs:rh,GlancesPluginGpu:xh,GlancesPluginHostname:Ah,GlancesPluginIp:jh,GlancesPluginIrq:Bh,GlancesPluginLoad:Gh,GlancesPluginMem:mg,GlancesPluginMemswap:xg,GlancesPluginNetwork:Lg,GlancesPluginNow:qg,GlancesPluginPercpu:Wg,GlancesPluginPorts:ob,GlancesPluginProcess:Qb,GlancesPluginQuicklook:gy,GlancesPluginRaid:ky,GlancesPluginSensors:Ly,GlancesPluginSmart:Dy,GlancesPluginSystem:Uy,GlancesPluginUptime:Hy,GlancesPluginVms:Ky,GlancesPluginWifi:Jy},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},data(){return this.store.data||{}},dataLoaded(){return void 0!==this.store.data},hasGpu(){return this.store.data.stats.gpu.length>0},isLinux(){return this.store.data.isLinux},title(){const{data:t}=this,e=t.stats&&t.stats.system&&t.stats.system.hostname||"";return e?`${e} - Glances`:"Glances"},topMenu(){return void 0!==this.config.outputs&&void 0!==this.config.outputs.top_menu?this.config.outputs.top_menu.split(","):tv.r},leftMenu(){return void 0!==this.config.outputs&&void 0!==this.config.outputs.left_menu?this.config.outputs.left_menu.split(","):tv.H}},watch:{title(){document&&(document.title=this.title)}},mounted(){const t=window.__GLANCES__||{},e=isFinite(t["refresh-time"])?parseInt(t["refresh-time"],10):void 0;Fd.init(e),this.setupHotKeys()},beforeUnmount(){Ld.unbind()},methods:{setupHotKeys(){Ld("a",(()=>{this.store.args.sort_processes_key=null})),Ld("c",(()=>{this.store.args.sort_processes_key="cpu_percent"})),Ld("m",(()=>{this.store.args.sort_processes_key="memory_percent"})),Ld("u",(()=>{this.store.args.sort_processes_key="username"})),Ld("p",(()=>{this.store.args.sort_processes_key="name"})),Ld("i",(()=>{this.store.args.sort_processes_key="io_counters"})),Ld("t",(()=>{this.store.args.sort_processes_key="timemillis"})),Ld("shift+A",(()=>{this.store.args.disable_amps=!this.store.args.disable_amps})),Ld("d",(()=>{this.store.args.disable_diskio=!this.store.args.disable_diskio})),Ld("shift+Q",(()=>{this.store.args.enable_irq=!this.store.args.enable_irq})),Ld("f",(()=>{this.store.args.disable_fs=!this.store.args.disable_fs})),Ld("j",(()=>{this.store.args.programs=!this.store.args.programs})),Ld("k",(()=>{this.store.args.disable_connections=!this.store.args.disable_connections})),Ld("n",(()=>{this.store.args.disable_network=!this.store.args.disable_network})),Ld("s",(()=>{this.store.args.disable_sensors=!this.store.args.disable_sensors})),Ld("2",(()=>{this.store.args.disable_left_sidebar=!this.store.args.disable_left_sidebar})),Ld("z",(()=>{this.store.args.disable_process=!this.store.args.disable_process})),Ld("shift+S",(()=>{this.store.args.process_short_name=!this.store.args.process_short_name})),Ld("shift+D",(()=>{this.store.args.disable_containers=!this.store.args.disable_containers})),Ld("b",(()=>{this.store.args.byte=!this.store.args.byte})),Ld("shift+B",(()=>{this.store.args.diskio_iops=!this.store.args.diskio_iops,this.store.args.diskio_iops&&(this.store.args.diskio_latency=!1)})),Ld("shift+L",(()=>{this.store.args.diskio_latency=!this.store.args.diskio_latency,this.store.args.diskio_latency&&(this.store.args.diskio_iops=!1)})),Ld("l",(()=>{this.store.args.disable_alert=!this.store.args.disable_alert})),Ld("1",(()=>{this.store.args.percpu=!this.store.args.percpu})),Ld("h",(()=>{this.store.args.help_tag=!this.store.args.help_tag})),Ld("shift+T",(()=>{this.store.args.network_sum=!this.store.args.network_sum})),Ld("shift+U",(()=>{this.store.args.network_cumul=!this.store.args.network_cumul})),Ld("shift+F",(()=>{this.store.args.fs_free_space=!this.store.args.fs_free_space})),Ld("3",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook})),Ld("6",(()=>{this.store.args.meangpu=!this.store.args.meangpu})),Ld("shift+G",(()=>{this.store.args.disable_gpu=!this.store.args.disable_gpu})),Ld("5",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook,this.store.args.disable_cpu=!this.store.args.disable_cpu,this.store.args.disable_mem=!this.store.args.disable_mem,this.store.args.disable_memswap=!this.store.args.disable_memswap,this.store.args.disable_load=!this.store.args.disable_load,this.store.args.disable_gpu=!this.store.args.disable_gpu})),Ld("shift+I",(()=>{this.store.args.disable_ip=!this.store.args.disable_ip})),Ld("shift+P",(()=>{this.store.args.disable_ports=!this.store.args.disable_ports})),Ld("shift+V",(()=>{this.store.args.disable_vms=!this.store.args.disable_vms})),Ld("shift+W",(()=>{this.store.args.disable_wifi=!this.store.args.disable_wifi})),Ld("0",(()=>{this.store.args.disable_irix=!this.store.args.disable_irix}))}}};const rv=Fp((0,Yd.A)(ev,[["render",function(t,e,r,n,i,o){const s=ec("glances-help"),a=ec("glances-plugin-hostname"),l=ec("glances-plugin-uptime"),c=ec("glances-plugin-system"),u=ec("glances-plugin-ip"),p=ec("glances-plugin-now"),d=ec("glances-plugin-cloud"),m=ec("glances-plugin-quicklook"),f=ec("glances-plugin-cpu"),h=ec("glances-plugin-gpu"),g=ec("glances-plugin-mem"),b=ec("glances-plugin-memswap"),y=ec("glances-plugin-load"),v=ec("glances-plugin-vms"),x=ec("glances-plugin-containers"),w=ec("glances-plugin-process"),_=ec("glances-plugin-alert");return o.dataLoaded?o.args.help_tag?(xu(),Eu(s,{key:1})):(xu(),Au("main",Gp,[Ru(" Display minimal header on low screen size (smarthphone) "),Iu("div",Wp,[Iu("div",Kp,[o.args.disable_system?Ru("v-if",!0):(xu(),Au("div",Xp,[Pu(a,{data:o.data},null,8,["data"])])),o.args.disable_uptime?Ru("v-if",!0):(xu(),Au("div",Qp,[Pu(l,{data:o.data},null,8,["data"])]))])]),Ru(" Display standard header on others screen sizes "),Iu("div",Zp,[Iu("div",Yp,[o.args.disable_system?Ru("v-if",!0):(xu(),Au("div",Jp,[Pu(c,{data:o.data},null,8,["data"])])),o.args.disable_ip?Ru("v-if",!0):(xu(),Au("div",td,[Pu(u,{data:o.data},null,8,["data"])])),o.args.disable_now?Ru("v-if",!0):(xu(),Au("div",ed,[Pu(p,{data:o.data},null,8,["data"])])),o.args.disable_uptime?Ru("v-if",!0):(xu(),Au("div",rd,[Pu(l,{data:o.data},null,8,["data"])]))])]),Iu("div",nd,[o.args.disable_cloud?Ru("v-if",!0):(xu(),Au("div",id,[Pu(d,{data:o.data},null,8,["data"])]))]),Ru(" Display top menu with CPU, MEM, LOAD..."),Iu("div",od,[Ru(" Quicklook "),o.args.disable_quicklook?Ru("v-if",!0):(xu(),Au("div",sd,[Pu(m,{data:o.data},null,8,["data"])])),Ru(" CPU "),o.args.disable_cpu&&o.args.percpu?Ru("v-if",!0):(xu(),Au("div",ad,[Pu(f,{data:o.data},null,8,["data"])])),Ru(' TODO: percpu need to be refactor\n
\n \n
\n
\n \n
'),Ru(" GPU "),!o.args.disable_gpu&&o.hasGpu?(xu(),Au("div",ld,[Pu(h,{data:o.data},null,8,["data"])])):Ru("v-if",!0),Ru(" MEM "),o.args.disable_mem?Ru("v-if",!0):(xu(),Au("div",cd,[Pu(g,{data:o.data},null,8,["data"])])),Ru(" SWAP "),o.args.disable_memswap?Ru("v-if",!0):(xu(),Au("div",ud,[Pu(b,{data:o.data},null,8,["data"])])),Ru(" LOAD "),o.args.disable_load?Ru("v-if",!0):(xu(),Au("div",pd,[Pu(y,{data:o.data},null,8,["data"])]))]),Ru(" Display bottom of the screen with sidebar and processlist "),Iu("div",dd,[Iu("div",md,[o.args.disable_left_sidebar?Ru("v-if",!0):(xu(),Au("div",{key:0,class:xs(["col-3 d-none d-md-block",{"sidebar-min":!o.args.percpu,"sidebar-max":o.args.percpu}])},[(xu(!0),Au(fu,null,oc(o.leftMenu,(t=>{return xu(),Au(fu,null,[o.args[`disable_${t}`]?Ru("v-if",!0):(xu(),Eu((e=`glances-plugin-${t}`,Wo(e)?nc(tc,e,!1)||e:e||rc),{key:0,id:`${t}`,data:o.data},null,8,["id","data"]))],64);var e})),256))],2)),Iu("div",{class:xs(["col",{"sidebar-min":!o.args.percpu,"sidebar-max":o.args.percpu}])},[o.args.disable_vms?Ru("v-if",!0):(xu(),Eu(v,{key:0,data:o.data},null,8,["data"])),o.args.disable_containers?Ru("v-if",!0):(xu(),Eu(x,{key:1,data:o.data},null,8,["data"])),Pu(w,{data:o.data},null,8,["data"]),o.args.disable_alert?Ru("v-if",!0):(xu(),Eu(_,{key:2,data:o.data},null,8,["data"]))],2)])])])):(xu(),Au("div",Vp,e[0]||(e[0]=[Iu("div",{class:"loader"},"Glances is loading...",-1)])))}]]));rv.config.globalProperties.$filters=e,rv.mount("#app")})()})(); \ No newline at end of file +const fd="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function hd(t,e,r,n){t.addEventListener?t.addEventListener(e,r,n):t.attachEvent&&t.attachEvent("on".concat(e),r)}function gd(t,e,r,n){t.removeEventListener?t.removeEventListener(e,r,n):t.detachEvent&&t.detachEvent("on".concat(e),r)}function bd(t,e){const r=e.slice(0,e.length-1);for(let e=0;e=0;)e[r-1]+=",",e.splice(r,1),r=e.lastIndexOf("");return e}const vd={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":fd?173:189,"=":fd?61:187,";":fd?59:186,"'":222,"[":219,"]":221,"\\":220},xd={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},wd={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},_d={16:!1,18:!1,17:!1,91:!1},kd={};for(let t=1;t<20;t++)vd["f".concat(t)]=111+t;let Sd=[],Ad=null,Ed="all";const Cd=new Map,Td=t=>vd[t.toLowerCase()]||xd[t.toLowerCase()]||t.toUpperCase().charCodeAt(0);function Od(t){Ed=t||"all"}function Dd(){return Ed||"all"}function Id(t){if(void 0===t)Object.keys(kd).forEach((t=>{Array.isArray(kd[t])&&kd[t].forEach((t=>Pd(t))),delete kd[t]})),Md(null);else if(Array.isArray(t))t.forEach((t=>{t.key&&Pd(t)}));else if("object"==typeof t)t.key&&Pd(t);else if("string"==typeof t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{let{key:e,scope:r,method:n,splitKey:i="+"}=t;yd(e).forEach((t=>{const e=t.split(i),o=e.length,s=e[o-1],a="*"===s?"*":Td(s);if(!kd[a])return;r||(r=Dd());const l=o>1?bd(xd,e):[],c=[];kd[a]=kd[a].filter((t=>{const e=(!n||t.method===n)&&t.scope===r&&function(t,e){const r=t.length>=e.length?t:e,n=t.length>=e.length?e:t;let i=!0;for(let t=0;tMd(t)))}))};function jd(t,e,r,n){if(e.element!==n)return;let i;if(e.scope===r||"all"===e.scope){i=e.mods.length>0;for(const t in _d)Object.prototype.hasOwnProperty.call(_d,t)&&(!_d[t]&&e.mods.indexOf(+t)>-1||_d[t]&&-1===e.mods.indexOf(+t))&&(i=!1);(0!==e.mods.length||_d[16]||_d[18]||_d[17]||_d[91])&&!i&&"*"!==e.shortcut||(e.keys=[],e.keys=e.keys.concat(Sd),!1===e.method(t,e)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function Nd(t,e){const r=kd["*"];let n=t.keyCode||t.which||t.charCode;if(!Ld.filter.call(this,t))return;if(93!==n&&224!==n||(n=91),-1===Sd.indexOf(n)&&229!==n&&Sd.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach((e=>{const r=wd[e];t[e]&&-1===Sd.indexOf(r)?Sd.push(r):!t[e]&&Sd.indexOf(r)>-1?Sd.splice(Sd.indexOf(r),1):"metaKey"===e&&t[e]&&(Sd=Sd.filter((t=>t in wd||t===n)))})),n in _d){_d[n]=!0;for(const t in xd)xd[t]===n&&(Ld[t]=!0);if(!r)return}for(const e in _d)Object.prototype.hasOwnProperty.call(_d,e)&&(_d[e]=t[wd[e]]);t.getModifierState&&(!t.altKey||t.ctrlKey)&&t.getModifierState("AltGraph")&&(-1===Sd.indexOf(17)&&Sd.push(17),-1===Sd.indexOf(18)&&Sd.push(18),_d[17]=!0,_d[18]=!0);const i=Dd();if(r)for(let n=0;n1&&(i=bd(xd,t)),(t="*"===(t=t[t.length-1])?"*":Td(t))in kd||(kd[t]=[]),kd[t].push({keyup:l,keydown:c,scope:o,mods:i,shortcut:n[a],method:r,key:n[a],splitKey:u,element:s});if(void 0!==s&&window){if(!Cd.has(s)){const t=function(){return Nd(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,s)},e=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;Nd(t,s),function(t){let e=t.keyCode||t.which||t.charCode;const r=Sd.indexOf(e);if(r>=0&&Sd.splice(r,1),t.key&&"meta"===t.key.toLowerCase()&&Sd.splice(0,Sd.length),93!==e&&224!==e||(e=91),e in _d){_d[e]=!1;for(const t in xd)xd[t]===e&&(Ld[t]=!1)}}(t)};Cd.set(s,{keydownListener:t,keyupListenr:e,capture:p}),hd(s,"keydown",t,p),hd(s,"keyup",e,p)}if(!Ad){const t=()=>{Sd=[]};Ad={listener:t,capture:p},hd(window,"focus",t,p)}}}function Md(t){const e=Object.values(kd).flat();if(e.findIndex((e=>{let{element:r}=e;return r===t}))<0){const{keydownListener:e,keyupListenr:r,capture:n}=Cd.get(t)||{};e&&r&&(gd(t,"keyup",r,n),gd(t,"keydown",e,n),Cd.delete(t))}if(e.length<=0||Cd.size<=0){if(Object.keys(Cd).forEach((t=>{const{keydownListener:e,keyupListenr:r,capture:n}=Cd.get(t)||{};e&&r&&(gd(t,"keyup",r,n),gd(t,"keydown",e,n),Cd.delete(t))})),Cd.clear(),Object.keys(kd).forEach((t=>delete kd[t])),Ad){const{listener:t,capture:e}=Ad;gd(window,"focus",t,e),Ad=null}}}const Rd={getPressedKeyString:function(){return Sd.map((t=>{return e=t,Object.keys(vd).find((t=>vd[t]===e))||(t=>Object.keys(xd).find((e=>xd[e]===t)))(t)||String.fromCharCode(t);var e}))},setScope:Od,getScope:Dd,deleteScope:function(t,e){let r,n;t||(t=Dd());for(const e in kd)if(Object.prototype.hasOwnProperty.call(kd,e))for(r=kd[e],n=0;n{let{element:e}=t;return Md(e)}))}else n++;Dd()===t&&Od(e||"all")},getPressedKeyCodes:function(){return Sd.slice(0)},getAllKeyCodes:function(){const t=[];return Object.keys(kd).forEach((e=>{kd[e].forEach((e=>{let{key:r,scope:n,mods:i,shortcut:o}=e;t.push({scope:n,shortcut:o,mods:i,keys:r.split("+").map((t=>Td(t)))})}))})),t},isPressed:function(t){return"string"==typeof t&&(t=Td(t)),-1!==Sd.indexOf(t)},filter:function(t){const e=t.target||t.srcElement,{tagName:r}=e;let n=!0;const i="INPUT"===r&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||"TEXTAREA"===r||"SELECT"===r)&&!e.readOnly)&&(n=!1),n},trigger:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(kd).forEach((r=>{kd[r].filter((r=>r.scope===e&&r.shortcut===t)).forEach((t=>{t&&t.method&&t.method()}))}))},unbind:Id,keyMap:vd,modifier:xd,modifierMap:wd};for(const t in Rd)Object.prototype.hasOwnProperty.call(Rd,t)&&(Ld[t]=Rd[t]);if("undefined"!=typeof window){const t=window.hotkeys;Ld.noConflict=e=>(e&&window.hotkeys===Ld&&(window.hotkeys=t),Ld),window.hotkeys=Ld}const qd=Ra({args:void 0,config:void 0,data:void 0,status:"IDLE"});var Bd=r(4644),$d=r.n(Bd);const Ud=new class{limits={};limitSuffix=["critical","careful","warning"];setLimits(t){this.limits=t}getLimit(t,e){return null!=this.limits[t]&&null!=this.limits[t][e]?this.limits[t][e]:null}getAlert(t,e,r,n,i){var o=(i=i||!1)?"_log":"",s=100*(r=r||0)/(n=n||100);if(null!=this.limits[t])for(var a=0;a=this.limits[t][l]){var c=l.lastIndexOf("_");return l.substring(c+1)+o}}return"ok"+o}getAlertLog(t,e,r,n){return this.getAlert(t,e,r,n,!0)}};const Fd=new class{data=void 0;init(t=60){let e;const r=()=>(qd.status="PENDING",Promise.all([fetch("api/4/all",{method:"GET"}).then((t=>t.json())),fetch("api/4/all/views",{method:"GET"}).then((t=>t.json()))]).then((t=>{const e={stats:t[0],views:t[1],isBsd:"FreeBSD"===t[0].system?.os_name,isLinux:"Linux"===t[0].system?.os_name,isSunOS:"SunOS"===t[0].system?.os_name,isMac:"Darwin"===t[0].system?.os_name,isWindows:"Windows"===t[0].system?.os_name};this.data=e,qd.data=e,qd.status="SUCCESS"})).catch((t=>{console.log(t),qd.status="FAILURE"})).then((()=>{e&&clearTimeout(e),e=setTimeout(r,1e3*t)})));r(),fetch("api/4/all/limits",{method:"GET"}).then((t=>t.json())).then((t=>{Ud.setLimits(t)})),fetch("api/4/args",{method:"GET"}).then((t=>t.json())).then(((t={})=>{qd.args={...qd.args,...t}})),fetch("api/4/config",{method:"GET"}).then((t=>t.json())).then(((t={})=>{qd.config={...qd.config,...t}}))}getData(){return this.data}};const zd=new class{constructor(){this.favico=new($d())({animation:"none"})}badge(t){this.favico.badge(t)}reset(){this.favico.reset()}},Hd={key:0},Vd={class:"container-fluid"},Gd={class:"row"},Wd={class:"col-sm-12 col-lg-24 title"},Kd={class:"row"},Xd={class:"col-sm-12 col-lg-24"},Qd={class:"table table-sm table-borderless table-striped table-hover"};const Zd={data:()=>({help:void 0}),mounted(){fetch("api/4/help",{method:"GET"}).then((t=>t.json())).then((t=>this.help=t))}};var Yd=r(6262);const Jd=(0,Yd.A)(Zd,[["render",function(t,e,r,n,i,o){return i.help?(xu(),Au("div",Hd,[Iu("div",Vd,[Iu("div",Gd,[Iu("div",Wd,As(i.help.version)+" "+As(i.help.psutil_version),1)]),e[0]||(e[0]=Iu("div",{class:"row"}," ",-1)),Iu("div",Kd,[Iu("div",Xd,As(i.help.configuration_file),1)]),e[1]||(e[1]=Iu("div",{class:"row"}," ",-1))]),Iu("table",Qd,[Iu("thead",null,[Iu("tr",null,[Iu("th",null,As(i.help.header_sort.replace(":","")),1),Iu("th",null,As(i.help.header_show_hide.replace(":","")),1),Iu("th",null,As(i.help.header_toggle.replace(":","")),1),Iu("th",null,As(i.help.header_miscellaneous.replace(":","")),1)])]),Iu("tbody",null,[Iu("tr",null,[Iu("td",null,As(i.help.sort_auto),1),Iu("td",null,As(i.help.show_hide_application_monitoring),1),Iu("td",null,As(i.help.toggle_bits_bytes),1),Iu("td",null,As(i.help.misc_erase_process_filter),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_cpu),1),Iu("td",null,As(i.help.show_hide_diskio),1),Iu("td",null,As(i.help.toggle_count_rate),1),Iu("td",null,As(i.help.misc_generate_history_graphs),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_io_rate),1),Iu("td",null,As(i.help.show_hide_containers),1),Iu("td",null,As(i.help.toggle_used_free),1),Iu("td",null,As(i.help.misc_help),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_mem),1),Iu("td",null,As(i.help.show_hide_top_extended_stats),1),Iu("td",null,As(i.help.toggle_bar_sparkline),1),Iu("td",null,As(i.help.misc_accumulate_processes_by_program),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_process_name),1),Iu("td",null,As(i.help.show_hide_filesystem),1),Iu("td",null,As(i.help.toggle_separate_combined),1),e[2]||(e[2]=Iu("td",null," ",-1))]),Iu("tr",null,[Iu("td",null,As(i.help.sort_cpu_times),1),Iu("td",null,As(i.help.show_hide_gpu),1),Iu("td",null,As(i.help.toggle_live_cumulative),1),Iu("td",null,As(i.help.misc_reset_processes_summary_min_max),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_user),1),Iu("td",null,As(i.help.show_hide_ip),1),Iu("td",null,As(i.help.toggle_linux_percentage),1),Iu("td",null,As(i.help.misc_quit),1)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_tcp_connection),1),Iu("td",null,As(i.help.toggle_cpu_individual_combined),1),Iu("td",null,As(i.help.misc_reset_history),1)]),Iu("tr",null,[e[4]||(e[4]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_alert),1),Iu("td",null,As(i.help.toggle_gpu_individual_combined),1),Iu("td",null,As(i.help.misc_delete_warning_alerts),1)]),Iu("tr",null,[e[5]||(e[5]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_network),1),Iu("td",null,As(i.help.toggle_short_full),1),Iu("td",null,As(i.help.misc_delete_warning_and_critical_alerts),1)]),Iu("tr",null,[e[6]||(e[6]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.sort_cpu_times),1),e[7]||(e[7]=Iu("td",null," ",-1)),e[8]||(e[8]=Iu("td",null," ",-1))]),Iu("tr",null,[e[9]||(e[9]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_irq),1),e[10]||(e[10]=Iu("td",null," ",-1)),e[11]||(e[11]=Iu("td",null," ",-1))]),Iu("tr",null,[e[12]||(e[12]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_raid_plugin),1),e[13]||(e[13]=Iu("td",null," ",-1)),e[14]||(e[14]=Iu("td",null," ",-1))]),Iu("tr",null,[e[15]||(e[15]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_sensors),1),e[16]||(e[16]=Iu("td",null," ",-1)),e[17]||(e[17]=Iu("td",null," ",-1))]),Iu("tr",null,[e[18]||(e[18]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_wifi_module),1),e[19]||(e[19]=Iu("td",null," ",-1)),e[20]||(e[20]=Iu("td",null," ",-1))]),Iu("tr",null,[e[21]||(e[21]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_processes),1),e[22]||(e[22]=Iu("td",null," ",-1)),e[23]||(e[23]=Iu("td",null," ",-1))]),Iu("tr",null,[e[24]||(e[24]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_left_sidebar),1),e[25]||(e[25]=Iu("td",null," ",-1)),e[26]||(e[26]=Iu("td",null," ",-1))]),Iu("tr",null,[e[27]||(e[27]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_quick_look),1),e[28]||(e[28]=Iu("td",null," ",-1)),e[29]||(e[29]=Iu("td",null," ",-1))]),Iu("tr",null,[e[30]||(e[30]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_cpu_mem_swap),1),e[31]||(e[31]=Iu("td",null," ",-1)),e[32]||(e[32]=Iu("td",null," ",-1))]),Iu("tr",null,[e[33]||(e[33]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_all),1),e[34]||(e[34]=Iu("td",null," ",-1)),e[35]||(e[35]=Iu("td",null," ",-1))])])]),e[36]||(e[36]=Mu('
 

For an exhaustive list of key bindings, click here.

 

Press h to came back to Glances.

',5))])):Ru("v-if",!0)}]]),tm={id:"alerts",class:"plugin"},em={key:0,class:"title"},rm={key:1,class:"title"},nm={class:"table table-sm table-borderless"},im={scope:"row"},om={scope:"row"},sm={scope:"row"};var am=r(2543);const lm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.alert},alerts(){return(this.stats||[]).map((t=>{const e={};if(e.state=t.state,e.type=t.type,e.begin=1e3*t.begin,e.end=1e3*t.end,e.ongoing=-1==t.end,e.min=t.min,e.avg=t.avg,e.max=t.max,t.top.length>0&&(e.top=": "+t.top.join(", ")),!e.ongoing){const t=e.end-e.begin,r=parseInt(t/1e3%60),n=parseInt(t/6e4%60),i=parseInt(t/36e5%24);e.duration=(0,am.padStart)(i,2,"0")+":"+(0,am.padStart)(n,2,"0")+":"+(0,am.padStart)(r,2,"0")}return e}))},hasAlerts(){return this.countAlerts>0},countAlerts(){return this.alerts.length},hasOngoingAlerts(){return this.countOngoingAlerts>0},countOngoingAlerts(){return this.alerts.filter((({ongoing:t})=>t)).length}},watch:{countOngoingAlerts(){this.countOngoingAlerts?zd.badge(this.countOngoingAlerts):zd.reset()}},methods:{formatDate(t){const e=(new Date).getTimezoneOffset(),r=Math.trunc(Math.abs(e)/60),n=Math.abs(e%60);let i=e<=0?"+":"-";i+=String(r).padStart(2,"0")+String(n).padStart(2,"0");const o=new Date(t);return String(o.getFullYear())+"-"+String(o.getMonth()+1).padStart(2,"0")+"-"+String(o.getDate()).padStart(2,"0")+" "+String(o.getHours()).padStart(2,"0")+":"+String(o.getMinutes()).padStart(2,"0")+":"+String(o.getSeconds()).padStart(2,"0")+"("+i+")"},clear(){fetch("api/4/events/clear/all",{method:"POST",headers:{"Content-Type":"application/json"}}).then((t=>t.json())).then((t=>product.value=t))}}},cm=(0,Yd.A)(lm,[["render",function(t,e,r,n,i,o){return xu(),Au("section",tm,[o.hasAlerts?(xu(),Au("span",em,[Lu(" Warning or critical alerts (last "+As(o.countAlerts)+" entries) ",1),Iu("span",null,[Iu("button",{class:"button",onClick:e[0]||(e[0]=t=>o.clear())},"Clear alerts")])])):(xu(),Au("span",rm,"No warning or critical alert detected")),Iu("table",nm,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.alerts,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",im,[Iu("span",null,As(o.formatDate(e.begin)),1)]),Iu("td",om,[Iu("span",null,"("+As(e.ongoing?"ongoing":e.duration)+")",1)]),Iu("td",sm,[Al(Iu("span",null,As(e.state)+" on ",513),[[xp,!e.ongoing]]),Iu("span",{class:xs(e.state.toLowerCase())},As(e.type),3),Iu("span",null,"("+As(t.$filters.number(e.max,1))+")",1),Iu("span",null,As(e.top),1)])])))),128))])])])}]]),um={key:0,id:"cloud",class:"plugin"},pm={class:"title"};const dm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.cloud},provider(){return void 0!==this.stats.id?`${stats.platform}`:null},instance(){const{stats:t}=this;return void 0!==this.stats.id?`${t.type} instance ${t.name} (${t.region})`:null}}},mm=(0,Yd.A)(dm,[["render",function(t,e,r,n,i,o){return o.instance||o.provider?(xu(),Au("section",um,[Iu("span",pm,As(o.provider),1),Lu(" "+As(o.instance),1)])):Ru("v-if",!0)}]]),fm={id:"connections",class:"plugin"},hm={class:"table table-sm table-borderless margin-bottom"},gm={class:"text-end"},bm={class:"text-end"},ym={class:"text-end"},vm={class:"text-end"};const xm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.connections},view(){return this.data.views.connections},listen(){return this.stats.LISTEN},initiated(){return this.stats.initiated},established(){return this.stats.ESTABLISHED},terminated(){return this.stats.terminated},tracked(){return{count:this.stats.nf_conntrack_count,max:this.stats.nf_conntrack_max}}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},wm=(0,Yd.A)(xm,[["render",function(t,e,r,n,i,o){return xu(),Au("section",fm,[Iu("table",hm,[e[5]||(e[5]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"TCP CONNECTIONS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("td",{scope:"row"},"Listen",-1)),Iu("td",gm,As(o.listen),1)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"Initiated",-1)),Iu("td",bm,As(o.initiated),1)]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"Established",-1)),Iu("td",ym,As(o.established),1)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"Terminated",-1)),Iu("td",vm,As(o.terminated),1)]),Iu("tr",null,[e[4]||(e[4]=Iu("td",{scope:"row"},"Tracked",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("nf_conntrack_percent")])},As(o.tracked.count)+"/"+As(o.tracked.max),3)])])])])}]]),_m={id:"cpu",class:"plugin"},km={class:"table-responsive"},Sm={class:"table-sm table-borderless"},Am={class:"justify-content-between"},Em={scope:"col"},Cm={class:"table table-sm table-borderless"},Tm={key:0,scope:"col"},Om={class:"d-none d-xl-block d-xxl-block"},Dm={class:"table table-sm table-borderless"},Im={scope:"col"},Pm={scope:"col",class:"text-end"},jm={scope:"col"},Nm={scope:"col",class:"text-end"},Lm={scope:"col"},Mm={scope:"col",class:"text-end"},Rm={key:0,scope:"col"},qm={scope:"col"},Bm={class:"d-none d-xxl-block"},$m={class:"table table-sm table-borderless"},Um={key:0,scope:"col"},Fm={scope:"col"},zm={scope:"col",class:"text-end"},Hm={key:0,scope:"col"},Vm={key:1,scope:"col",class:"text-end"},Gm={key:0,scope:"col"},Wm={key:1,scope:"col",class:"text-end"};const Km={props:{data:{type:Object}},computed:{stats(){return this.data.stats.cpu},view(){return this.data.views.cpu},isLinux(){return this.data.isLinux},isSunOS(){return this.data.isSunOS},isWindows(){return this.data.isWindows},total(){return this.stats.total},user(){return this.stats.user},system(){return this.stats.system},idle(){return this.stats.idle},nice(){return this.stats.nice},irq(){return this.stats.irq},iowait(){return this.stats.iowait},dpc(){return this.stats.dpc},steal(){return this.stats.steal},guest(){return this.stats.guest},ctx_switches(){const{stats:t}=this;return t.ctx_switches?Math.floor(t.ctx_switches/t.time_since_update):null},interrupts(){const{stats:t}=this;return t.interrupts?Math.floor(t.interrupts/t.time_since_update):null},soft_interrupts(){const{stats:t}=this;return t.soft_interrupts?Math.floor(t.soft_interrupts/t.time_since_update):null},syscalls(){const{stats:t}=this;return t.syscalls?Math.floor(t.syscalls/t.time_since_update):null}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},Xm=(0,Yd.A)(Km,[["render",function(t,e,r,n,i,o){return xu(),Au("section",_m,[Ru(" d-none d-xxl-block "),Iu("div",km,[Iu("table",Sm,[Iu("tbody",null,[Iu("tr",Am,[Iu("td",Em,[Iu("table",Cm,[Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"CPU",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("total")])},[Iu("span",null,As(o.total)+"%",1)],2)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"col"},"user:",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("user")])},[Iu("span",null,As(o.user)+"%",1)],2)]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"col"},"system:",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("system")])},[Iu("span",null,As(o.system)+"%",1)],2)]),Iu("tr",null,[null!=o.iowait?(xu(),Au("td",Tm,"iowait:")):Ru("v-if",!0),null!=o.iowait?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("iowait")])},[Iu("span",null,As(o.iowait)+"%",1)],2)):Ru("v-if",!0)])])])]),Iu("td",null,[Iu("template",Om,[Iu("table",Dm,[Iu("tbody",null,[Iu("tr",null,[Al(Iu("td",Im,"idle:",512),[[xp,null!=o.idle]]),Al(Iu("td",Pm,[Iu("span",null,As(o.idle)+"%",1)],512),[[xp,null!=o.idle]])]),Iu("tr",null,[Al(Iu("td",jm,"irq:",512),[[xp,null!=o.irq]]),Al(Iu("td",Nm,[Iu("span",null,As(o.irq)+"%",1)],512),[[xp,null!=o.irq]])]),Iu("tr",null,[Al(Iu("td",Lm,"nice:",512),[[xp,null!=o.nice]]),Al(Iu("td",Mm,[Iu("span",null,As(o.nice)+"%",1)],512),[[xp,null!=o.nice]])]),Iu("tr",null,[null==o.iowait&&null!=o.dpc?(xu(),Au("td",Rm,"dpc:")):Ru("v-if",!0),null==o.iowait&&null!=o.dpc?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("dpc")])},[Iu("span",null,As(o.dpc)+"%",1)],2)):Ru("v-if",!0),Al(Iu("td",qm,"steal:",512),[[xp,null!=o.steal]]),Al(Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("steal")])},[Iu("span",null,As(o.steal)+"%",1)],2),[[xp,null!=o.steal]])])])])])]),Iu("td",null,[Iu("template",Bm,[Iu("table",$m,[Iu("tbody",null,[Iu("tr",null,[null!=o.nice&&null!=o.ctx_switches?(xu(),Au("td",Um," ctx_sw:")):Ru("v-if",!0),null!=o.nice&&null!=o.ctx_switches?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("ctx_switches")])},[Iu("span",null,As(o.ctx_switches),1)],2)):Ru("v-if",!0)]),Iu("tr",null,[Al(Iu("td",Fm,"inter:",512),[[xp,null!=o.interrupts]]),Al(Iu("td",zm,[Iu("span",null,As(o.interrupts),1)],512),[[xp,null!=o.interrupts]])]),Iu("tr",null,[o.isWindows||o.isSunOS||null==o.soft_interrupts?Ru("v-if",!0):(xu(),Au("td",Hm,"sw_int: ")),o.isWindows||o.isSunOS||null==o.soft_interrupts?Ru("v-if",!0):(xu(),Au("td",Vm,[Iu("span",null,As(o.soft_interrupts),1)]))]),Iu("tr",null,[o.isLinux&&null!=o.guest?(xu(),Au("td",Gm,"guest:")):Ru("v-if",!0),o.isLinux&&null!=o.guest?(xu(),Au("td",Wm,[Iu("span",null,As(o.guest)+"%",1)])):Ru("v-if",!0)])])])])])])])])])])}]]),Qm={key:0,id:"diskio",class:"plugin"},Zm={class:"table table-sm table-borderless margin-bottom"},Ym={scope:"col",class:"text-end w-25"},Jm={scope:"col",class:"text-end w-25"},tf={scope:"col",class:"text-end w-25"},ef={scope:"col",class:"text-end w-25"},rf={scope:"col",class:"text-end w-25"},nf={scope:"col",class:"text-end w-25"},of={scope:"row",class:"text-truncate"};var sf=r(4728),af=r.n(sf);function lf(t,e){return cf(t=8*Math.round(t),e)+"b"}function cf(t,e){if(e=e||!1,isNaN(parseFloat(t))||!isFinite(t)||0==t)return t;const r=["Y","Z","E","P","T","G","M","K"],n={Y:12089258196146292e8,Z:11805916207174113e5,E:0x1000000000000000,P:0x4000000000000,T:1099511627776,G:1073741824,M:1048576,K:1024};for(var i=0;i1){var a=0;return s<10?a=2:s<100&&(a=1),e?a="MK"==o?0:(0,am.min)([1,a]):"K"==o&&(a=0),parseFloat(s).toFixed(a)+o}}return t.toFixed(0)}function uf(t){return void 0===t||""===t?"?":t}function pf(t,e,r){return e=e||0,r=r||" ",String(t).padStart(e,r)}function df(t,e){return"function"!=typeof t.slice&&(t=String(t)),t.slice(0,e)}function mf(t,e,r=!0){return e=e||8,t.length>e?r?t.substring(0,e-1)+"_":"_"+t.substring(t.length-e+1):t}function ff(t){if(void 0===t)return t;var e=function(t){var e=document.createElement("div");return e.innerText=t,e.innerHTML}(t),r=e.replace(/\n/g,"
");return af()(r)}function hf(t,e){return void 0===t||isNaN(t)?"-":new Intl.NumberFormat("en-US","number"==typeof e?{maximumFractionDigits:e}:e).format(t)}function gf(t){for(var e=0,r=0;r`${t}: ${e}`)).join(" / ")}const vf={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.diskio},view(){return this.data.views.diskio},disks(){const t=this.stats.map((t=>({name:t.disk_name,alias:void 0!==t.alias?t.alias:null,bitrate:{txps:cf(t.read_bytes_rate_per_sec),rxps:cf(t.write_bytes_rate_per_sec)},count:{txps:cf(t.read_count_rate_per_sec),rxps:cf(t.write_count_rate_per_sec)},latency:{txps:cf(t.read_latency),rxps:cf(t.write_latency)}}))).filter((t=>{const e=this.view[t.name].read_bytes_rate_per_sec,r=this.view[t.name].write_bytes_rate_per_sec;return!(e&&!1!==e.hidden||r&&!1!==r.hidden)}));return(0,am.orderBy)(t,["name"])},hasDisks(){return this.disks.length>0}},methods:{getDecoration(t,e){return null==this.view[t][e]?null==this.view[e]?void 0:this.view[e].decoration.toLowerCase():this.view[t][e].decoration.toLowerCase()}}},xf=(0,Yd.A)(vf,[["render",function(t,e,r,n,i,o){return o.hasDisks?(xu(),Au("section",Qm,[Iu("table",Zm,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"DISK I/O",-1)),Al(Iu("th",Ym,"Rps",512),[[xp,!o.args.diskio_iops&&!o.args.diskio_latency]]),Al(Iu("th",Jm,"Wps",512),[[xp,!o.args.diskio_iops&&!o.args.diskio_latency]]),Al(Iu("th",tf,"ms/opR",512),[[xp,o.args.diskio_latency]]),Al(Iu("th",ef,"ms/opW",512),[[xp,o.args.diskio_latency]]),Al(Iu("th",rf,"IORps",512),[[xp,o.args.diskio_iops]]),Al(Iu("th",nf,"IOWps",512),[[xp,o.args.diskio_iops]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.disks,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",of,As(t.$filters.minSize(e.alias?e.alias:e.name,16)),1),Al(Iu("td",{class:xs(["text-end w-25",o.getDecoration(e.name,"write_bytes_rate_per_sec")])},As(e.bitrate.txps),3),[[xp,!o.args.diskio_iops&&!o.args.diskio_latency]]),Al(Iu("td",{class:xs(["text-end w-25",o.getDecoration(e.name,"read_bytes_rate_per_sec")])},As(e.bitrate.rxps),3),[[xp,!o.args.diskio_iops&&!o.args.diskio_latency]]),Al(Iu("td",{class:xs(["text-end w-25",o.getDecoration(e.name,"write_latency")])},As(e.latency.txps),3),[[xp,o.args.diskio_latency]]),Al(Iu("td",{class:xs(["text-end w-25",o.getDecoration(e.name,"read_latency")])},As(e.latency.rxps),3),[[xp,o.args.diskio_latency]]),Al(Iu("td",{class:"text-end w-25"},As(e.count.txps),513),[[xp,o.args.diskio_iops]]),Al(Iu("td",{class:"text-end w-25"},As(e.count.rxps),513),[[xp,o.args.diskio_iops]])])))),128))])])])):Ru("v-if",!0)}]]),wf={key:0,id:"containers",class:"plugin"},_f={class:"table-responsive d-md-none"},kf={class:"table table-sm table-borderless table-striped table-hover"},Sf={scope:"col"},Af={scope:"col"},Ef={scope:"col"},Cf={scope:"col"},Tf={class:"table-responsive d-none d-md-block"},Of={class:"table table-sm table-borderless table-striped table-hover"},Df={scope:"col"},If={scope:"col"},Pf={scope:"col"},jf={scope:"col"},Nf={scope:"col"},Lf={scope:"col"},Mf={scope:"col"},Rf={scope:"col"},qf={scope:"col"},Bf={scope:"col"},$f={scope:"col"};const Uf={props:{data:{type:Object}},data:()=>({store:qd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key},stats(){return this.data.stats.containers},views(){return this.data.views.containers},containers(){const{sorter:t}=this,e=(this.stats||[]).map((t=>{let e;return null!=t.memory_usage?(e=t.memory_usage,null!=t.memory_inactive_file&&(e-=t.memory_inactive_file)):e=void 0,{id:t.id,name:t.name,status:t.status,uptime:t.uptime,cpu_percent:t.cpu.total,memory_usage:e,limit:t.memory.limit,io_rx:t.io_rx,io_wx:t.io_wx,network_rx:t.network_rx,network_tx:t.network_tx,ports:t.ports,command:t.command,image:t.image,engine:t.engine,pod_id:t.pod_id}}));return(0,am.orderBy)(e,[t.column].map((t=>e=>e["memory_percent"===t?"memory_usage":t]??-1/0),[]),[t.isReverseColumn(t.column)?"desc":"asc"])},showEngine(){return this.views.show_engine_name},showPod(){return this.views.show_pod_name}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["cpu_percent","memory_percent","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["name"].includes(t)},getColumnLabel:function(t){return{io_counters:"disk IO",cpu_percent:"CPU consumption",memory_usage:"memory consumption",cpu_times:"uptime",name:"container name",None:"None"}[t]||t}})}}},methods:{getDisableStats:()=>Ud.getLimit("containers","containers_disable_stats")||[]}},Ff=(0,Yd.A)(Uf,[["render",function(t,e,r,n,i,o){return o.containers.length?(xu(),Au("section",wf,[e[6]||(e[6]=Iu("span",{class:"title"},"CONTAINERS",-1)),Al(Iu("span",null,As(o.containers.length)+" sorted by "+As(i.sorter.getColumnLabel(i.sorter.column)),513),[[xp,o.containers.length>1]]),Iu("div",_f,[Iu("table",kf,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",Sf,"Pod",512),[[xp,o.showPod]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[0]||(e[0]=t=>o.args.sort_processes_key="name")}," Name ",2),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",Af,"Status",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===i.sorter.column&&"sort"]),onClick:e[1]||(e[1]=t=>o.args.sort_processes_key="cpu_percent")}," CPU% ",2),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===i.sorter.column&&"sort"]),onClick:e[2]||(e[2]=t=>o.args.sort_processes_key="memory_percent")}," MEM ",2),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Ef,"MAX",512),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Cf,"Command",512),[[xp,!o.getDisableStats().includes("command")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.containers,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row"},As(e.pod_id||"-"),513),[[xp,o.showPod]]),Al(Iu("td",{scope:"row"},As(e.name),513),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",{scope:"row",class:xs(["Paused"===e.status&&"careful","exited"===e.status&&"warning",!["Paused","exited"].includes(e.status)&&"ok"])},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row"},As(t.$filters.number(e.cpu_percent,1)),513),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.memory_usage??NaN)?"-":t.$filters.bytes(e.memory_usage)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.limit??NaN)?"-":t.$filters.bytes(e.limit)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.ports),513),[[xp,!o.getDisableStats().includes("ports")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.command),513),[[xp,!o.getDisableStats().includes("command")]])])))),128))])])]),Iu("div",Tf,[Iu("table",Of,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",Df,"Engine",512),[[xp,o.showEngine]]),Al(Iu("td",If,"Pod",512),[[xp,o.showPod]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[3]||(e[3]=t=>o.args.sort_processes_key="name")}," Name ",2),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",Pf,"Status",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",jf,"Uptime",512),[[xp,!o.getDisableStats().includes("uptime")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===i.sorter.column&&"sort"]),onClick:e[4]||(e[4]=t=>o.args.sort_processes_key="cpu_percent")}," CPU% ",2),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===i.sorter.column&&"sort"]),onClick:e[5]||(e[5]=t=>o.args.sort_processes_key="memory_percent")}," MEM ",2),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Nf,"MAX",512),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Lf,"IORps",512),[[xp,!o.getDisableStats().includes("diskio")]]),Al(Iu("td",Mf,"IOWps",512),[[xp,!o.getDisableStats().includes("diskio")]]),Al(Iu("td",Rf,"RXps",512),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",qf,"TXps",512),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",Bf,"Ports",512),[[xp,!o.getDisableStats().includes("ports")]]),Al(Iu("td",$f,"Command",512),[[xp,!o.getDisableStats().includes("command")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.containers,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row"},As(e.engine),513),[[xp,o.showEngine]]),Al(Iu("td",{scope:"row"},As(e.pod_id||"-"),513),[[xp,o.showPod]]),Al(Iu("td",{scope:"row"},As(e.name),513),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",{scope:"row",class:xs(["Paused"===e.status&&"careful","exited"===e.status&&"warning",!["Paused","exited"].includes(e.status)&&"ok"])},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row"},As(e.uptime),513),[[xp,!o.getDisableStats().includes("uptime")]]),Al(Iu("td",{scope:"row"},As(t.$filters.number(e.cpu_percent,1)),513),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.memory_usage??NaN)?"-":t.$filters.bytes(e.memory_usage)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.limit??NaN)?"-":t.$filters.bytes(e.limit)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.io_rx??NaN)?"-":t.$filters.bytes(e.io_rx)),513),[[xp,!o.getDisableStats().includes("iodisk")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.io_wx??NaN)?"-":t.$filters.bytes(e.io_wx)),513),[[xp,!o.getDisableStats().includes("iodisk")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.network_rx??NaN)?"-":t.$filters.bits(e.network_rx)),513),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",{scope:"row"},As(isNaN(e.network_tx??NaN)?"-":t.$filters.bits(e.network_tx)),513),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",{scope:"row"},As(e.ports),513),[[xp,!o.getDisableStats().includes("ports")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.command),513),[[xp,!o.getDisableStats().includes("command")]])])))),128))])])])])):Ru("v-if",!0)}]]),zf={key:0,id:"folders",class:"plugin"},Hf={class:"table table-sm table-borderless margin-bottom"},Vf={scope:"row"},Gf={key:0,class:"visible-lg-inline"};const Wf={props:{data:{type:Object}},computed:{stats(){return this.data.stats.folders},folders(){return this.stats.map((t=>({path:t.path,size:t.size,errno:t.errno,careful:t.careful,warning:t.warning,critical:t.critical})))},hasFolders(){return this.folders.length>0}},methods:{getDecoration:t=>t.errno>0?"error":null!==t.critical&&t.size>1e6*t.critical?"critical":null!==t.warning&&t.size>1e6*t.warning?"warning":null!==t.careful&&t.size>1e6*t.careful?"careful":"ok"}},Kf=(0,Yd.A)(Wf,[["render",function(t,e,r,n,i,o){return o.hasFolders?(xu(),Au("section",zf,[Iu("table",Hf,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"FOLDERS"),Iu("th",{scope:"col",class:"text-end"},"Size")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.folders,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Vf,As(e.path),1),Iu("td",{class:xs(["text-end",o.getDecoration(e)])},[e.errno>0?(xu(),Au("span",Gf,"?")):Ru("v-if",!0),Lu(" "+As(t.$filters.bytes(e.size)),1)],2)])))),128))])])])):Ru("v-if",!0)}]]),Xf={key:0,id:"fs",class:"plugin"},Qf={class:"table table-sm table-borderless margin-bottom"},Zf={key:0,scope:"col",class:"text-end w-25"},Yf={key:1,scope:"col",class:"text-end w-25"},Jf={scope:"row"},th={key:0,class:"visible-lg-inline"},eh={scope:"row",class:"text-end"};const rh={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.fs},view(){return this.data.views.fs},fileSystems(){const t=this.stats.map((t=>({name:t.device_name,mountPoint:t.mnt_point,percent:t.percent,size:t.size,used:t.used,free:t.free,alias:void 0!==t.alias?t.alias:null})));return(0,am.orderBy)(t,["mnt_point"])},hasFs(){return this.fileSystems.length>0}},methods:{getDecoration(t,e){if(null!=this.view[t][e])return this.view[t][e].decoration.toLowerCase()}}},nh=(0,Yd.A)(rh,[["render",function(t,e,r,n,i,o){return o.hasFs?(xu(),Au("section",Xf,[Iu("table",Qf,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"FILE SYSTEM",-1)),o.args.fs_free_space?(xu(),Au("th",Yf,"Free")):(xu(),Au("th",Zf,"Used")),e[1]||(e[1]=Iu("th",{scope:"col",class:"text-end w-25"},"Total",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.fileSystems,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Jf,[Lu(As(t.$filters.minSize(e.alias?e.alias:e.mountPoint,16,t.begin=!1))+" ",1),(e.alias?e.alias:e.mountPoint).length+e.name.length<=15?(xu(),Au("span",th," ("+As(e.name)+") ",1)):Ru("v-if",!0)]),o.args.fs_free_space?(xu(),Au("td",{key:1,scope:"row",class:xs(["text-end",o.getDecoration(e.mountPoint,"used")])},As(t.$filters.bytes(e.free)),3)):(xu(),Au("td",{key:0,scope:"row",class:xs(["text-end",o.getDecoration(e.mountPoint,"used")])},As(t.$filters.bytes(e.used)),3)),Iu("td",eh,As(t.$filters.bytes(e.size)),1)])))),128))])])])):Ru("v-if",!0)}]]),ih={key:0,id:"gpu",class:"plugin"},oh={class:"title text-truncate"},sh={key:0,class:"table-responsive"},ah={key:1,class:"col text-end"},lh={key:1,class:"col text-end"},ch={key:1,class:"col text-end"},uh={key:1,class:"table-responsive"},ph={class:"table table-sm table-borderless"},dh={class:"col"},mh={key:1,class:"col"},fh={key:3,class:"col text-end"},hh={key:2,class:"table-responsive"},gh={class:"table table-sm table-borderless"},bh={key:1,class:"col"},yh={key:1,class:"col"},vh={key:1,class:"col"};const xh={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.gpu},view(){return this.data.views.gpu},gpus(){return this.stats},name(){let t="GPU";const{stats:e}=this;return 1===e.length?t=e[0].name:e.length&&(t=`${e.length} GPU ${e[0].name}`),t},mean(){const t={proc:null,mem:null,temperature:null},{stats:e}=this;if(!e.length)return t;for(const r of e)t.proc+=r.proc,t.mem+=r.mem,t.temperature+=r.temperature;return t.proc=t.proc/e.length,t.mem=t.mem/e.length,t.temperature=t.temperature/e.length,t}},methods:{getDecoration(t,e){if(void 0!==this.view[t][e])return this.view[t][e].decoration.toLowerCase()},getMeanDecoration:t=>"DEFAULT"}},wh=(0,Yd.A)(xh,[["render",function(t,e,r,n,i,o){return null!=o.gpus?(xu(),Au("section",ih,[Iu("div",oh,As(o.name),1),Ru(" single gpu "),1===o.gpus.length?(xu(),Au("div",sh,[(xu(!0),Au(fu,null,oc(o.gpus,((r,n)=>(xu(),Au("table",{key:n,class:"table table-sm table-borderless"},[Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{class:"col"},"proc:",-1)),null!=r.proc?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"proc")])},[Iu("span",null,As(t.$filters.number(r.proc,0))+"%",1)],2)):Ru("v-if",!0),null==r.proc?(xu(),Au("td",ah,e[0]||(e[0]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{class:"col"},"mem:",-1)),null!=r.mem?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"mem")])},[Iu("span",null,As(t.$filters.number(r.mem,0))+"%",1)],2)):Ru("v-if",!0),null==r.mem?(xu(),Au("td",lh,e[2]||(e[2]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[5]||(e[5]=Iu("td",{class:"col"},"temp:",-1)),null!=r.temperature?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"temperature")])},[Iu("span",null,As(t.$filters.number(r.temperature,0)),1)],2)):Ru("v-if",!0),null==r.temperature?(xu(),Au("td",ch,e[4]||(e[4]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])])])))),128))])):Ru("v-if",!0),Ru(" multiple gpus - one line per gpu (no mean) "),!o.args.meangpu&&o.gpus.length>1?(xu(),Au("div",uh,[Iu("table",ph,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.gpus,((r,n)=>(xu(),Au("tr",{key:n},[Iu("td",dh,As(r.gpu_id)+":",1),null!=r.proc?(xu(),Au("td",{key:0,class:xs(["col",o.getDecoration(r.gpu_id,"proc")])},[Iu("span",null,As(t.$filters.number(r.proc,0))+"%",1)],2)):Ru("v-if",!0),null==r.proc?(xu(),Au("td",mh,e[6]||(e[6]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0),e[8]||(e[8]=Iu("td",{class:"col"},"mem:",-1)),null!=r.mem?(xu(),Au("td",{key:2,class:xs(["col text-end",o.getDecoration(r.gpu_id,"mem")])},[Iu("span",null,As(t.$filters.number(r.mem,0))+"% ",1)],2)):Ru("v-if",!0),null==r.mem?(xu(),Au("td",fh,e[7]||(e[7]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])))),128))])])])):Ru("v-if",!0),Ru(" multiple gpus - mean "),o.args.meangpu&&o.gpus.length>1?(xu(),Au("div",hh,[Iu("table",gh,[Iu("tbody",null,[Iu("tr",null,[e[10]||(e[10]=Iu("td",{class:"col"},"proc mean:",-1)),null!=o.mean.proc?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("proc")])},[Iu("span",null,As(t.$filters.number(o.mean.proc,0))+"%",1)],2)):Ru("v-if",!0),null==o.mean.proc?(xu(),Au("td",bh,e[9]||(e[9]=[Iu("span",null,"N/A",-1),Lu(">")]))):Ru("v-if",!0)]),Iu("tr",null,[e[12]||(e[12]=Iu("td",{class:"col"},"mem mean:",-1)),null!=o.mean.mem?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("mem")])},[Iu("span",null,As(t.$filters.number(o.mean.mem,0))+"%",1)],2)):Ru("v-if",!0),null==o.mean.mem?(xu(),Au("td",yh,e[11]||(e[11]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[14]||(e[14]=Iu("td",{class:"col"},"temp mean:",-1)),null!=o.mean.temperature?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("temperature")])},[Iu("span",null,As(t.$filters.number(o.mean.temperature,0))+"°C",1)],2)):Ru("v-if",!0),null==o.mean.temperature?(xu(),Au("td",vh,e[13]||(e[13]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])])])])):Ru("v-if",!0)])):Ru("v-if",!0)}]]),_h={id:"system",class:"plugin"},kh={key:0,class:"critical"},Sh={class:"title"};const Ah={props:{data:{type:Object}},data:()=>({store:qd}),computed:{stats(){return this.data.stats.system},hostname(){return this.stats.hostname},isDisconnected(){return"FAILURE"===this.store.status}}},Eh=(0,Yd.A)(Ah,[["render",function(t,e,r,n,i,o){return xu(),Au("section",_h,[o.isDisconnected?(xu(),Au("span",kh,"Disconnected from")):Ru("v-if",!0),Iu("span",Sh,As(o.hostname),1)])}]]),Ch={key:0,id:"ip",class:"plugin"},Th={key:0,class:"title"},Oh={key:1},Dh={key:2,class:"title"},Ih={key:3},Ph={key:4,class:"text-truncate"};const jh={props:{data:{type:Object}},computed:{ipStats(){return this.data.stats.ip},address(){return this.ipStats.address},gateway(){return this.ipStats.gateway},maskCdir(){return this.ipStats.mask_cidr},publicAddress(){return this.ipStats.public_address},publicInfo(){return this.ipStats.public_info_human}}},Nh=(0,Yd.A)(jh,[["render",function(t,e,r,n,i,o){return o.address?(xu(),Au("section",Ch,[o.address?(xu(),Au("span",Th,"IP")):Ru("v-if",!0),o.address?(xu(),Au("span",Oh,As(o.address)+"/"+As(o.maskCdir),1)):Ru("v-if",!0),o.publicAddress?(xu(),Au("span",Dh,"Pub")):Ru("v-if",!0),o.publicAddress?(xu(),Au("span",Ih,As(o.publicAddress),1)):Ru("v-if",!0),o.publicInfo?(xu(),Au("span",Ph,As(o.publicInfo),1)):Ru("v-if",!0)])):Ru("v-if",!0)}]]),Lh={id:"irq",class:"plugin"},Mh={class:"table table-sm table-borderless margin-bottom"},Rh={scope:"row"},qh={scope:"row",class:"text-end"};const Bh={props:{data:{type:Object}},computed:{stats(){return this.data.stats.irq},irqs(){return this.stats.map((t=>({irq_line:t.irq_line,irq_rate:t.irq_rate})))}}},$h=(0,Yd.A)(Bh,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Lh,[Iu("table",Mh,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"IRQ"),Iu("th",{scope:"col",class:"text-end"},"Rate/s")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.irqs,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",Rh,As(t.irq_line),1),Iu("td",qh,As(t.irq_rate),1)])))),128))])])])}]]),Uh={key:0,id:"load",class:"plugin"},Fh={class:"table-responsive"},zh={class:"table table-sm table-borderless"},Hh={scope:"col",class:"text-end"},Vh={class:"text-end"};const Gh={props:{data:{type:Object}},computed:{stats(){return this.data.stats.load},view(){return this.data.views.load},cpucore(){return this.stats.cpucore},min1(){return this.stats.min1},min5(){return this.stats.min5},min15(){return this.stats.min15}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},Wh=(0,Yd.A)(Gh,[["render",function(t,e,r,n,i,o){return null!=o.cpucore?(xu(),Au("section",Uh,[Iu("div",Fh,[Iu("table",zh,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"LOAD",-1)),Iu("td",Hh,As(o.cpucore)+"-core",1)])]),Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"1 min:",-1)),Iu("td",Vh,[Iu("span",null,As(t.$filters.number(o.min1,2)),1)])]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"5 min:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("min5")])},[Iu("span",null,As(t.$filters.number(o.min5,2)),1)],2)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"15 min:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("min15")])},[Iu("span",null,As(t.$filters.number(o.min15,2)),1)],2)])])])])])):Ru("v-if",!0)}]]),Kh={id:"mem",class:"plugin"},Xh={class:"table-responsive"},Qh={class:"table-sm table-borderless"},Zh={class:"justify-content-between"},Yh={scope:"col"},Jh={class:"table table-sm table-borderless"},tg={class:"text-end"},eg={key:0},rg={key:1},ng={class:"d-none d-xl-block d-xxl-block"},ig={class:"table table-sm table-borderless"},og={scope:"col"},sg={scope:"col"},ag={scope:"col"},lg={scope:"col"},cg={scope:"col"},ug={scope:"col"},pg={scope:"col"},dg={scope:"col"};const mg={props:{data:{type:Object}},data:()=>({store:qd}),computed:{config(){return this.store.config||{}},available_args(){return this.config.mem.available||!1},stats(){return this.data.stats.mem},view(){return this.data.views.mem},percent(){return this.stats.percent.toFixed(1)},total(){return this.stats.total},used(){return this.stats.used},available(){return this.stats.available},free(){return this.stats.free},active(){return this.stats.active},inactive(){return this.stats.inactive},buffers(){return this.stats.buffers},cached(){return this.stats.cached}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},fg=(0,Yd.A)(mg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Kh,[Ru(" d-none d-xxl-block "),Iu("div",Xh,[Iu("table",Qh,[Iu("tbody",null,[Iu("tr",Zh,[Iu("td",Yh,[Iu("table",Jh,[Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"MEM",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("percent")])},[Iu("span",null,As(o.percent)+"%",1)],2)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"total:",-1)),Iu("td",tg,[Iu("span",null,As(t.$filters.bytes(o.total)),1)])]),o.available_args?Ru("v-if",!0):(xu(),Au("tr",eg,[e[2]||(e[2]=Iu("td",{scope:"row"},"used:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("used")])},[Iu("span",null,As(t.$filters.bytes(o.used,2)),1)],2)])),o.available_args?(xu(),Au("tr",rg,[e[3]||(e[3]=Iu("td",{scope:"row"},"avail:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("available")])},[Iu("span",null,As(t.$filters.bytes(o.available,2)),1)],2)])):Ru("v-if",!0),Iu("tr",null,[e[4]||(e[4]=Iu("td",{scope:"row"},"free:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("free")])},[Iu("span",null,As(t.$filters.bytes(o.free,2)),1)],2)])])])]),Iu("td",null,[Iu("template",ng,[Iu("table",ig,[Iu("tbody",null,[Iu("tr",null,[Al(Iu("td",og," active: ",512),[[xp,null!=o.active]]),Al(Iu("td",sg,[Iu("span",null,As(t.$filters.bytes(o.active)),1)],512),[[xp,null!=o.active]])]),Iu("tr",null,[Al(Iu("td",ag," inactive: ",512),[[xp,null!=o.inactive]]),Al(Iu("td",lg,[Iu("span",null,As(t.$filters.bytes(o.inactive)),1)],512),[[xp,null!=o.inactive]])]),Iu("tr",null,[Al(Iu("td",cg," buffers: ",512),[[xp,null!=o.buffers]]),Al(Iu("td",ug,[Iu("span",null,As(t.$filters.bytes(o.buffers)),1)],512),[[xp,null!=o.buffers]])]),Iu("tr",null,[Al(Iu("td",pg," cached: ",512),[[xp,null!=o.cached]]),Al(Iu("td",dg,[Iu("span",null,As(t.$filters.bytes(o.cached)),1)],512),[[xp,null!=o.cached]])])])])])])])])])])])}]]),hg={id:"memswap",class:"plugin"},gg={class:"table-responsive"},bg={class:"table table-sm table-borderless"},yg={class:"text-end"},vg={class:"text-end"};const xg={props:{data:{type:Object}},computed:{stats(){return this.data.stats.memswap},view(){return this.data.views.memswap},percent(){return this.stats.percent},total(){return this.stats.total},used(){return this.stats.used},free(){return this.stats.free}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},wg=(0,Yd.A)(xg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",hg,[Iu("div",gg,[Iu("table",bg,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"SWAP",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("percent")])},[Iu("span",null,As(o.percent)+"%",1)],2)])]),Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"total:",-1)),Iu("td",yg,[Iu("span",null,As(t.$filters.bytes(o.total)),1)])]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"used:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("used")])},[Iu("span",null,As(t.$filters.bytes(o.used,2)),1)],2)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"free:",-1)),Iu("td",vg,[Iu("span",null,As(t.$filters.bytes(o.free,2)),1)])])])])])])}]]),_g={key:0,id:"network",class:"plugin"},kg={class:"table table-sm table-borderless margin-bottom"},Sg={scope:"col",class:"text-end w-25"},Ag={scope:"col",class:"text-end w-25"},Eg={scope:"col",class:"text-end w-25"},Cg={scope:"col",class:"text-end w-25"},Tg={scope:"col",class:"text-end w-25"},Og={scope:"col",class:"text-end w-25"},Dg={scope:"col",class:"text-end w-25"},Ig={scope:"col",class:"text-end w-25"},Pg={scope:"row",class:"visible-lg-inline text-truncate"},jg={class:"text-end"},Ng={class:"text-end"};const Lg={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.network},view(){return this.data.views.network},networks(){const t=this.stats.map((t=>{const e=void 0!==t.alias?t.alias:null;return{interfaceName:t.interface_name,ifname:e||t.interface_name,bytes_recv_rate_per_sec:t.bytes_recv_rate_per_sec,bytes_sent_rate_per_sec:t.bytes_sent_rate_per_sec,bytes_all_rate_per_sec:t.bytes_all_rate_per_sec,bytes_recv:t.bytes_recv,bytes_sent:t.bytes_sent,bytes_all:t.bytes_all}})).filter((t=>{const e=this.view[t.interfaceName].bytes_recv_rate_per_sec,r=this.view[t.interfaceName].bytes_sent_rate_per_sec;return!(e&&!1!==e.hidden||r&&!1!==r.hidden)}));return(0,am.orderBy)(t,["interfaceName"])},hasNetworks(){return this.networks.length>0}},methods:{getDecoration(t,e){if(null!=this.view[t][e])return this.view[t][e].decoration.toLowerCase()}}},Mg=(0,Yd.A)(Lg,[["render",function(t,e,r,n,i,o){return o.hasNetworks?(xu(),Au("section",_g,[Iu("table",kg,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"NETWORK",-1)),Al(Iu("th",Sg,"Rxps",512),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",Ag,"Txps",512),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",Eg,null,512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",Cg,"Rx+Txps",512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",Tg,"Rx",512),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",Og,"Tx",512),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",Dg,null,512),[[xp,o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",Ig,"Rx+Tx",512),[[xp,o.args.network_cumul&&o.args.network_sum]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.networks,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Pg,As(t.$filters.minSize(e.alias?e.alias:e.ifname,16)),1),Al(Iu("td",{class:xs(["text-end",o.getDecoration(e.interfaceName,"bytes_recv_rate_per_sec")])},As(o.args.byte?t.$filters.bytes(e.bytes_recv_rate_per_sec):t.$filters.bits(e.bytes_recv_rate_per_sec)),3),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",{class:xs(["text-end",o.getDecoration(e.interfaceName,"bytes_sent_rate_per_sec")])},As(o.args.byte?t.$filters.bytes(e.bytes_sent_rate_per_sec):t.$filters.bits(e.bytes_sent_rate_per_sec)),3),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",jg,null,512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_all_rate_per_sec):t.$filters.bits(e.bytes_all_rate_per_sec)),513),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_recv):t.$filters.bits(e.bytes_recv)),513),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_sent):t.$filters.bits(e.bytes_sent)),513),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",Ng,null,512),[[xp,o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_all):t.$filters.bits(e.bytes_all)),513),[[xp,o.args.network_cumul&&o.args.network_sum]])])))),128))])])])):Ru("v-if",!0)}]]),Rg={id:"now",class:"plugin"};const qg={props:{data:{type:Object}},computed:{date_custom(){return this.data.stats.now.custom}}},Bg=(0,Yd.A)(qg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Rg,[Iu("span",null,As(o.date_custom),1)])}]]),$g={id:"percpu",class:"plugin"},Ug={class:"table-responsive"},Fg={class:"table-sm table-borderless"},zg={key:0,scope:"col"},Hg={key:1,scope:"col"},Vg={key:0,scope:"col"},Gg={key:1,scope:"col"};const Wg={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},percpuStats(){return this.data.stats.percpu}},methods:{getUserAlert:t=>Ud.getAlert("percpu","percpu_user_",t.user),getSystemAlert:t=>Ud.getAlert("percpu","percpu_system_",t.system),getIOWaitAlert:t=>Ud.getAlert("percpu","percpu_iowait_",t.system)}},Kg=(0,Yd.A)(Wg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",$g,[Ru(" d-none d-xl-block d-xxl-block "),Iu("div",Ug,[Iu("table",Fg,[Iu("thead",null,[Iu("tr",null,[o.args.disable_quicklook?(xu(),Au("th",zg,"CPU")):Ru("v-if",!0),o.args.disable_quicklook?(xu(),Au("td",Hg,"total")):Ru("v-if",!0),e[0]||(e[0]=Iu("td",{scope:"col"},"user",-1)),e[1]||(e[1]=Iu("td",{scope:"col"},"system",-1)),e[2]||(e[2]=Iu("td",{scope:"col"},"idle",-1)),e[3]||(e[3]=Iu("td",{scope:"col"},"iowait",-1)),e[4]||(e[4]=Iu("td",{scope:"col"},"steel",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.percpuStats,((t,e)=>(xu(),Au("tr",{key:e},[o.args.disable_quicklook?(xu(),Au("td",Vg,"CPU"+As(t.cpu_number),1)):Ru("v-if",!0),o.args.disable_quicklook?(xu(),Au("td",Gg,As(t.total)+"%",1)):Ru("v-if",!0),Iu("td",{scope:"col",class:xs(o.getUserAlert(t))},As(t.user)+"%",3),Iu("td",{scope:"col",class:xs(o.getSystemAlert(t))},As(t.system)+"%",3),Al(Iu("td",{scope:"col"},As(t.idle)+"%",513),[[xp,null!=t.idle]]),Al(Iu("td",{scope:"col",class:xs(o.getIOWaitAlert(t))},As(t.iowait)+"%",3),[[xp,null!=t.iowait]]),Al(Iu("td",{scope:"col"},As(t.steal)+"%",513),[[xp,null!=t.steal]])])))),128))])])])])}]]),Xg={key:0,id:"ports",class:"plugin"},Qg={class:"table table-sm table-borderless margin-bottom"},Zg={scope:"row"},Yg={key:0},Jg={key:1},tb={key:2},eb={key:3},rb={key:0},nb={key:1},ib={key:2};const ob={props:{data:{type:Object}},computed:{stats(){return this.data.stats.ports},ports(){return this.stats},hasPorts(){return this.ports.length>0}},methods:{getPortDecoration:t=>null===t.status?"careful":!1===t.status?"critical":null!==t.rtt_warning&&t.status>t.rtt_warning?"warning":"ok",getWebDecoration:t=>null===t.status?"careful":-1===[200,301,302].indexOf(t.status)?"critical":null!==t.rtt_warning&&t.elapsed>t.rtt_warning?"warning":"ok"}},sb=(0,Yd.A)(ob,[["render",function(t,e,r,n,i,o){return o.hasPorts?(xu(),Au("section",Xg,[Iu("table",Qg,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.ports,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Zg,[Ru(" prettier-ignore "),Lu(" "+As(t.$filters.minSize(e.description?e.description:e.host+" "+e.port,20)),1)]),e.host?(xu(),Au("td",{key:0,scope:"row",class:xs(["text-end",o.getPortDecoration(e)])},["null"==e.status?(xu(),Au("span",Yg,"Scanning")):"false"==e.status?(xu(),Au("span",Jg,"Timeout")):"true"==e.status?(xu(),Au("span",tb,"Open")):(xu(),Au("span",eb,As(t.$filters.number(1e3*e.status,0))+"ms",1))],2)):Ru("v-if",!0),e.url?(xu(),Au("td",{key:1,scope:"row",class:xs(["text-end",o.getPortDecoration(e)])},["null"==e.status?(xu(),Au("span",rb,"Scanning")):"Error"==e.status?(xu(),Au("span",nb,"Error")):(xu(),Au("span",ib,"Code "+As(e.status),1))],2)):Ru("v-if",!0)])))),128))])])])):Ru("v-if",!0)}]]),ab={key:0},lb={key:1},cb={key:0,class:"row"},ub={class:"col-lg-18"};const pb={key:0,id:"amps",class:"plugin"},db={class:"table table-sm table-borderless"},mb={key:0},fb=["innerHTML"];const hb={props:{data:{type:Object}},computed:{stats(){return this.data.stats.amps},processes(){return this.stats.filter((t=>null!==t.result))},hasAmps(){return this.processes.length>0}},methods:{getNameDecoration(t){const e=t.count,r=t.countmin,n=t.countmax;let i="ok";return i=e>0?(null===r||e>=r)&&(null===n||e<=n)?"ok":"careful":null===r?"ok":"critical",i}}},gb=(0,Yd.A)(hb,[["render",function(t,e,r,n,i,o){return o.hasAmps?(xu(),Au("section",pb,[Iu("table",db,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",{class:xs(o.getNameDecoration(e))},As(e.name),3),e.regex?(xu(),Au("td",mb,As(e.count),1)):Ru("v-if",!0),Iu("td",{class:"process-result",innerHTML:t.$filters.nl2br(e.result)},null,8,fb)])))),128))])]),Ru('
\n
\n
\n {{ process.name }}\n
\n
{{ process.count }}
\n
\n
\n ')])):Ru("v-if",!0)}]]),bb={id:"processcount",class:"plugin"},yb={class:"title"};const vb={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.processcount},total(){return this.stats.total||0},running(){return this.stats.running||0},sleeping(){return this.stats.sleeping||0},stopped(){return this.stats.stopped||0},thread(){return this.stats.thread||0}}},xb=(0,Yd.A)(vb,[["render",function(t,e,r,n,i,o){return xu(),Au("section",bb,[e[0]||(e[0]=Iu("span",{class:"title"},"TASKS",-1)),Iu("span",null,As(o.total)+" ("+As(o.thread)+" thr),",1),Iu("span",null,As(o.running)+" run,",1),Iu("span",null,As(o.sleeping)+" slp,",1),Iu("span",null,As(o.stopped)+" oth",1),Iu("span",null,As(o.args.programs?"Programs":"Threads"),1),Iu("span",yb,As(r.sorter.auto?"sorted automatically":"sorted"),1),Iu("span",null,"by "+As(r.sorter.getColumnLabel(r.sorter.column)),1)])}]]),wb={key:0,id:"processlist",class:"plugin"},_b={key:0,class:"extendedstats"},kb={class:"careful"},Sb={class:"careful"},Ab={class:"careful"},Eb={class:"careful"},Cb={class:"table-responsive d-lg-none"},Tb={class:"table table-sm table-borderless table-striped table-hover"},Ob={scope:"col"},Db=["onClick"],Ib={class:"table-responsive-md d-none d-lg-block"},Pb={class:"table table-sm table-borderless table-striped table-hover"},jb={scope:"col"},Nb={scope:"col"},Lb={scope:"col"},Mb={scope:"col"},Rb={scope:"col"},qb=["onClick"],Bb={key:0,scope:"row",class:""},$b={key:1,id:"processlist",class:"plugin"},Ub={class:"table-responsive d-lg-none"},Fb={class:"table table-sm table-borderless table-striped table-hover"},zb={class:"table-responsive d-none d-lg-block"},Hb={class:"table table-sm table-borderless table-striped table-hover"},Vb={class:""},Gb={class:""},Wb={scope:"row"},Kb={scope:"row",class:"table-cell widtd-60"};const Xb={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats_processlist(){return this.data.stats.processlist},stats_core(){return this.data.stats.core},cpucore(){return 0!==this.stats_core.log?this.stats_core.log:1},extended_stats(){return this.stats_processlist.find((t=>!0===t.extended_stats))||null},processes(){const{sorter:t}=this,e=(this.stats_processlist||[]).map((t=>this.updateProcess(t,this.data.stats.isWindows,this.args,this.cpucore)));return(0,am.orderBy)(e,[t.column].reduce(((t,e)=>("io_counters"===e&&(e=["io_read","io_write"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"]).slice(0,this.limit)},ioReadWritePresentProcesses(){return(this.stats_processlist||[]).some((({io_counters:t})=>t))},stats_programlist(){return this.data.stats.programlist},programs(){const{sorter:t}=this,e=this.data.stats.isWindows,r=(this.stats_programlist||[]).map((t=>(t.memvirt="?",t.memres="?",t.memory_info&&(t.memvirt=t.memory_info.vms,t.memres=t.memory_info.rss),e&&null!==t.username&&(t.username=(0,am.last)(t.username.split("\\"))),t.timeforhuman="?",t.cpu_times&&(t.timeplus=bf([t.cpu_times.user,t.cpu_times.system]),t.timeforhuman=t.timeplus.hours.toString().padStart(2,"0")+":"+t.timeplus.minutes.toString().padStart(2,"0")+":"+t.timeplus.seconds.toString().padStart(2,"0")),null===t.num_threads&&(t.num_threads=-1),null===t.cpu_percent&&(t.cpu_percent=-1),null===t.memory_percent&&(t.memory_percent=-1),t.io_read=null,t.io_write=null,t.io_counters&&(t.io_read=(t.io_counters[0]-t.io_counters[2])/t.time_since_update,t.io_write=(t.io_counters[1]-t.io_counters[3])/t.time_since_update),t.isNice=void 0!==t.nice&&(e&&32!=t.nice||!e&&0!=t.nice),Array.isArray(t.cmdline)&&(t.cmdline=t.cmdline.join(" ").replace(/\n/g," ")),"string"==typeof t.cmdline&&0!==t.cmdline.length||(t.cmdline=t.name),t)));return(0,am.orderBy)(r,[t.column].reduce(((t,e)=>("io_counters"===e&&(e=["io_read","io_write"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"]).slice(0,this.limit)},ioReadWritePresentPrograms(){return(this.stats_programlist||[]).some((({io_counters:t})=>t))},limit(){return void 0!==this.config.outputs?this.config.outputs.max_processes_display:void 0}},methods:{updateProcess:(t,e,r,n)=>(t.memvirt="?",t.memres="?",t.memory_info&&(t.memvirt=t.memory_info.vms,t.memres=t.memory_info.rss),e&&null!==t.username&&(t.username=(0,am.last)(t.username.split("\\"))),t.timeforhuman="?",t.cpu_times&&(t.timeplus=bf([t.cpu_times.user,t.cpu_times.system]),t.timeforhuman=t.timeplus.hours.toString().padStart(2,"0")+":"+t.timeplus.minutes.toString().padStart(2,"0")+":"+t.timeplus.seconds.toString().padStart(2,"0")),null===t.num_threads&&(t.num_threads=-1),t.irix=1,null===t.cpu_percent?t.cpu_percent=-1:r.disable_irix&&(t.irix=n),null===t.memory_percent&&(t.memory_percent=-1),t.io_read=null,t.io_write=null,t.io_counters&&(t.io_read=(t.io_counters[0]-t.io_counters[2])/t.time_since_update,t.io_write=(t.io_counters[1]-t.io_counters[3])/t.time_since_update),t.isNice=void 0!==t.nice&&(e&&32!=t.nice||!e&&0!=t.nice),Array.isArray(t.cmdline)&&(t.name=t.name+" "+t.cmdline.slice(1).join(" ").replace(/\n/g," "),t.cmdline=t.cmdline.join(" ").replace(/\n/g," ")),"string"==typeof t.cmdline&&0!==t.cmdline.length||(t.cmdline=t.name),t),getCpuPercentAlert:t=>Ud.getAlert("processlist","processlist_cpu_",t.cpu_percent),getMemoryPercentAlert:t=>Ud.getAlert("processlist","processlist_mem_",t.cpu_percent),getDisableStats:()=>Ud.getLimit("processlist","processlist_disable_stats")||[],getDisableVms:()=>"true"===(Ud.getLimit("processlist","processlist_disable_virtual_memory")||["False"])[0].toLowerCase(),setExtendedStats(t){fetch("api/4/processes/extended/"+t.toString(),{method:"POST"}).then((t=>t.json())),this.$forceUpdate()},disableExtendedStats(){fetch("api/4/processes/extended/disable",{method:"POST"}).then((t=>t.json())),this.$forceUpdate()}}},Qb={components:{GlancesPluginAmps:gb,GlancesPluginProcesscount:xb,GlancesPluginProcesslist:(0,Yd.A)(Xb,[["render",function(t,e,r,n,i,o){return xu(),Au(fu,null,[Ru(" Display processes "),o.args.programs?Ru("v-if",!0):(xu(),Au("section",wb,[null!==o.extended_stats?(xu(),Au("div",_b,[Iu("div",null,[e[24]||(e[24]=Iu("span",{class:"title"},"Pinned task: ",-1)),Iu("span",null,As(t.$filters.limitTo(o.extended_stats.cmdline,80)),1),Iu("span",null,[Iu("button",{class:"button",onClick:e[0]||(e[0]=t=>o.disableExtendedStats())},"Unpin")])]),Iu("div",null,[e[25]||(e[25]=Iu("span",null,"CPU Min/Max/Mean: ",-1)),Iu("span",kb,As(t.$filters.number(o.extended_stats.cpu_min,1))+"% / "+As(t.$filters.number(o.extended_stats.cpu_max,1))+"% / "+As(t.$filters.number(o.extended_stats.cpu_mean,1))+"%",1),e[26]||(e[26]=Iu("span",null,"Affinity: ",-1)),Iu("span",Sb,As(o.extended_stats.cpu_affinity|t.length),1)]),Iu("div",null,[e[27]||(e[27]=Iu("span",null,"MEM Min/Max/Mean: ",-1)),Iu("span",Ab,As(t.$filters.number(o.extended_stats.memory_min,1))+"% / "+As(t.$filters.number(o.extended_stats.memory_max,1))+"% / "+As(t.$filters.number(o.extended_stats.memory_mean,1))+"%",1),e[28]||(e[28]=Iu("span",null,"Memory info: ",-1)),Iu("span",Eb,As(t.$filters.dictToString(o.extended_stats.memory_info)),1)])])):Ru("v-if",!0),Iu("div",Cb,[Iu("table",Tb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[1]||(e[1]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[2]||(e[2]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",Ob," PID ",512),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[3]||(e[3]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[4]||(e[4]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r,style:{cursor:"pointer"},onClick:t=>o.setExtendedStats(e)},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(e.pid),513),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])],8,Db)))),128))])])]),Iu("div",Ib,[Iu("table",Pb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[5]||(e[5]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[6]||(e[6]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",jb," VIRT ",512),[[xp,!o.getDisableStats().includes("memory_info")&&!o.getDisableVms()]]),Al(Iu("td",Nb," RES ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",Lb," PID ",512),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[7]||(e[7]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","timemillis"===r.sorter.column&&"sort"]),onClick:e[8]||(e[8]=e=>t.$emit("update:sorter","timemillis"))}," TIME+ ",2),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","num_threads"===r.sorter.column&&"sort"]),onClick:e[9]||(e[9]=e=>t.$emit("update:sorter","num_threads"))}," THR ",2),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",Mb,"NI",512),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",Rb,"S ",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"col",class:xs(["",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[10]||(e[10]=e=>t.$emit("update:sorter","io_counters"))}," IORps ",2),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"col",class:xs(["text-start",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[11]||(e[11]=e=>t.$emit("update:sorter","io_counters"))}," IOWps ",2),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[12]||(e[12]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r,style:{cursor:"pointer"},onClick:t=>o.setExtendedStats(e.pid)},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memvirt)),513),[[xp,!o.getDisableStats().includes("memory_info")&&!o.getDisableVms()]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memres)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(e.pid),513),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"row"},As(e.username),513),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:""},As(e.timeforhuman),513),[[xp,!o.getDisableStats().includes("cpu_times")]]),"?"==e.timeplus?Al((xu(),Au("td",Bb,"?",512)),[[xp,!o.getDisableStats().includes("cpu_times")]]):Ru("v-if",!0),Al(Iu("td",{scope:"row",class:""},As(-1==e.num_threads?"?":e.num_threads),513),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",{scope:"row",class:xs({nice:e.isNice})},As(t.$filters.exclamation(e.nice)),3),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",{scope:"row",class:xs({status:"R"==e.status})},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:""},As(t.$filters.bytes(e.io_read)),513),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-start"},As(t.$filters.bytes(e.io_write)),513),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])],8,qb)))),128))])])])])),Ru(" Display programs "),o.args.programs?(xu(),Au("section",$b,[Iu("div",Ub,[Iu("table",Fb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[13]||(e[13]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[14]||(e[14]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",null," NPROCS ",512),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[15]||(e[15]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.programs,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(e.nprocs),513),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])])))),128))])])]),Iu("div",zb,[Iu("table",Hb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[16]||(e[16]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[17]||(e[17]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",Vb," VIRT ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",Gb," RES ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",null," NPROCS ",512),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[18]||(e[18]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","timemillis"===r.sorter.column&&"sort"]]),onClick:e[19]||(e[19]=e=>t.$emit("update:sorter","timemillis"))}," TIME+ ",2),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","num_threads"===r.sorter.column&&"sort"]]),onClick:e[20]||(e[20]=e=>t.$emit("update:sorter","num_threads"))}," THR ",2),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",Wb,"NI",512),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",Kb,"S ",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[21]||(e[21]=e=>t.$emit("update:sorter","io_counters"))}," IORps ",2),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:xs(["text-start",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[22]||(e[22]=e=>t.$emit("update:sorter","io_counters"))}," IOWps ",2),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[23]||(e[23]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.programs,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memvirt)),513),[[xp,!o.getDisableStats().includes("memory_info")&&!o.getDisableVms()]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memres)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(e.nprocs),513),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row"},As(e.username),513),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:""},As(e.timeforhuman),513),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"row",class:""},As(-1==e.num_threads?"?":e.num_threads),513),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",{scope:"row",class:xs({nice:e.isNice})},As(t.$filters.exclamation(e.nice)),3),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",{scope:"row",class:xs({status:"R"==e.status})},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:""},As(t.$filters.bytes(e.io_read)),513),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-start"},As(t.$filters.bytes(e.io_write)),513),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])])))),128))])])])])):Ru("v-if",!0)],64)}]])},props:{data:{type:Object}},data:()=>({store:qd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["cpu_percent","memory_percent","username","timemillis","num_threads","io_counters","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["username","name"].includes(t)},getColumnLabel:function(t){return{cpu_percent:"CPU consumption",memory_percent:"memory consumption",username:"user name",timemillis:"process time",cpu_times:"process time",io_counters:"disk IO",name:"process name",None:"None"}[t]||t}})}}}},Zb=(0,Yd.A)(Qb,[["render",function(t,e,r,n,i,o){const s=ec("glances-plugin-processcount"),a=ec("glances-plugin-amps"),l=ec("glances-plugin-processlist");return o.args.disable_process?(xu(),Au("div",ab,"PROCESSES DISABLED (press 'z' to display)")):(xu(),Au("div",lb,[Pu(s,{sorter:i.sorter,data:r.data},null,8,["sorter","data"]),o.args.disable_amps?Ru("v-if",!0):(xu(),Au("div",cb,[Iu("div",ub,[Pu(a,{data:r.data},null,8,["data"])])])),Pu(l,{sorter:i.sorter,data:r.data,"onUpdate:sorter":e[0]||(e[0]=t=>o.args.sort_processes_key=t)},null,8,["sorter","data"])]))}]]),Yb={id:"quicklook",class:"plugin"},Jb={class:"d-flex justify-content-between"},ty={class:"text-start text-truncate"},ey={key:0,class:"text-end d-none d-xxl-block frequency"},ry={class:"table-responsive"},ny={class:"table table-sm table-borderless"},iy={key:0},oy={scope:"col",class:"progress"},sy=["aria-valuenow"],ay={scope:"col",class:"text-end"},ly={scope:"col"},cy={scope:"col",class:"progress"},uy=["aria-valuenow"],py={scope:"col",class:"text-end"},dy={scope:"col"},my={scope:"col",class:"progress"},fy=["aria-valuenow"],hy={scope:"col",class:"text-end"};const gy={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats(){return this.data.stats.quicklook},view(){return this.data.views.quicklook},cpu(){return this.stats.cpu},cpu_name(){return this.stats.cpu_name},cpu_hz_current(){return(this.stats.cpu_hz_current/1e6).toFixed(0)},cpu_hz(){return(this.stats.cpu_hz/1e6).toFixed(0)},percpus(){const t=this.stats.percpu.map((({cpu_number:t,total:e})=>({number:t,total:e}))),e=parseInt(this.config.percpu.max_cpu_display);if(this.stats.percpu.length>e){var r=t.sort((function(t,e){return e.total-t.total}));const n={number:"x",total:Number((r.slice(e).reduce(((t,{total:e})=>t+e),0)/(this.stats.percpu.length-e)).toFixed(1))};(r=r.slice(0,e)).push(n)}return this.stats.percpu.length<=e?t:r},stats_list_after_cpu(){return this.view.list.filter((t=>!t.includes("cpu")))}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},by=(0,Yd.A)(gy,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Yb,[Iu("div",Jb,[Iu("span",ty,As(o.cpu_name),1),o.cpu_hz_current?(xu(),Au("span",ey,As(o.cpu_hz_current)+"/"+As(o.cpu_hz)+"Ghz ",1)):Ru("v-if",!0)]),Iu("div",ry,[Iu("table",ny,[o.args.percpu?Ru("v-if",!0):(xu(),Au("tr",iy,[e[0]||(e[0]=Iu("td",{scope:"col"},"CPU",-1)),Iu("td",oy,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":o.cpu,"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${o.cpu}%;`)},"   ",14,sy)]),Iu("td",ay,[Iu("span",null,As(o.cpu)+"%",1)])])),o.args.percpu?(xu(!0),Au(fu,{key:1},oc(o.percpus,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",ly,"CPU"+As(t.number),1),Iu("td",cy,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":t.total,"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${t.total}%;`)},"   ",14,uy)]),Iu("td",py,[Iu("span",null,As(t.total)+"%",1)])])))),128)):Ru("v-if",!0),(xu(!0),Au(fu,null,oc(o.stats_list_after_cpu,(t=>(xu(),Au("tr",null,[Iu("td",dy,As(t.toUpperCase()),1),Iu("td",my,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration(t)}`),role:"progressbar","aria-valuenow":o.stats[t],"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${o.stats[t]}%;`)},"   ",14,fy)]),Iu("td",hy,[Iu("span",null,As(o.stats[t])+"%",1)])])))),256))])])])}]]),yy={key:0,id:"raid",class:"plugin"},vy={class:"table table-sm table-borderless margin-bottom"},xy={scope:"col"},wy={scope:"row"},_y={class:"warning"};const ky={props:{data:{type:Object}},computed:{stats(){return this.data.stats.raid},disks(){const t=Object.entries(this.stats).map((([t,e])=>{const r=Object.entries(e.components).map((([t,e])=>({number:e,name:t})));return{name:t,type:null==e.type?"UNKNOWN":e.type,used:e.used,available:e.available,status:e.status,degraded:e.used0}},methods:{getAlert:t=>t.inactive?"critical":t.degraded?"warning":"ok"}},Sy=(0,Yd.A)(ky,[["render",function(t,e,r,n,i,o){return o.hasDisks?(xu(),Au("section",yy,[Iu("table",vy,[Iu("thead",null,[Iu("tr",null,[Iu("th",xy,"RAID disks "+As(o.disks.length),1),e[0]||(e[0]=Iu("th",{scope:"col",class:"text-end"},"Used",-1)),e[1]||(e[1]=Iu("th",{scope:"col",class:"text-end"},"Total",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.disks,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",wy,[Lu(As(t.type.toUpperCase())+" "+As(t.name)+" ",1),Al(Iu("div",_y,"└─ Degraded mode",512),[[xp,t.degraded]]),Al(Iu("div",null,"   └─ "+As(t.config),513),[[xp,t.degraded]]),Al(Iu("div",{class:"critical"},"└─ Status "+As(t.status),513),[[xp,t.inactive]]),t.inactive?(xu(!0),Au(fu,{key:0},oc(t.components,((e,r)=>(xu(),Au("div",{key:r},"    "+As(r===t.components.length-1?"└─":"├─")+" disk "+As(e.number)+": "+As(e.name),1)))),128)):Ru("v-if",!0)]),Al(Iu("td",{scope:"row",class:xs(["text-end",o.getAlert(t)])},As(t.used),3),[[xp,"active"==t.status]]),Al(Iu("td",{scope:"row",class:xs(["text-end",o.getAlert(t)])},As(t.available),3),[[xp,"active"==t.status]])])))),128))])])])):Ru("v-if",!0)}]]),Ay={key:0,id:"smart",class:"plugin"},Ey={class:"table table-sm table-borderless margin-bottom"},Cy={scope:"row"},Ty={scope:"row"},Oy={scope:"row",class:"text-end text-truncate"};const Dy={props:{data:{type:Object}},computed:{stats(){return this.data.stats.smart},drives(){return(Array.isArray(this.stats)?this.stats:[]).map((t=>({name:t.DeviceName,details:Object.entries(t).filter((([t])=>"DeviceName"!==t)).sort((([,t],[,e])=>t.namee.name?1:0)).map((([t,e])=>e))})))},hasDrives(){return this.drives.length>0}}},Iy=(0,Yd.A)(Dy,[["render",function(t,e,r,n,i,o){return o.hasDrives?(xu(),Au("section",Ay,[Iu("table",Ey,[e[1]||(e[1]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"SMART DISKS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.drives,((t,r)=>(xu(),Au(fu,{key:r},[Iu("tr",null,[Iu("td",Cy,As(t.name),1),e[0]||(e[0]=Iu("td",{scope:"col",class:"text-end"},null,-1))]),(xu(!0),Au(fu,null,oc(t.details,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",Ty,As(t.name),1),Iu("td",Oy,As(t.raw),1)])))),128))],64)))),128))])])])):Ru("v-if",!0)}]]),Py={key:0,id:"sensors",class:"plugin"},jy={class:"table table-sm table-borderless"},Ny={scope:"row"};const Ly={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.sensors},view(){return this.data.views.sensors},sensors(){return this.stats.map((t=>(this.args.fahrenheit&&"battery"!=t.type&&"fan_speed"!=t.type&&(t.value=parseFloat(1.8*t.value+32).toFixed(1),t.unit="F"),t)))},hasSensors(){return this.sensors.length>0}},methods:{getDecoration(t){if(void 0!==this.view[t].value.decoration)return this.view[t].value.decoration.toLowerCase()}}},My=(0,Yd.A)(Ly,[["render",function(t,e,r,n,i,o){return o.hasSensors?(xu(),Au("section",Py,[Iu("table",jy,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"SENSORS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.sensors,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",Ny,As(t.label),1),Iu("td",{class:xs(["text-end",o.getDecoration(t.label)])},As(t.value)+As(t.unit),3)])))),128))])])])):Ru("v-if",!0)}]]),Ry={id:"system",class:"plugin"},qy={key:0,class:"critical"},By={class:"title"},$y={key:1,class:"text-truncate"};const Uy={props:{data:{type:Object}},data:()=>({store:qd}),computed:{stats(){return this.data.stats.system},hostname(){return this.stats.hostname},humanReadableName(){return this.stats.hr_name},isDisconnected(){return"FAILURE"===this.store.status}}},Fy=(0,Yd.A)(Uy,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Ry,[o.isDisconnected?(xu(),Au("span",qy,"Disconnected from")):Ru("v-if",!0),Iu("span",By,As(o.hostname),1),o.isDisconnected?Ru("v-if",!0):(xu(),Au("span",$y,As(o.humanReadableName),1))])}]]),zy={id:"uptime",class:"plugin"};const Hy={props:{data:{type:Object}},computed:{value(){return this.data.stats.uptime}}},Vy=(0,Yd.A)(Hy,[["render",function(t,e,r,n,i,o){return xu(),Au("section",zy,[Iu("span",null,"Uptime: "+As(o.value),1)])}]]),Gy={key:0,id:"vms",class:"plugin"},Wy={class:"table table-sm table-borderless table-striped table-hover"};const Ky={props:{data:{type:Object}},data:()=>({store:qd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key},stats(){return this.data.stats.vms},views(){return this.data.views.vms},vms(){const{sorter:t}=this,e=(this.stats||[]).map((t=>({id:t.id,name:t.name,status:null!=t.status?t.status:"-",cpu_count:null!=t.cpu_count?t.cpu_count:"-",cpu_time:null!=t.cpu_time?t.cpu_time:"-",cpu_time_rate_per_sec:null!=t.cpu_time_rate_per_sec?t.cpu_time_rate_per_sec:"?",memory_usage:null!=t.memory_usage?t.memory_usage:"-",memory_total:null!=t.memory_total?t.memory_total:"-",load_1min:null!=t.load_1min?t.load_1min:"-",load_5min:null!=t.load_5min?t.load_5min:"-",load_15min:null!=t.load_15min?t.load_15min:"-",release:t.release,image:t.image,engine:t.engine,engine_version:t.engine_version})));return(0,am.orderBy)(e,[t.column].reduce(((t,e)=>("memory_usage"===e&&(e=["memory_usage"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"])},showEngine(){return this.views.show_engine_name}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["load_1min","cpu_time","memory_usage","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_time",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["name"].includes(t)},getColumnLabel:function(t){return{load_1min:"load",cpu_time:"CPU time",memory_usage:"memory consumption",name:"VM name",None:"None"}[t]||t}})}}}},Xy=(0,Yd.A)(Ky,[["render",function(t,e,r,n,i,o){return o.vms.length?(xu(),Au("section",Gy,[e[8]||(e[8]=Iu("span",{class:"title"},"VMs",-1)),Al(Iu("span",null,As(o.vms.length)+" sorted by "+As(i.sorter.getColumnLabel(i.sorter.column)),513),[[xp,o.vms.length>1]]),Iu("table",Wy,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",null,"Engine",512),[[xp,o.showEngine]]),Iu("td",{class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[0]||(e[0]=t=>o.args.sort_processes_key="name")}," Name ",2),e[4]||(e[4]=Iu("td",null,"Status",-1)),e[5]||(e[5]=Iu("td",null,"Core",-1)),Iu("td",{class:xs(["sortable","cpu_time"===i.sorter.column&&"sort"]),onClick:e[1]||(e[1]=t=>o.args.sort_processes_key="cpu_time")}," CPU% ",2),Iu("td",{class:xs(["sortable","memory_usage"===i.sorter.column&&"sort"]),onClick:e[2]||(e[2]=t=>o.args.sort_processes_key="memory_usage")}," MEM ",2),e[6]||(e[6]=Iu("td",null,"/ MAX",-1)),Iu("td",{class:xs(["sortable","load_1min"===i.sorter.column&&"sort"]),onClick:e[3]||(e[3]=t=>o.args.sort_processes_key="load_1min")}," LOAD 1/5/15min ",2),e[7]||(e[7]=Iu("td",null,"Release",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.vms,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",null,As(e.engine),513),[[xp,o.showEngine]]),Iu("td",null,As(e.name),1),Iu("td",{class:xs("stopped"==e.status?"careful":"ok")},As(e.status),3),Iu("td",null,As(t.$filters.number(e.cpu_count,1)),1),Iu("td",null,As(t.$filters.number(e.cpu_time,1)),1),Iu("td",null,As(t.$filters.bytes(e.memory_usage)),1),Iu("td",null," / "+As(t.$filters.bytes(e.memory_total)),1),Iu("td",null,As(t.$filters.number(e.load_1min))+"/"+As(t.$filters.number(e.load_5min))+"/"+As(t.$filters.number(e.load_15min)),1),Iu("td",null,As(e.release),1)])))),128))])])])):Ru("v-if",!0)}]]),Qy={key:0,id:"wifi",class:"plugin"},Zy={class:"table table-sm table-borderless margin-bottom"},Yy={scope:"row"};const Jy={props:{data:{type:Object}},computed:{stats(){return this.data.stats.wifi},view(){return this.data.views.wifi},hotspots(){const t=this.stats.map((t=>{if(""!==t.ssid)return{ssid:t.ssid,quality_level:t.quality_level}})).filter(Boolean);return(0,am.orderBy)(t,["ssid"])},hasHotpots(){return this.hotspots.length>0}},methods:{getDecoration(t,e){if(void 0!==this.view[t.ssid][e])return this.view[t.ssid][e].decoration.toLowerCase()}}},tv=(0,Yd.A)(Jy,[["render",function(t,e,r,n,i,o){return o.hasHotpots?(xu(),Au("section",Qy,[Iu("table",Zy,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"WIFI"),Iu("th",{scope:"col",class:"text-end"},"dBm")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.hotspots,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Yy,As(t.$filters.limitTo(e.ssid,20)),1),Iu("td",{scope:"row",class:xs(["text-end",o.getDecoration(e,"quality_level")])},As(e.quality_level),3)])))),128))])])])):Ru("v-if",!0)}]]),ev=JSON.parse('{"r":["quicklook","cpu","percpu","gpu","mem","memswap","load"],"H":["network","ports","wifi","connections","diskio","fs","irq","folders","raid","smart","sensors"]}'),rv={components:{GlancesHelp:Jd,GlancesPluginAlert:cm,GlancesPluginCloud:mm,GlancesPluginConnections:wm,GlancesPluginCpu:Xm,GlancesPluginDiskio:xf,GlancesPluginContainers:Ff,GlancesPluginFolders:Kf,GlancesPluginFs:nh,GlancesPluginGpu:wh,GlancesPluginHostname:Eh,GlancesPluginIp:Nh,GlancesPluginIrq:$h,GlancesPluginLoad:Wh,GlancesPluginMem:fg,GlancesPluginMemswap:wg,GlancesPluginNetwork:Mg,GlancesPluginNow:Bg,GlancesPluginPercpu:Kg,GlancesPluginPorts:sb,GlancesPluginProcess:Zb,GlancesPluginQuicklook:by,GlancesPluginRaid:Sy,GlancesPluginSensors:My,GlancesPluginSmart:Iy,GlancesPluginSystem:Fy,GlancesPluginUptime:Vy,GlancesPluginVms:Xy,GlancesPluginWifi:tv},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},data(){return this.store.data||{}},dataLoaded(){return void 0!==this.store.data},hasGpu(){return this.store.data.stats.gpu.length>0},isLinux(){return this.store.data.isLinux},title(){const{data:t}=this,e=t.stats&&t.stats.system&&t.stats.system.hostname||"";return e?`${e} - Glances`:"Glances"},topMenu(){return void 0!==this.config.outputs&&void 0!==this.config.outputs.top_menu?this.config.outputs.top_menu.split(","):ev.r},leftMenu(){return void 0!==this.config.outputs&&void 0!==this.config.outputs.left_menu?this.config.outputs.left_menu.split(","):ev.H}},watch:{title(){document&&(document.title=this.title)}},mounted(){const t=window.__GLANCES__||{},e=isFinite(t["refresh-time"])?parseInt(t["refresh-time"],10):void 0;Fd.init(e),this.setupHotKeys()},beforeUnmount(){Ld.unbind()},methods:{setupHotKeys(){Ld("a",(()=>{this.store.args.sort_processes_key=null})),Ld("c",(()=>{this.store.args.sort_processes_key="cpu_percent"})),Ld("m",(()=>{this.store.args.sort_processes_key="memory_percent"})),Ld("u",(()=>{this.store.args.sort_processes_key="username"})),Ld("p",(()=>{this.store.args.sort_processes_key="name"})),Ld("i",(()=>{this.store.args.sort_processes_key="io_counters"})),Ld("t",(()=>{this.store.args.sort_processes_key="timemillis"})),Ld("shift+A",(()=>{this.store.args.disable_amps=!this.store.args.disable_amps})),Ld("d",(()=>{this.store.args.disable_diskio=!this.store.args.disable_diskio})),Ld("shift+Q",(()=>{this.store.args.enable_irq=!this.store.args.enable_irq})),Ld("f",(()=>{this.store.args.disable_fs=!this.store.args.disable_fs})),Ld("j",(()=>{this.store.args.programs=!this.store.args.programs})),Ld("k",(()=>{this.store.args.disable_connections=!this.store.args.disable_connections})),Ld("n",(()=>{this.store.args.disable_network=!this.store.args.disable_network})),Ld("s",(()=>{this.store.args.disable_sensors=!this.store.args.disable_sensors})),Ld("2",(()=>{this.store.args.disable_left_sidebar=!this.store.args.disable_left_sidebar})),Ld("z",(()=>{this.store.args.disable_process=!this.store.args.disable_process})),Ld("shift+S",(()=>{this.store.args.process_short_name=!this.store.args.process_short_name})),Ld("shift+D",(()=>{this.store.args.disable_containers=!this.store.args.disable_containers})),Ld("b",(()=>{this.store.args.byte=!this.store.args.byte})),Ld("shift+B",(()=>{this.store.args.diskio_iops=!this.store.args.diskio_iops,this.store.args.diskio_iops&&(this.store.args.diskio_latency=!1)})),Ld("shift+L",(()=>{this.store.args.diskio_latency=!this.store.args.diskio_latency,this.store.args.diskio_latency&&(this.store.args.diskio_iops=!1)})),Ld("l",(()=>{this.store.args.disable_alert=!this.store.args.disable_alert})),Ld("1",(()=>{this.store.args.percpu=!this.store.args.percpu})),Ld("h",(()=>{this.store.args.help_tag=!this.store.args.help_tag})),Ld("shift+T",(()=>{this.store.args.network_sum=!this.store.args.network_sum})),Ld("shift+U",(()=>{this.store.args.network_cumul=!this.store.args.network_cumul})),Ld("shift+F",(()=>{this.store.args.fs_free_space=!this.store.args.fs_free_space})),Ld("3",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook})),Ld("6",(()=>{this.store.args.meangpu=!this.store.args.meangpu})),Ld("shift+G",(()=>{this.store.args.disable_gpu=!this.store.args.disable_gpu})),Ld("5",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook,this.store.args.disable_cpu=!this.store.args.disable_cpu,this.store.args.disable_mem=!this.store.args.disable_mem,this.store.args.disable_memswap=!this.store.args.disable_memswap,this.store.args.disable_load=!this.store.args.disable_load,this.store.args.disable_gpu=!this.store.args.disable_gpu})),Ld("shift+I",(()=>{this.store.args.disable_ip=!this.store.args.disable_ip})),Ld("shift+P",(()=>{this.store.args.disable_ports=!this.store.args.disable_ports})),Ld("shift+V",(()=>{this.store.args.disable_vms=!this.store.args.disable_vms})),Ld("shift+W",(()=>{this.store.args.disable_wifi=!this.store.args.disable_wifi})),Ld("0",(()=>{this.store.args.disable_irix=!this.store.args.disable_irix}))}}};const nv=Fp((0,Yd.A)(rv,[["render",function(t,e,r,n,i,o){const s=ec("glances-help"),a=ec("glances-plugin-hostname"),l=ec("glances-plugin-uptime"),c=ec("glances-plugin-system"),u=ec("glances-plugin-ip"),p=ec("glances-plugin-now"),d=ec("glances-plugin-cloud"),m=ec("glances-plugin-quicklook"),f=ec("glances-plugin-cpu"),h=ec("glances-plugin-gpu"),g=ec("glances-plugin-mem"),b=ec("glances-plugin-memswap"),y=ec("glances-plugin-load"),v=ec("glances-plugin-vms"),x=ec("glances-plugin-containers"),w=ec("glances-plugin-process"),_=ec("glances-plugin-alert");return o.dataLoaded?o.args.help_tag?(xu(),Eu(s,{key:1})):(xu(),Au("main",Gp,[Ru(" Display minimal header on low screen size (smarthphone) "),Iu("div",Wp,[Iu("div",Kp,[o.args.disable_system?Ru("v-if",!0):(xu(),Au("div",Xp,[Pu(a,{data:o.data},null,8,["data"])])),o.args.disable_uptime?Ru("v-if",!0):(xu(),Au("div",Qp,[Pu(l,{data:o.data},null,8,["data"])]))])]),Ru(" Display standard header on others screen sizes "),Iu("div",Zp,[Iu("div",Yp,[o.args.disable_system?Ru("v-if",!0):(xu(),Au("div",Jp,[Pu(c,{data:o.data},null,8,["data"])])),o.args.disable_ip?Ru("v-if",!0):(xu(),Au("div",td,[Pu(u,{data:o.data},null,8,["data"])])),o.args.disable_now?Ru("v-if",!0):(xu(),Au("div",ed,[Pu(p,{data:o.data},null,8,["data"])])),o.args.disable_uptime?Ru("v-if",!0):(xu(),Au("div",rd,[Pu(l,{data:o.data},null,8,["data"])]))])]),Iu("div",nd,[o.args.disable_cloud?Ru("v-if",!0):(xu(),Au("div",id,[Pu(d,{data:o.data},null,8,["data"])]))]),Ru(" Display top menu with CPU, MEM, LOAD..."),Iu("div",od,[Ru(" Quicklook "),o.args.disable_quicklook?Ru("v-if",!0):(xu(),Au("div",sd,[Pu(m,{data:o.data},null,8,["data"])])),Ru(" CPU "),o.args.disable_cpu&&o.args.percpu?Ru("v-if",!0):(xu(),Au("div",ad,[Pu(f,{data:o.data},null,8,["data"])])),Ru(' TODO: percpu need to be refactor\n
\n \n
\n
\n \n
'),Ru(" GPU "),!o.args.disable_gpu&&o.hasGpu?(xu(),Au("div",ld,[Pu(h,{data:o.data},null,8,["data"])])):Ru("v-if",!0),Ru(" MEM "),o.args.disable_mem?Ru("v-if",!0):(xu(),Au("div",cd,[Pu(g,{data:o.data},null,8,["data"])])),Ru(" SWAP "),o.args.disable_memswap?Ru("v-if",!0):(xu(),Au("div",ud,[Pu(b,{data:o.data},null,8,["data"])])),Ru(" LOAD "),o.args.disable_load?Ru("v-if",!0):(xu(),Au("div",pd,[Pu(y,{data:o.data},null,8,["data"])]))]),Ru(" Display bottom of the screen with sidebar and processlist "),Iu("div",dd,[Iu("div",md,[o.args.disable_left_sidebar?Ru("v-if",!0):(xu(),Au("div",{key:0,class:xs(["col-3 d-none d-md-block",{"sidebar-min":!o.args.percpu,"sidebar-max":o.args.percpu}])},[(xu(!0),Au(fu,null,oc(o.leftMenu,(t=>{return xu(),Au(fu,null,[o.args[`disable_${t}`]?Ru("v-if",!0):(xu(),Eu((e=`glances-plugin-${t}`,Wo(e)?nc(tc,e,!1)||e:e||rc),{key:0,id:`${t}`,data:o.data},null,8,["id","data"]))],64);var e})),256))],2)),Iu("div",{class:xs(["col",{"sidebar-min":!o.args.percpu,"sidebar-max":o.args.percpu}])},[o.args.disable_vms?Ru("v-if",!0):(xu(),Eu(v,{key:0,data:o.data},null,8,["data"])),o.args.disable_containers?Ru("v-if",!0):(xu(),Eu(x,{key:1,data:o.data},null,8,["data"])),Pu(w,{data:o.data},null,8,["data"]),o.args.disable_alert?Ru("v-if",!0):(xu(),Eu(_,{key:2,data:o.data},null,8,["data"]))],2)])])])):(xu(),Au("div",Vp,e[0]||(e[0]=[Iu("div",{class:"loader"},"Glances is loading...",-1)])))}]]));nv.config.globalProperties.$filters=e,nv.mount("#app")})()})(); \ No newline at end of file diff --git a/glances/plugins/containers/__init__.py b/glances/plugins/containers/__init__.py index 514626df..622e7903 100644 --- a/glances/plugins/containers/__init__.py +++ b/glances/plugins/containers/__init__.py @@ -497,7 +497,7 @@ class ContainersPlugin(GlancesPluginModel): return build_with_this_args def build_ports(self, ret, container): - if container['ports'] is not None and container['ports'] != '': + if container.get('ports', '') != '': msg = '{:16}'.format(container['ports']) else: msg = '{:16}'.format('_') @@ -554,6 +554,7 @@ class ContainersPlugin(GlancesPluginModel): 'mem': self.build_memory_line, 'diskio': self.build_io_line, 'networkio': self.build_net_line(args), + 'ports': self.build_ports, 'command': self.build_cmd_line, } steps.extend(v for k, v in options.items() if k not in self.disable_stats) @@ -593,3 +594,5 @@ def sort_docker_stats(stats: list[dict[str, Any]]) -> tuple[str, list[dict[str, # Return the main sort key and the sorted stats return sort_by, stats + # Return the main sort key and the sorted stats + return sort_by, stats diff --git a/glances/plugins/containers/engines/docker.py b/glances/plugins/containers/engines/docker.py index 13779eb0..afb87dac 100644 --- a/glances/plugins/containers/engines/docker.py +++ b/glances/plugins/containers/engines/docker.py @@ -359,7 +359,7 @@ class DockerExtension: # Manage special chars in command (see issue#2733) stats['command'] = replace_special_chars(' '.join(stats['command'])) - # Manage ports (see iisue#2054) + # Manage ports (see issue#2054) if hasattr(container, 'ports'): stats['ports'] = ','.join([f'{container.ports[cp][0]["HostPort"]}->{cp}' for cp in container.ports]) diff --git a/glances/plugins/containers/engines/podman.py b/glances/plugins/containers/engines/podman.py index 87dfa5ff..611a742d 100644 --- a/glances/plugins/containers/engines/podman.py +++ b/glances/plugins/containers/engines/podman.py @@ -404,8 +404,9 @@ class PodmanExtension: # Manage special chars in command (see issue#2733) stats['command'] = replace_special_chars(' '.join(stats['command'])) - # Manage ports (see iisue#2054) + # Manage ports (see issue#2054) if hasattr(container, 'ports'): stats['ports'] = ','.join([f'{container.ports[cp][0]["HostPort"]}->{cp}' for cp in container.ports]) return stats + return stats