mirror of https://github.com/nicolargo/glances.git
Make the left menu configurable (in Curses and WebUI) #2648
This commit is contained in:
parent
0c3c2a3414
commit
adf6a4222d
|
|
@ -14,6 +14,9 @@ check_update=true
|
|||
history_size=1200
|
||||
# Set the way Glances should display the date (default is %Y-%m-%d %H:%M:%S %Z)
|
||||
#strftime_format="%Y-%m-%d %H:%M:%S %Z"
|
||||
# Define external directory for loading additional plugins
|
||||
# The layout follows the glances standard for plugin definitions
|
||||
#plugin_dir=/home/user/dev/plugins
|
||||
|
||||
##############################################################################
|
||||
# User interface
|
||||
|
|
@ -24,6 +27,8 @@ history_size=1200
|
|||
curse_theme=black
|
||||
# Separator in the Curses and WebUI interface (between top and others plugins)
|
||||
separator=True
|
||||
# Set the the Curses and WebUI interface left menu plugin list (comma-separated)
|
||||
#left_menu=network,wifi,connections,ports,diskio,fs,irq,folders,raid,smart,sensors,now
|
||||
# Limit the number of processes to display (for the WebUI)
|
||||
max_processes_display=25
|
||||
# Set the URL prefix (for the WebUI and the API)
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ history_size=1200
|
|||
curse_theme=black
|
||||
# Separator in the Curses and WebUI interface (between top and others plugins)
|
||||
separator=True
|
||||
# Set the the Curses and WebUI interface left menu plugin list (comma-separated)
|
||||
#left_menu=network,wifi,connections,ports,diskio,fs,irq,folders,raid,smart,sensors,now
|
||||
# Limit the number of processes to display (for the WebUI)
|
||||
max_processes_display=25
|
||||
# Set the URL prefix (for the WebUI and the API)
|
||||
|
|
@ -95,6 +97,7 @@ steal_warning=70
|
|||
steal_critical=90
|
||||
#steal_log=True
|
||||
#
|
||||
|
||||
# Context switch limit (core / second)
|
||||
# Leave commented to just use the default config (critical is 50000*# (Logical CPU cores)
|
||||
#ctx_switches_careful=10000
|
||||
|
|
|
|||
372
docs/api.rst
372
docs/api.rst
|
|
@ -109,16 +109,16 @@ GET alert
|
|||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/alert
|
||||
[{"avg": 71.13926038778988,
|
||||
"begin": 1704551440.0,
|
||||
[{"avg": 75.58190732727591,
|
||||
"begin": 1705242982.0,
|
||||
"count": 1,
|
||||
"desc": "",
|
||||
"end": -1,
|
||||
"max": 71.13926038778988,
|
||||
"min": 71.13926038778988,
|
||||
"max": 75.58190732727591,
|
||||
"min": 75.58190732727591,
|
||||
"sort": "memory_percent",
|
||||
"state": "WARNING",
|
||||
"sum": 71.13926038778988,
|
||||
"sum": 75.58190732727591,
|
||||
"top": [],
|
||||
"type": "MEM"}]
|
||||
|
||||
|
|
@ -140,21 +140,21 @@ Fields descriptions:
|
|||
Get a specific field::
|
||||
|
||||
# curl http://localhost:61208/api/4/alert/begin
|
||||
{"begin": [1704551440.0]}
|
||||
{"begin": [1705242982.0]}
|
||||
|
||||
Get a specific item when field matches the given value::
|
||||
|
||||
# curl http://localhost:61208/api/4/alert/begin/1704551440.0
|
||||
{"1704551440.0": [{"avg": 71.13926038778988,
|
||||
"begin": 1704551440.0,
|
||||
# curl http://localhost:61208/api/4/alert/begin/1705242982.0
|
||||
{"1705242982.0": [{"avg": 75.58190732727591,
|
||||
"begin": 1705242982.0,
|
||||
"count": 1,
|
||||
"desc": "",
|
||||
"end": -1,
|
||||
"max": 71.13926038778988,
|
||||
"min": 71.13926038778988,
|
||||
"max": 75.58190732727591,
|
||||
"min": 75.58190732727591,
|
||||
"sort": "memory_percent",
|
||||
"state": "WARNING",
|
||||
"sum": 71.13926038778988,
|
||||
"sum": 75.58190732727591,
|
||||
"top": [],
|
||||
"type": "MEM"}]}
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ Get plugin stats::
|
|||
"refresh": 3.0,
|
||||
"regex": True,
|
||||
"result": None,
|
||||
"timer": 0.3299849033355713},
|
||||
"timer": 0.19934892654418945},
|
||||
{"count": 0,
|
||||
"countmax": 20.0,
|
||||
"countmin": None,
|
||||
|
|
@ -181,7 +181,7 @@ Get plugin stats::
|
|||
"refresh": 3.0,
|
||||
"regex": True,
|
||||
"result": None,
|
||||
"timer": 0.32982563972473145}]
|
||||
"timer": 0.19925165176391602}]
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
|
|
@ -209,7 +209,7 @@ Get a specific item when field matches the given value::
|
|||
"refresh": 3.0,
|
||||
"regex": True,
|
||||
"result": None,
|
||||
"timer": 0.3299849033355713}]}
|
||||
"timer": 0.19934892654418945}]}
|
||||
|
||||
GET connections
|
||||
---------------
|
||||
|
|
@ -243,8 +243,8 @@ Get plugin stats::
|
|||
|
||||
# curl http://localhost:61208/api/4/containers
|
||||
[{"command": "top",
|
||||
"cpu": {"total": 1.4897269385342457e-06},
|
||||
"cpu_percent": 1.4897269385342457e-06,
|
||||
"cpu": {"total": 1.8635523677666806e-06},
|
||||
"cpu_percent": 1.8635523677666806e-06,
|
||||
"created": "2023-12-09T10:45:34.339489876+01:00",
|
||||
"engine": "podman",
|
||||
"id": "481d6ffb7eef284d062628cf350bdd9ce0a803db8a2a505d75565ed24322b714",
|
||||
|
|
@ -253,8 +253,8 @@ Get plugin stats::
|
|||
"io_rx": 0.0,
|
||||
"io_wx": 0.0,
|
||||
"key": "name",
|
||||
"memory": {"limit": 7823585280.0, "usage": 1388544.0},
|
||||
"memory_usage": 1388544.0,
|
||||
"memory": {"limit": 7823585280.0, "usage": 1306624.0},
|
||||
"memory_usage": 1306624.0,
|
||||
"name": "sad_darwin",
|
||||
"network": {"rx": 0.0, "time_since_update": 1, "tx": 0.0},
|
||||
"network_rx": 0.0,
|
||||
|
|
@ -262,10 +262,10 @@ Get plugin stats::
|
|||
"pod_id": "8d0f1c783def",
|
||||
"pod_name": "sad_darwin",
|
||||
"status": "running",
|
||||
"uptime": "4 weeks"},
|
||||
"uptime": "1 months"},
|
||||
{"command": "",
|
||||
"cpu": {"total": 3.397961399220156e-10},
|
||||
"cpu_percent": 3.397961399220156e-10,
|
||||
"cpu": {"total": 3.4505346487574547e-10},
|
||||
"cpu_percent": 3.4505346487574547e-10,
|
||||
"created": "2022-10-22T14:23:03.120912374+02:00",
|
||||
"engine": "podman",
|
||||
"id": "9491515251edcd5bb5dc17205d7ee573c0be96fe0b08b0a12a7e2cea874565ea",
|
||||
|
|
@ -274,8 +274,8 @@ Get plugin stats::
|
|||
"io_rx": 0.0,
|
||||
"io_wx": 0.0,
|
||||
"key": "name",
|
||||
"memory": {"limit": 7823585280.0, "usage": 299008.0},
|
||||
"memory_usage": 299008.0,
|
||||
"memory": {"limit": 7823585280.0, "usage": 290816.0},
|
||||
"memory_usage": 290816.0,
|
||||
"name": "8d0f1c783def-infra",
|
||||
"network": {"rx": 0.0, "time_since_update": 1, "tx": 0.0},
|
||||
"network_rx": 0.0,
|
||||
|
|
@ -283,7 +283,7 @@ Get plugin stats::
|
|||
"pod_id": "8d0f1c783def",
|
||||
"pod_name": "8d0f1c783def-infra",
|
||||
"status": "running",
|
||||
"uptime": "4 weeks"}]
|
||||
"uptime": "1 months"}]
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
|
|
@ -313,8 +313,8 @@ Get a specific item when field matches the given value::
|
|||
|
||||
# curl http://localhost:61208/api/4/containers/name/sad_darwin
|
||||
{"sad_darwin": [{"command": "top",
|
||||
"cpu": {"total": 1.4897269385342457e-06},
|
||||
"cpu_percent": 1.4897269385342457e-06,
|
||||
"cpu": {"total": 1.8635523677666806e-06},
|
||||
"cpu_percent": 1.8635523677666806e-06,
|
||||
"created": "2023-12-09T10:45:34.339489876+01:00",
|
||||
"engine": "podman",
|
||||
"id": "481d6ffb7eef284d062628cf350bdd9ce0a803db8a2a505d75565ed24322b714",
|
||||
|
|
@ -323,8 +323,8 @@ Get a specific item when field matches the given value::
|
|||
"io_rx": 0.0,
|
||||
"io_wx": 0.0,
|
||||
"key": "name",
|
||||
"memory": {"limit": 7823585280.0, "usage": 1388544.0},
|
||||
"memory_usage": 1388544.0,
|
||||
"memory": {"limit": 7823585280.0, "usage": 1306624.0},
|
||||
"memory_usage": 1306624.0,
|
||||
"name": "sad_darwin",
|
||||
"network": {"rx": 0.0, "time_since_update": 1, "tx": 0.0},
|
||||
"network_rx": 0.0,
|
||||
|
|
@ -332,7 +332,7 @@ Get a specific item when field matches the given value::
|
|||
"pod_id": "8d0f1c783def",
|
||||
"pod_name": "sad_darwin",
|
||||
"status": "running",
|
||||
"uptime": "4 weeks"}]}
|
||||
"uptime": "1 months"}]}
|
||||
|
||||
GET core
|
||||
--------
|
||||
|
|
@ -362,7 +362,7 @@ Get plugin stats::
|
|||
"ctx_switches": 0,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 64.6,
|
||||
"idle": 74.6,
|
||||
"interrupts": 0,
|
||||
"iowait": 0.0,
|
||||
"irq": 0.0,
|
||||
|
|
@ -371,10 +371,10 @@ Get plugin stats::
|
|||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"syscalls": 0,
|
||||
"system": 3.6,
|
||||
"system": 3.3,
|
||||
"time_since_update": 1,
|
||||
"total": 35.4,
|
||||
"user": 31.8}
|
||||
"total": 25.4,
|
||||
"user": 22.1}
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
|
|
@ -397,7 +397,7 @@ Fields descriptions:
|
|||
Get a specific field::
|
||||
|
||||
# curl http://localhost:61208/api/4/cpu/total
|
||||
{"total": 35.4}
|
||||
{"total": 25.4}
|
||||
|
||||
GET diskio
|
||||
----------
|
||||
|
|
@ -454,13 +454,13 @@ Get plugin stats::
|
|||
# curl http://localhost:61208/api/4/fs
|
||||
[{"alias": "Root",
|
||||
"device_name": "/dev/mapper/ubuntu--gnome--vg-root",
|
||||
"free": 23516868608,
|
||||
"free": 19083309056,
|
||||
"fs_type": "ext4",
|
||||
"key": "mnt_point",
|
||||
"mnt_point": "/",
|
||||
"percent": 89.8,
|
||||
"percent": 91.7,
|
||||
"size": 243334156288,
|
||||
"used": 207429832704},
|
||||
"used": 211863392256},
|
||||
{"device_name": "zsfpool",
|
||||
"free": 31195136,
|
||||
"fs_type": "zfs",
|
||||
|
|
@ -490,13 +490,13 @@ Get a specific item when field matches the given value::
|
|||
# curl http://localhost:61208/api/4/fs/mnt_point//
|
||||
{"/": [{"alias": "Root",
|
||||
"device_name": "/dev/mapper/ubuntu--gnome--vg-root",
|
||||
"free": 23516868608,
|
||||
"free": 19083309056,
|
||||
"fs_type": "ext4",
|
||||
"key": "mnt_point",
|
||||
"mnt_point": "/",
|
||||
"percent": 89.8,
|
||||
"percent": 91.7,
|
||||
"size": 243334156288,
|
||||
"used": 207429832704}]}
|
||||
"used": 211863392256}]}
|
||||
|
||||
GET ip
|
||||
------
|
||||
|
|
@ -504,11 +504,11 @@ GET ip
|
|||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/ip
|
||||
{"address": "192.168.1.14",
|
||||
"gateway": "192.168.1.1",
|
||||
{"address": "192.168.0.32",
|
||||
"gateway": "192.168.0.254",
|
||||
"mask": "255.255.255.0",
|
||||
"mask_cidr": 24,
|
||||
"public_address": "92.151.148.66",
|
||||
"public_address": "91.166.228.228",
|
||||
"public_info_human": ""}
|
||||
|
||||
Fields descriptions:
|
||||
|
|
@ -523,7 +523,7 @@ Fields descriptions:
|
|||
Get a specific field::
|
||||
|
||||
# curl http://localhost:61208/api/4/ip/gateway
|
||||
{"gateway": "192.168.1.1"}
|
||||
{"gateway": "192.168.0.254"}
|
||||
|
||||
GET load
|
||||
--------
|
||||
|
|
@ -532,9 +532,9 @@ Get plugin stats::
|
|||
|
||||
# curl http://localhost:61208/api/4/load
|
||||
{"cpucore": 4,
|
||||
"min1": 0.82470703125,
|
||||
"min15": 1.06787109375,
|
||||
"min5": 0.8173828125}
|
||||
"min1": 1.00927734375,
|
||||
"min15": 0.66259765625,
|
||||
"min5": 0.7548828125}
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
|
|
@ -546,7 +546,7 @@ Fields descriptions:
|
|||
Get a specific field::
|
||||
|
||||
# curl http://localhost:61208/api/4/load/min1
|
||||
{"min1": 0.82470703125}
|
||||
{"min1": 1.00927734375}
|
||||
|
||||
GET mem
|
||||
-------
|
||||
|
|
@ -554,16 +554,16 @@ GET mem
|
|||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/mem
|
||||
{"active": 2923274240,
|
||||
"available": 2257944576,
|
||||
"buffers": 294191104,
|
||||
"cached": 2339418112,
|
||||
"free": 2257944576,
|
||||
"inactive": 3208679424,
|
||||
"percent": 71.1,
|
||||
"shared": 533270528,
|
||||
{"active": 2827825152,
|
||||
"available": 1910370304,
|
||||
"buffers": 442753024,
|
||||
"cached": 1887649792,
|
||||
"free": 1910370304,
|
||||
"inactive": 3567714304,
|
||||
"percent": 75.6,
|
||||
"shared": 457003008,
|
||||
"total": 7823585280,
|
||||
"used": 5565640704}
|
||||
"used": 5913214976}
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
|
|
@ -590,13 +590,13 @@ GET memswap
|
|||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/memswap
|
||||
{"free": 5113073664,
|
||||
"percent": 36.7,
|
||||
"sin": 11089084416,
|
||||
"sout": 17246994432,
|
||||
{"free": 3856048128,
|
||||
"percent": 52.3,
|
||||
"sin": 14772441088,
|
||||
"sout": 22269526016,
|
||||
"time_since_update": 1,
|
||||
"total": 8082419712,
|
||||
"used": 2969346048}
|
||||
"used": 4226371584}
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
|
|
@ -620,9 +620,9 @@ Get plugin stats::
|
|||
|
||||
# curl http://localhost:61208/api/4/network
|
||||
[{"alias": None,
|
||||
"cumulative_cx": 2101554218,
|
||||
"cumulative_rx": 1050777109,
|
||||
"cumulative_tx": 1050777109,
|
||||
"cumulative_cx": 2537577204,
|
||||
"cumulative_rx": 1268788602,
|
||||
"cumulative_tx": 1268788602,
|
||||
"cx": 0,
|
||||
"interface_name": "lo",
|
||||
"is_up": True,
|
||||
|
|
@ -632,9 +632,9 @@ Get plugin stats::
|
|||
"time_since_update": 1,
|
||||
"tx": 0},
|
||||
{"alias": "WIFI",
|
||||
"cumulative_cx": 12866935025,
|
||||
"cumulative_rx": 9798275727,
|
||||
"cumulative_tx": 3068659298,
|
||||
"cumulative_cx": 14514673497,
|
||||
"cumulative_rx": 11339647204,
|
||||
"cumulative_tx": 3175026293,
|
||||
"cx": 224,
|
||||
"interface_name": "wlp2s0",
|
||||
"is_up": True,
|
||||
|
|
@ -673,9 +673,9 @@ Get a specific item when field matches the given value::
|
|||
|
||||
# curl http://localhost:61208/api/4/network/interface_name/lo
|
||||
{"lo": [{"alias": None,
|
||||
"cumulative_cx": 2101554218,
|
||||
"cumulative_rx": 1050777109,
|
||||
"cumulative_tx": 1050777109,
|
||||
"cumulative_cx": 2537577204,
|
||||
"cumulative_rx": 1268788602,
|
||||
"cumulative_tx": 1268788602,
|
||||
"cx": 0,
|
||||
"interface_name": "lo",
|
||||
"is_up": True,
|
||||
|
|
@ -691,7 +691,7 @@ GET now
|
|||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/now
|
||||
"2024-01-06 15:30:40 CET"
|
||||
"2024-01-14 15:36:22 CET"
|
||||
|
||||
GET percpu
|
||||
----------
|
||||
|
|
@ -702,7 +702,7 @@ Get plugin stats::
|
|||
[{"cpu_number": 0,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 36.0,
|
||||
"idle": 20.0,
|
||||
"iowait": 0.0,
|
||||
"irq": 0.0,
|
||||
"key": "cpu_number",
|
||||
|
|
@ -710,21 +710,21 @@ Get plugin stats::
|
|||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"system": 2.0,
|
||||
"total": 64.0,
|
||||
"user": 11.0},
|
||||
"total": 80.0,
|
||||
"user": 9.0},
|
||||
{"cpu_number": 1,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 44.0,
|
||||
"idle": 23.0,
|
||||
"iowait": 0.0,
|
||||
"irq": 0.0,
|
||||
"key": "cpu_number",
|
||||
"nice": 0.0,
|
||||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"system": 1.0,
|
||||
"total": 56.0,
|
||||
"user": 4.0}]
|
||||
"system": 2.0,
|
||||
"total": 77.0,
|
||||
"user": 7.0}]
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
|
|
@ -753,12 +753,12 @@ Get plugin stats::
|
|||
|
||||
# curl http://localhost:61208/api/4/ports
|
||||
[{"description": "DefaultGateway",
|
||||
"host": "192.168.1.1",
|
||||
"host": "192.168.0.254",
|
||||
"indice": "port_0",
|
||||
"port": 0,
|
||||
"refresh": 30,
|
||||
"rtt_warning": None,
|
||||
"status": 0.006601,
|
||||
"status": 0.005277,
|
||||
"timeout": 3}]
|
||||
|
||||
Fields descriptions:
|
||||
|
|
@ -775,19 +775,19 @@ Fields descriptions:
|
|||
Get a specific field::
|
||||
|
||||
# curl http://localhost:61208/api/4/ports/host
|
||||
{"host": ["192.168.1.1"]}
|
||||
{"host": ["192.168.0.254"]}
|
||||
|
||||
Get a specific item when field matches the given value::
|
||||
|
||||
# curl http://localhost:61208/api/4/ports/host/192.168.1.1
|
||||
{"192.168.1.1": [{"description": "DefaultGateway",
|
||||
"host": "192.168.1.1",
|
||||
"indice": "port_0",
|
||||
"port": 0,
|
||||
"refresh": 30,
|
||||
"rtt_warning": None,
|
||||
"status": 0.006601,
|
||||
"timeout": 3}]}
|
||||
# curl http://localhost:61208/api/4/ports/host/192.168.0.254
|
||||
{"192.168.0.254": [{"description": "DefaultGateway",
|
||||
"host": "192.168.0.254",
|
||||
"indice": "port_0",
|
||||
"port": 0,
|
||||
"refresh": 30,
|
||||
"rtt_warning": None,
|
||||
"status": 0.005277,
|
||||
"timeout": 3}]}
|
||||
|
||||
GET processcount
|
||||
----------------
|
||||
|
|
@ -795,7 +795,7 @@ GET processcount
|
|||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/processcount
|
||||
{"pid_max": 0, "running": 1, "sleeping": 318, "thread": 1497, "total": 384}
|
||||
{"pid_max": 0, "running": 1, "sleeping": 326, "thread": 1611, "total": 392}
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
|
|
@ -808,7 +808,7 @@ Fields descriptions:
|
|||
Get a specific field::
|
||||
|
||||
# curl http://localhost:61208/api/4/processcount/total
|
||||
{"total": 384}
|
||||
{"total": 392}
|
||||
|
||||
GET psutilversion
|
||||
-----------------
|
||||
|
|
@ -816,7 +816,7 @@ GET psutilversion
|
|||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/psutilversion
|
||||
"5.9.6"
|
||||
"5.9.7"
|
||||
|
||||
GET quicklook
|
||||
-------------
|
||||
|
|
@ -824,15 +824,15 @@ GET quicklook
|
|||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/quicklook
|
||||
{"cpu": 35.4,
|
||||
"cpu_hz": 2025000000.0,
|
||||
"cpu_hz_current": 2048947749.9999998,
|
||||
{"cpu": 25.4,
|
||||
"cpu_hz": 3000000000.0,
|
||||
"cpu_hz_current": 2723398750.0000005,
|
||||
"cpu_name": "Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz",
|
||||
"mem": 71.1,
|
||||
"mem": 75.6,
|
||||
"percpu": [{"cpu_number": 0,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 36.0,
|
||||
"idle": 20.0,
|
||||
"iowait": 0.0,
|
||||
"irq": 0.0,
|
||||
"key": "cpu_number",
|
||||
|
|
@ -840,35 +840,22 @@ Get plugin stats::
|
|||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"system": 2.0,
|
||||
"total": 64.0,
|
||||
"user": 11.0},
|
||||
"total": 80.0,
|
||||
"user": 9.0},
|
||||
{"cpu_number": 1,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 44.0,
|
||||
"idle": 23.0,
|
||||
"iowait": 0.0,
|
||||
"irq": 0.0,
|
||||
"key": "cpu_number",
|
||||
"nice": 0.0,
|
||||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"system": 1.0,
|
||||
"total": 56.0,
|
||||
"user": 4.0},
|
||||
"system": 2.0,
|
||||
"total": 77.0,
|
||||
"user": 7.0},
|
||||
{"cpu_number": 2,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 26.0,
|
||||
"iowait": 0.0,
|
||||
"irq": 0.0,
|
||||
"key": "cpu_number",
|
||||
"nice": 0.0,
|
||||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"system": 1.0,
|
||||
"total": 74.0,
|
||||
"user": 23.0},
|
||||
{"cpu_number": 3,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 21.0,
|
||||
|
|
@ -878,10 +865,23 @@ Get plugin stats::
|
|||
"nice": 0.0,
|
||||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"system": 2.0,
|
||||
"system": 1.0,
|
||||
"total": 79.0,
|
||||
"user": 24.0}],
|
||||
"swap": 36.7}
|
||||
"user": 9.0},
|
||||
{"cpu_number": 3,
|
||||
"guest": 0.0,
|
||||
"guest_nice": 0.0,
|
||||
"idle": 28.0,
|
||||
"iowait": 0.0,
|
||||
"irq": 0.0,
|
||||
"key": "cpu_number",
|
||||
"nice": 0.0,
|
||||
"softirq": 0.0,
|
||||
"steal": 0.0,
|
||||
"system": 1.0,
|
||||
"total": 72.0,
|
||||
"user": 3.0}],
|
||||
"swap": 52.3}
|
||||
|
||||
Fields descriptions:
|
||||
|
||||
|
|
@ -895,7 +895,7 @@ Fields descriptions:
|
|||
Get a specific field::
|
||||
|
||||
# curl http://localhost:61208/api/4/quicklook/cpu
|
||||
{"cpu": 35.4}
|
||||
{"cpu": 25.4}
|
||||
|
||||
GET sensors
|
||||
-----------
|
||||
|
|
@ -984,7 +984,7 @@ GET uptime
|
|||
Get plugin stats::
|
||||
|
||||
# curl http://localhost:61208/api/4/uptime
|
||||
"42 days, 6:32:43"
|
||||
"50 days, 6:38:24"
|
||||
|
||||
GET version
|
||||
-----------
|
||||
|
|
@ -1015,22 +1015,22 @@ Get top 2 processes of the processlist plugin::
|
|||
"--node-ipc",
|
||||
"--clientProcessId=391253"],
|
||||
"cpu_percent": 0.0,
|
||||
"cpu_times": {"children_system": 0.53,
|
||||
"children_user": 4.97,
|
||||
"cpu_times": {"children_system": 0.78,
|
||||
"children_user": 6.15,
|
||||
"iowait": 0.0,
|
||||
"system": 296.42,
|
||||
"user": 5037.11},
|
||||
"system": 360.08,
|
||||
"user": 6010.89},
|
||||
"gids": {"effective": 1000, "real": 1000, "saved": 1000},
|
||||
"io_counters": [664473600, 2191360, 0, 0, 0],
|
||||
"io_counters": [1231159296, 2641920, 0, 0, 0],
|
||||
"key": "pid",
|
||||
"memory_info": {"data": 896806912,
|
||||
"memory_info": {"data": 899014656,
|
||||
"dirty": 0,
|
||||
"lib": 0,
|
||||
"rss": 513888256,
|
||||
"shared": 23863296,
|
||||
"rss": 511119360,
|
||||
"shared": 26382336,
|
||||
"text": 120565760,
|
||||
"vms": 1207768694784},
|
||||
"memory_percent": 6.568449599618859,
|
||||
"memory_percent": 6.533057948593103,
|
||||
"name": "code",
|
||||
"nice": 0,
|
||||
"num_threads": 13,
|
||||
|
|
@ -1038,50 +1038,54 @@ Get top 2 processes of the processlist plugin::
|
|||
"status": "S",
|
||||
"time_since_update": 1,
|
||||
"username": "nicolargo"},
|
||||
{"cmdline": ["/snap/firefox/3206/usr/lib/firefox/firefox",
|
||||
"-contentproc",
|
||||
"-childID",
|
||||
"3",
|
||||
"-isForBrowser",
|
||||
"-prefsLen",
|
||||
"42198",
|
||||
"-prefMapSize",
|
||||
"234667",
|
||||
"-jsInitLen",
|
||||
"234236",
|
||||
"-parentBuildID",
|
||||
"20230928054334",
|
||||
"-greomni",
|
||||
"/snap/firefox/3206/usr/lib/firefox/omni.ja",
|
||||
"-appomni",
|
||||
"/snap/firefox/3206/usr/lib/firefox/browser/omni.ja",
|
||||
"-appDir",
|
||||
"/snap/firefox/3206/usr/lib/firefox/browser",
|
||||
"{83bff215-96f9-42b4-8c47-091fe64e4ee7}",
|
||||
"828507",
|
||||
"true",
|
||||
"tab"],
|
||||
{"cmdline": ["/usr/share/code/code",
|
||||
"--type=renderer",
|
||||
"--crashpad-handler-pid=391157",
|
||||
"--enable-crash-reporter=721e05a9-6035-4dcb-bd58-68097aa48dd0,no_channel",
|
||||
"--user-data-dir=/home/nicolargo/.config/Code",
|
||||
"--standard-schemes=vscode-webview,vscode-file",
|
||||
"--enable-sandbox",
|
||||
"--secure-schemes=vscode-webview,vscode-file",
|
||||
"--bypasscsp-schemes",
|
||||
"--cors-schemes=vscode-webview,vscode-file",
|
||||
"--fetch-schemes=vscode-webview,vscode-file",
|
||||
"--service-worker-schemes=vscode-webview",
|
||||
"--streaming-schemes",
|
||||
"--app-path=/usr/share/code/resources/app",
|
||||
"--enable-sandbox",
|
||||
"--enable-blink-features=HighlightAPI",
|
||||
"--first-renderer-process",
|
||||
"--lang=en-US",
|
||||
"--num-raster-threads=2",
|
||||
"--enable-main-frame-before-activation",
|
||||
"--renderer-client-id=4",
|
||||
"--time-ticks-at-unix-epoch=-1702561657662203",
|
||||
"--launch-time-ticks=95866298101",
|
||||
"--shared-files=v8_context_snapshot_data:100",
|
||||
"--field-trial-handle=0,i,2865222574050452096,10380804405300286374,262144",
|
||||
"--disable-features=CalculateNativeWinOcclusion,SpareRendererForSitePerProcess",
|
||||
"--vscode-window-config=vscode:a08b576a-4b00-4480-bfc3-390d8aea727c"],
|
||||
"cpu_percent": 0.0,
|
||||
"cpu_times": {"children_system": 0.0,
|
||||
"children_user": 0.0,
|
||||
"iowait": 0.0,
|
||||
"system": 23.42,
|
||||
"user": 303.22},
|
||||
"system": 872.37,
|
||||
"user": 12288.82},
|
||||
"gids": {"effective": 1000, "real": 1000, "saved": 1000},
|
||||
"io_counters": [16292864, 0, 0, 0, 0],
|
||||
"io_counters": [1207435264, 3117056, 0, 0, 0],
|
||||
"key": "pid",
|
||||
"memory_info": {"data": 773853184,
|
||||
"memory_info": {"data": 1501626368,
|
||||
"dirty": 0,
|
||||
"lib": 0,
|
||||
"rss": 413270016,
|
||||
"shared": 67846144,
|
||||
"text": 643072,
|
||||
"vms": 3338055680},
|
||||
"memory_percent": 5.282360979134109,
|
||||
"name": "WebExtensions",
|
||||
"rss": 484990976,
|
||||
"shared": 76034048,
|
||||
"text": 120565760,
|
||||
"vms": 1220702756864},
|
||||
"memory_percent": 6.199088507922547,
|
||||
"name": "code",
|
||||
"nice": 0,
|
||||
"num_threads": 20,
|
||||
"pid": 828921,
|
||||
"num_threads": 15,
|
||||
"pid": 391192,
|
||||
"status": "S",
|
||||
"time_since_update": 1,
|
||||
"username": "nicolargo"}]
|
||||
|
|
@ -1112,34 +1116,34 @@ GET stats history
|
|||
History of a plugin::
|
||||
|
||||
# curl http://localhost:61208/api/4/cpu/history
|
||||
{"system": [["2024-01-06T15:30:42.228891", 3.6],
|
||||
["2024-01-06T15:30:43.250803", 1.7],
|
||||
["2024-01-06T15:30:44.471806", 1.7]],
|
||||
"user": [["2024-01-06T15:30:42.228879", 31.8],
|
||||
["2024-01-06T15:30:43.250794", 10.9],
|
||||
["2024-01-06T15:30:44.471792", 10.9]]}
|
||||
{"system": [["2024-01-14T15:36:24.814316", 3.3],
|
||||
["2024-01-14T15:36:25.828843", 1.8],
|
||||
["2024-01-14T15:36:26.982020", 1.8]],
|
||||
"user": [["2024-01-14T15:36:24.814299", 22.1],
|
||||
["2024-01-14T15:36:25.828836", 9.7],
|
||||
["2024-01-14T15:36:26.982006", 9.7]]}
|
||||
|
||||
Limit history to last 2 values::
|
||||
|
||||
# curl http://localhost:61208/api/4/cpu/history/2
|
||||
{"system": [["2024-01-06T15:30:43.250803", 1.7],
|
||||
["2024-01-06T15:30:44.471806", 1.7]],
|
||||
"user": [["2024-01-06T15:30:43.250794", 10.9],
|
||||
["2024-01-06T15:30:44.471792", 10.9]]}
|
||||
{"system": [["2024-01-14T15:36:25.828843", 1.8],
|
||||
["2024-01-14T15:36:26.982020", 1.8]],
|
||||
"user": [["2024-01-14T15:36:25.828836", 9.7],
|
||||
["2024-01-14T15:36:26.982006", 9.7]]}
|
||||
|
||||
History for a specific field::
|
||||
|
||||
# curl http://localhost:61208/api/4/cpu/system/history
|
||||
{"system": [["2024-01-06T15:30:40.487397", 3.6],
|
||||
["2024-01-06T15:30:42.228891", 3.6],
|
||||
["2024-01-06T15:30:43.250803", 1.7],
|
||||
["2024-01-06T15:30:44.471806", 1.7]]}
|
||||
{"system": [["2024-01-14T15:36:22.968267", 3.3],
|
||||
["2024-01-14T15:36:24.814316", 3.3],
|
||||
["2024-01-14T15:36:25.828843", 1.8],
|
||||
["2024-01-14T15:36:26.982020", 1.8]]}
|
||||
|
||||
Limit history for a specific field to last 2 values::
|
||||
|
||||
# curl http://localhost:61208/api/4/cpu/system/history
|
||||
{"system": [["2024-01-06T15:30:43.250803", 1.7],
|
||||
["2024-01-06T15:30:44.471806", 1.7]]}
|
||||
{"system": [["2024-01-14T15:36:25.828843", 1.8],
|
||||
["2024-01-14T15:36:26.982020", 1.8]]}
|
||||
|
||||
GET limits (used for thresholds)
|
||||
--------------------------------
|
||||
|
|
|
|||
|
|
@ -48,10 +48,30 @@ A first section (called global) is available:
|
|||
# History size (maximum number of values)
|
||||
# Default is 28800: 1 day with 1 point every 3 seconds
|
||||
history_size=28800
|
||||
# Define directory external to glances hierarchy for loading additional plugins
|
||||
# Set the way Glances should display the date (default is %Y-%m-%d %H:%M:%S %Z)
|
||||
#strftime_format="%Y-%m-%d %H:%M:%S %Z"
|
||||
# Define external directory for loading additional plugins
|
||||
# The layout follows the glances standard for plugin definitions
|
||||
# (see <install-dir>glances/plugins for details)
|
||||
# plugin_dir=/home/user/dev/plugins
|
||||
#plugin_dir=/home/user/dev/plugins
|
||||
|
||||
than a second one concerning the user interface:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[outputs]
|
||||
# Theme name (for the moment only for the Curses interface: black or white)
|
||||
curse_theme=black
|
||||
# Separator in the Curses and WebUI interface (between top and others plugins)
|
||||
separator=True
|
||||
# Set the the Curses and WebUI interface left menu plugin list (comma-separated)
|
||||
#left_menu=network,wifi,connections,ports,diskio,fs,irq,folders,raid,smart,sensors,now
|
||||
# Limit the number of processes to display (for the WebUI)
|
||||
max_processes_display=25
|
||||
# Set the URL prefix (for the WebUI and the API)
|
||||
# Example: url_prefix=/glances/ => http://localhost/glances/
|
||||
# The final / is mandatory
|
||||
# Default is no prefix (/)
|
||||
#url_prefix=/glances/
|
||||
|
||||
Each plugin, export module, and application monitoring process (AMP) can
|
||||
have a section. Below is an example for the CPU plugin:
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|||
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
||||
..
|
||||
.TH "GLANCES" "1" "Jan 06, 2024" "4.0.0_beta01" "Glances"
|
||||
.TH "GLANCES" "1" "Jan 14, 2024" "4.0.0_beta01" "Glances"
|
||||
.SH NAME
|
||||
glances \- An eye on your system
|
||||
.SH SYNOPSIS
|
||||
|
|
@ -615,10 +615,36 @@ check_update=false
|
|||
# History size (maximum number of values)
|
||||
# Default is 28800: 1 day with 1 point every 3 seconds
|
||||
history_size=28800
|
||||
# Define directory external to glances hierarchy for loading additional plugins
|
||||
# Set the way Glances should display the date (default is %Y\-%m\-%d %H:%M:%S %Z)
|
||||
#strftime_format=\(dq%Y\-%m\-%d %H:%M:%S %Z\(dq
|
||||
# Define external directory for loading additional plugins
|
||||
# The layout follows the glances standard for plugin definitions
|
||||
# (see <install\-dir>glances/plugins for details)
|
||||
# plugin_dir=/home/user/dev/plugins
|
||||
#plugin_dir=/home/user/dev/plugins
|
||||
.ft P
|
||||
.fi
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.sp
|
||||
than a second one concerning the user interface:
|
||||
.INDENT 0.0
|
||||
.INDENT 3.5
|
||||
.sp
|
||||
.nf
|
||||
.ft C
|
||||
[outputs]
|
||||
# Theme name (for the moment only for the Curses interface: black or white)
|
||||
curse_theme=black
|
||||
# Separator in the Curses and WebUI interface (between top and others plugins)
|
||||
separator=True
|
||||
# Set the the Curses and WebUI interface left menu plugin list (comma\-separated)
|
||||
#left_menu=network,wifi,connections,ports,diskio,fs,irq,folders,raid,smart,sensors,now
|
||||
# Limit the number of processes to display (for the WebUI)
|
||||
max_processes_display=25
|
||||
# Set the URL prefix (for the WebUI and the API)
|
||||
# Example: url_prefix=/glances/ => http://localhost/glances/
|
||||
# The final / is mandatory
|
||||
# Default is no prefix (/)
|
||||
#url_prefix=/glances/
|
||||
.ft P
|
||||
.fi
|
||||
.UNINDENT
|
||||
|
|
|
|||
|
|
@ -325,6 +325,13 @@ class Config(object):
|
|||
pass
|
||||
return ret
|
||||
|
||||
def get_list_value(self, section, option, default=None, separator=','):
|
||||
"""Get the list value of an option, if it exists."""
|
||||
try:
|
||||
return self.parser.get(section, option).split(separator)
|
||||
except (NoOptionError, NoSectionError):
|
||||
return default
|
||||
|
||||
def get_int_value(self, section, option, default=0):
|
||||
"""Get the int value of an option, if it exists."""
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -105,6 +105,8 @@ class _GlancesCurses(object):
|
|||
_quicklook_max_width = 68
|
||||
|
||||
# Define left sidebar
|
||||
# This default list is also defined in the glances/outputs/static/js/uiconfig.json
|
||||
# file for the web interface
|
||||
_left_sidebar = [
|
||||
'network',
|
||||
'wifi',
|
||||
|
|
@ -197,11 +199,16 @@ class _GlancesCurses(object):
|
|||
|
||||
def load_config(self, config):
|
||||
"""Load the outputs section of the configuration file."""
|
||||
# Load the theme
|
||||
if config is not None and config.has_section('outputs'):
|
||||
logger.debug('Read the outputs section in the configuration file')
|
||||
# Load the theme
|
||||
self.theme['name'] = config.get_value('outputs', 'curse_theme', default='black')
|
||||
# Separator ?
|
||||
self.args.enable_separator = config.get_bool_value('outputs', 'separator', default=True)
|
||||
# Set the left sidebar list
|
||||
self._left_sidebar = config.get_list_value('outputs',
|
||||
'left_menu',
|
||||
default=self._left_sidebar)
|
||||
|
||||
def is_theme(self, name):
|
||||
"""Return True if the theme *name* should be used."""
|
||||
|
|
@ -629,18 +636,23 @@ class _GlancesCurses(object):
|
|||
|
||||
for p in stats.getPluginsList(enable=False):
|
||||
if p == 'quicklook' or p == 'processlist':
|
||||
# processlist is done later
|
||||
# - processlist is done later
|
||||
# because we need to know how many processes could be displayed
|
||||
# - quicklook is done later
|
||||
# because it is based on CPU, MEM, SWAP and LOAD
|
||||
continue
|
||||
|
||||
# Compute the plugin max size
|
||||
plugin_max_width = None
|
||||
if p in self._left_sidebar:
|
||||
plugin_max_width = max(self._left_sidebar_min_width, self.term_window.getmaxyx()[1] - 105)
|
||||
plugin_max_width = min(self._left_sidebar_max_width, plugin_max_width)
|
||||
plugin_max_width = max(self._left_sidebar_min_width,
|
||||
self.term_window.getmaxyx()[1] - 105)
|
||||
plugin_max_width = min(self._left_sidebar_max_width,
|
||||
plugin_max_width)
|
||||
|
||||
# Get the view
|
||||
ret[p] = stats.get_plugin(p).get_stats_display(args=self.args, max_width=plugin_max_width)
|
||||
ret[p] = stats.get_plugin(p).get_stats_display(args=self.args,
|
||||
max_width=plugin_max_width)
|
||||
|
||||
return ret
|
||||
|
||||
|
|
|
|||
|
|
@ -65,77 +65,18 @@
|
|||
<div class="row">
|
||||
<div class="col-sm-6 sidebar" v-if="!args.disable_left_sidebar">
|
||||
<div class="table">
|
||||
<glances-plugin-network
|
||||
id="plugin-network"
|
||||
class="plugin table-row-group"
|
||||
v-if="!args.disable_network"
|
||||
:data="data"
|
||||
></glances-plugin-network>
|
||||
<glances-plugin-wifi
|
||||
id="plugin-wifi"
|
||||
class="plugin table-row-group"
|
||||
v-if="!args.disable_wifi"
|
||||
:data="data"
|
||||
></glances-plugin-wifi>
|
||||
<glances-plugin-connections
|
||||
id="plugin-connections"
|
||||
class="plugin table-row-group"
|
||||
v-if="isLinux && !args.disable_connections"
|
||||
:data="data"
|
||||
></glances-plugin-connections>
|
||||
<glances-plugin-ports
|
||||
id="plugin-ports"
|
||||
class="plugin table-row-group"
|
||||
v-if="!args.disable_ports"
|
||||
:data="data"
|
||||
></glances-plugin-ports>
|
||||
<glances-plugin-diskio
|
||||
id="plugin-diskio"
|
||||
class="plugin table-row-group"
|
||||
v-if="!args.disable_diskio"
|
||||
:data="data"
|
||||
></glances-plugin-diskio>
|
||||
<glances-plugin-fs
|
||||
id="plugin-fs"
|
||||
class="plugin table-row-group"
|
||||
v-if="!args.disable_fs"
|
||||
:data="data"
|
||||
></glances-plugin-fs>
|
||||
<glances-plugin-irq
|
||||
id="plugin-irq"
|
||||
class="plugin table-row-group"
|
||||
v-if="!args.disable_irq"
|
||||
:data="data"
|
||||
></glances-plugin-irq>
|
||||
<glances-plugin-smart
|
||||
id="plugin-smart"
|
||||
class="plugin table-row-group"
|
||||
v-if="!args.disable_smart"
|
||||
:data="data"
|
||||
></glances-plugin-smart>
|
||||
<glances-plugin-folders
|
||||
id="plugin-folders"
|
||||
class="plugin table-row-group"
|
||||
v-if="!args.disable_folders"
|
||||
:data="data"
|
||||
></glances-plugin-folders>
|
||||
<glances-plugin-raid
|
||||
id="plugin-raid"
|
||||
class="plugin table-row-group"
|
||||
v-if="!args.raid"
|
||||
:data="data"
|
||||
></glances-plugin-raid>
|
||||
<glances-plugin-sensors
|
||||
id="plugin-sensors"
|
||||
class="plugin table-row-group"
|
||||
v-if="!args.disable_sensors"
|
||||
:data="data"
|
||||
></glances-plugin-sensors>
|
||||
<glances-plugin-now
|
||||
id="plugin-now"
|
||||
class="plugin table-row-group"
|
||||
:data="data"
|
||||
></glances-plugin-now>
|
||||
<!-- When they exist on the same node, v-if has a higher priority than v-for.
|
||||
That means the v-if condition will not have access to variables from the
|
||||
scope of the v-for -->
|
||||
<template v-for="plugin in leftMenu">
|
||||
<component
|
||||
v-if="!args[`disable_${plugin}`]"
|
||||
:is="`glances-plugin-${plugin}`"
|
||||
:id="`plugin-${plugin}`"
|
||||
class="plugin table-row-group"
|
||||
:data="data">
|
||||
</component>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-18">
|
||||
|
|
@ -188,6 +129,8 @@ import GlancesPluginSystem from './components/plugin-system.vue';
|
|||
import GlancesPluginUptime from './components/plugin-uptime.vue';
|
||||
import GlancesPluginWifi from './components/plugin-wifi.vue';
|
||||
|
||||
import uiconfig from './uiconfig.json';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
GlancesHelp,
|
||||
|
|
@ -228,6 +171,9 @@ export default {
|
|||
args() {
|
||||
return this.store.args || {};
|
||||
},
|
||||
config() {
|
||||
return this.store.config || {};
|
||||
},
|
||||
data() {
|
||||
return this.store.data || {};
|
||||
},
|
||||
|
|
@ -244,6 +190,11 @@ export default {
|
|||
const { data } = this;
|
||||
const title = (data.stats && data.stats.system && data.stats.system.hostname) || '';
|
||||
return title ? `${title} - Glances` : 'Glances';
|
||||
},
|
||||
leftMenu() {
|
||||
return this.config.outputs.left_menu !== undefined
|
||||
? this.config.outputs.left_menu.split(',')
|
||||
: uiconfig.leftMenu;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -198,7 +198,12 @@ class PluginModel(GlancesPluginModel):
|
|||
return ret
|
||||
|
||||
# Max size for the interface name
|
||||
name_max_width = max_width - 13
|
||||
if max_width:
|
||||
name_max_width = max_width - 13
|
||||
else:
|
||||
# No max_width defined, return an emptu curse message
|
||||
logger.debug("No max_width defined for the {} plugin, it will not be displayed.".format(self.plugin_name))
|
||||
return ret
|
||||
|
||||
# Header
|
||||
msg = '{:{width}}'.format('DISK I/O', width=name_max_width)
|
||||
|
|
|
|||
|
|
@ -138,7 +138,12 @@ class PluginModel(GlancesPluginModel):
|
|||
return ret
|
||||
|
||||
# Max size for the interface name
|
||||
name_max_width = max_width - 7
|
||||
if max_width:
|
||||
name_max_width = max_width - 7
|
||||
else:
|
||||
# No max_width defined, return an emptu curse message
|
||||
logger.debug("No max_width defined for the {} plugin, it will not be displayed.".format(self.plugin_name))
|
||||
return ret
|
||||
|
||||
# Header
|
||||
msg = '{:{width}}'.format('FOLDERS', width=name_max_width)
|
||||
|
|
|
|||
|
|
@ -266,7 +266,12 @@ class PluginModel(GlancesPluginModel):
|
|||
return ret
|
||||
|
||||
# Max size for the interface name
|
||||
name_max_width = max_width - 13
|
||||
if max_width:
|
||||
name_max_width = max_width - 13
|
||||
else:
|
||||
# No max_width defined, return an emptu curse message
|
||||
logger.debug("No max_width defined for the {} plugin, it will not be displayed.".format(self.plugin_name))
|
||||
return ret
|
||||
|
||||
# Build the string message
|
||||
# Header
|
||||
|
|
|
|||
|
|
@ -101,7 +101,12 @@ class PluginModel(GlancesPluginModel):
|
|||
return ret
|
||||
|
||||
# Max size for the interface name
|
||||
name_max_width = max_width - 7
|
||||
if max_width:
|
||||
name_max_width = max_width - 7
|
||||
else:
|
||||
# No max_width defined, return an emptu curse message
|
||||
logger.debug("No max_width defined for the {} plugin, it will not be displayed.".format(self.plugin_name))
|
||||
return ret
|
||||
|
||||
# Build the string message
|
||||
# Header
|
||||
|
|
|
|||
|
|
@ -323,7 +323,12 @@ class PluginModel(GlancesPluginModel):
|
|||
return ret
|
||||
|
||||
# Max size for the interface name
|
||||
name_max_width = max_width - 12
|
||||
if max_width:
|
||||
name_max_width = max_width - 12
|
||||
else:
|
||||
# No max_width defined, return an emptu curse message
|
||||
logger.debug("No max_width defined for the {} plugin, it will not be displayed.".format(self.plugin_name))
|
||||
return ret
|
||||
|
||||
# Header
|
||||
msg = '{:{width}}'.format('NETWORK', width=name_max_width)
|
||||
|
|
|
|||
|
|
@ -180,7 +180,12 @@ class PluginModel(GlancesPluginModel):
|
|||
return ret
|
||||
|
||||
# Max size for the interface name
|
||||
name_max_width = max_width - 7
|
||||
if max_width:
|
||||
name_max_width = max_width - 7
|
||||
else:
|
||||
# No max_width defined, return an emptu curse message
|
||||
logger.debug("No max_width defined for the {} plugin, it will not be displayed.".format(self.plugin_name))
|
||||
return ret
|
||||
|
||||
# Build the string message
|
||||
for p in self.stats:
|
||||
|
|
|
|||
|
|
@ -132,6 +132,11 @@ class PluginModel(GlancesPluginModel):
|
|||
if not self.stats or self.is_disabled():
|
||||
return ret
|
||||
|
||||
if not max_width:
|
||||
# No max_width defined, return an emptu curse message
|
||||
logger.debug("No max_width defined for the {} plugin, it will not be displayed.".format(self.plugin_name))
|
||||
return ret
|
||||
|
||||
# Define the data: Bar (default behavior) or Sparkline
|
||||
sparkline_tag = False
|
||||
if self.args.sparkline and self.history_enable() and not self.args.client:
|
||||
|
|
|
|||
|
|
@ -77,7 +77,12 @@ class PluginModel(GlancesPluginModel):
|
|||
return ret
|
||||
|
||||
# Max size for the interface name
|
||||
name_max_width = max_width - 12
|
||||
if max_width:
|
||||
name_max_width = max_width - 12
|
||||
else:
|
||||
# No max_width defined, return an emptu curse message
|
||||
logger.debug("No max_width defined for the {} plugin, it will not be displayed.".format(self.plugin_name))
|
||||
return ret
|
||||
|
||||
# Header
|
||||
msg = '{:{width}}'.format('RAID disks', width=name_max_width)
|
||||
|
|
|
|||
|
|
@ -251,7 +251,12 @@ class PluginModel(GlancesPluginModel):
|
|||
return ret
|
||||
|
||||
# Max size for the interface name
|
||||
name_max_width = max_width - 12
|
||||
if max_width:
|
||||
name_max_width = max_width - 12
|
||||
else:
|
||||
# No max_width defined, return an emptu curse message
|
||||
logger.debug("No max_width defined for the {} plugin, it will not be displayed.".format(self.plugin_name))
|
||||
return ret
|
||||
|
||||
# Header
|
||||
msg = '{:{width}}'.format('SENSORS', width=name_max_width)
|
||||
|
|
|
|||
|
|
@ -168,7 +168,12 @@ class PluginModel(GlancesPluginModel):
|
|||
return ret
|
||||
|
||||
# Max size for the interface name
|
||||
name_max_width = max_width - 6
|
||||
if max_width:
|
||||
name_max_width = max_width - 6
|
||||
else:
|
||||
# No max_width defined, return an emptu curse message
|
||||
logger.debug("No max_width defined for the {} plugin, it will not be displayed.".format(self.plugin_name))
|
||||
return ret
|
||||
|
||||
# Header
|
||||
msg = '{:{width}}'.format('SMART disks', width=name_max_width)
|
||||
|
|
|
|||
|
|
@ -183,7 +183,12 @@ class PluginModel(GlancesPluginModel):
|
|||
return ret
|
||||
|
||||
# Max size for the interface name
|
||||
if_name_max_width = max_width - 5
|
||||
if max_width:
|
||||
if_name_max_width = max_width - 5
|
||||
else:
|
||||
# No max_width defined, return an emptu curse message
|
||||
logger.debug("No max_width defined for the {} plugin, it will not be displayed.".format(self.plugin_name))
|
||||
return ret
|
||||
|
||||
# Build the string message
|
||||
# Header
|
||||
|
|
|
|||
Loading…
Reference in New Issue