-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Describe the bug
Memory percentage is shown as a negative number when running on LXC container. Used memory is malformed.
To Reproduce
Create LXC container using Debian or Ubuntu and install Glances.
Expected behavior
Correct readouts for "MEM" and "used"
Screenshots
Environement (please complete the following information)
- Operating System (lsb_release -a or OS name/version): Debian 13 6.17.2-1-pve
- Glances & psutil versions: 4.4.1 & 7.1.3
- How do you install Glances (Pypi package, script, package manager, source): via pipx
- Glances test:
=============================================================================== Glances 4.4.1 (/home/gamesputen/.local/share/pipx/venvs/glances/lib/python3.13/site-packages/glances/__init__.py) Python 3.13.5 (/home/gamesputen/.local/share/pipx/venvs/glances/bin/python) PsUtil 7.1.3 (/home/gamesputen/.local/share/pipx/venvs/glances/lib/python3.13/site-packages/psutil/__init__.py) =============================================================================== alert [OK] 0.00002s [] amps [OK] 0.00012s key=name [{'count': 0, 'countmax': None, 'countmin': 1.0, 'key': 'name', 'name': 'Dropbox', 'refresh': 3.0, 'regex': True, 'result': None, 'timer': 2.1079139709472656}, ...] cloud [NA] connections [NA] containers [OK] 0.00005s [] core [OK] 0.00253s {'log': 2, 'phys': 6} cpu [OK] 0.00098s {'cpucore': 2, 'ctx_switches': 0, 'ctx_switches_gauge': 25461407, 'ctx_switches_rate_per_sec': 0, 'guest': 0.0, 'idle': 96.8, 'interrupts': 0, 'interrupts_gauge': 16573684, 'interrupts_rate_per_sec': 0, 'iowait': 0.0, 'irq': 0.0, 'nice': 0.0, 'soft_interrupts': 0, 'soft_interrupts_gauge': 5894057, 'soft_interrupts_rate_per_sec': 0, 'steal': 0.0, 'syscalls': 0, 'syscalls_gauge': 0, 'syscalls_rate_per_sec': 0, 'system': 1.5, 'time_since_update': 2.0126473903656006, 'total': 4.1, 'user': 1.7} diskio [OK] 0.00085s key=disk_name [{'disk_name': 'sda', 'key': 'disk_name', 'read_bytes': 0, 'read_bytes_gauge': 19477504, 'read_bytes_rate_per_sec': 0, 'read_count': 0, 'read_count_gauge': 1787, 'read_count_rate_per_sec': 0, 'read_latency': 0, 'read_time': 0, 'read_time_gauge': 1508, 'read_time_rate_per_sec': 0, 'time_since_update': 2.101877212524414, 'write_bytes': 0, 'write_bytes_gauge': 65536, 'write_bytes_rate_per_sec': 0, 'write_count': 0, 'write_count_gauge': 12, 'write_count_rate_per_sec': 0, 'write_latency': 0, 'write_time': 0, 'write_time_gauge': 17, 'write_time_rate_per_sec': 0}, ...] folders [OK] 0.00002s [] fs [OK] 0.00873s key=mnt_point [{'device_name': 'rpool/data/subvol-170-disk-0', 'free': 7806910464, 'fs_type': 'zfs', 'key': 'mnt_point', 'mnt_point': '/', 'options': 'rw,relatime,xattr,posixacl,casesensitive', 'percent': 27.3, 'size': 10737418240, 'used': 2930507776}, ...] gpu [OK] 0.00005s [] help [OK] 0.00000s None ip [OK] 0.00441s {'address': '***', 'mask': '***', 'mask_cidr': '***', 'public_address': '***', 'public_info_human': '***'} irq [NA] load [OK] 0.00006s {'cpucore': 2, 'min1': 0.51611328125, 'min15': 0.513671875, 'min5': 0.38623046875} mem [OK] 0.00094s {'active': 502128640, 'available': 2017924928, 'buffers': 0, 'cached': 2558813888, 'free': 527200256, 'inactive': 2285568, 'percent': -87.9, 'shared': 20045824, 'total': 1073741824, 'used': -944183104} memswap [OK] 0.00058s {'free': 0, 'percent': 0.0, 'sin': 0, 'sout': 0, 'time_since_update': 2.0302090644836426, 'total': 0, 'used': 0} network [OK] 0.00117s key=interface_name [{'alias': None, 'bytes_all': 41202, 'bytes_all_gauge': 20348434, 'bytes_all_rate_per_sec': 20374.0, 'bytes_recv': 11972, 'bytes_recv_gauge': 10138591, 'bytes_recv_rate_per_sec': 5920.0, 'bytes_sent': 29230, 'bytes_sent_gauge': 10209843, 'bytes_sent_rate_per_sec': 14454.0, 'interface_name': 'eth0', 'key': 'interface_name', 'speed': 10485760000, 'time_since_update': 2.0222253799438477}, ...] now [OK] 0.00003s {'custom': '2025-11-26 13:06:52 EST', 'iso': '2025-11-26T13:06:52-05:00'} percpu [OK] 0.00049s key=cpu_number [{'cpu_number': 0, 'dpc': None, 'guest': 0.0, 'guest_nice': 0.0, 'idle': 95.2, 'interrupt': None, 'iowait': 1.0, 'irq': 0.0, 'key': 'cpu_number', 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, 'system': 1.4, 'total': 4.8, 'user': 2.4}, ...] ports [OK] 0.00001s key=indice [{'description': 'DefaultGateway', 'host': '192.168.170.1', 'indice': 'port_0', 'key': 'indice', 'port': 0, 'refresh': 30, 'rtt_warning': None, 'status': False, 'timeout': 3}, ...] processcount [OK] 0.01436s {'pid_max': 0, 'running': 1, 'sleeping': 53, 'thread': 254, 'total': 54} processlist [OK] 0.00008s [] programlist [OK] 0.00029s [] psutilversion [OK] 0.00003s '7.1.3' quicklook [OK] 0.00124s {'cpu': 4.1, 'cpu_hz': 4268572000.0, 'cpu_hz_current': 2886236166.666667, 'cpu_log_core': 2, 'cpu_name': 'AMD Ryzen 5 5500', 'cpu_phys_core': 6, 'load': 25.7, 'mem': -88.0, 'percpu': [{...}, {...}], 'swap': 0.0} raid [NA] sensors [OK] 0.00001s key=label [{'critical': 80, 'key': 'label', 'label': 'Composite', 'type': 'temperature_core', 'unit': 'C', 'value': 37, 'warning': 80}, ...] smart [NA] system [OK] 0.00001s {'hostname': 'IO', 'hr_name': 'Debian GNU/Linux 13 64bit / Linux 6.17.2-1-pve', 'linux_distro': 'Debian GNU/Linux 13', 'os_name': 'Linux', 'os_version': '6.17.2-1-pve', 'platform': '64bit'} uptime [OK] 0.00036s {'seconds': 5258} version [OK] 0.00002s '4.4.1' vms [NA] wifi [OK] 0.00007s [] =============================================================================== Total time to update all stats: 0.03961s ===============================================================================
Metadata
Metadata
Assignees
Labels
No labels