sysdata module fail for RAM info
Nyslay opened this issue · comments
Describe the bug
sysdata module not working at all, it fails for display RAM info
Your py3status version
py3status version 3.28 (python 3.10.7) on i3
To Reproduce
run sysdata module on it's default config. It looks like it fails to calculate RAM memory.
Expected behavior
Show correct RAM info
nyslay@nyslay-pc:/usr/lib/python3.10/site-packages/py3status/modules> python3 sysdata.py
'SReclaimable:' (KeyError) sysdata.py line 324.
Traceback
KeyError: 'SReclaimable:'
File "/usr/lib/python3.10/site-packages/py3status/module.py", line 940, in run
response = method()
File "/usr/lib/python3.10/site-packages/py3status/modules/sysdata.py", line 450, in sysdata
mem = self._calc_mem_info(self.mem_unit, meminfo, True)
File "/usr/lib/python3.10/site-packages/py3status/modules/sysdata.py", line 324, in _calc_mem_info
+ (meminfo["SReclaimable:"] - meminfo["Shmem:"])
nyslay@nyslay-pc:/usr/lib/python3.10/site-packages/py3status/modules>
nyslay@nyslay-pc:/usr/lib/python3.10/site-packages/py3status/modules> free -h
total used free shared buff/cache available
Mem: 15Gi 5.3Gi 5.6Gi 559Mi 5.4Gi 10Gi
Swap: 2.0Gi 0B 2.0Gi
nyslay@nyslay-pc:/usr/lib/python3.10/site-packages/py3status/modules> cat /proc/meminfo
MemTotal: 16265448 kB
MemFree: 5916592 kB
MemAvailable: 10716276 kB
Buffers: 3760 kB
Cached: 4694888 kB
SwapCached: 0 kB
Active: 2701508 kB
Inactive: 5794236 kB
Active(anon): 17356 kB
Inactive(anon): 4377188 kB
Active(file): 2684152 kB
Inactive(file): 1417048 kB
Unevictable: 499600 kB
Mlocked: 64 kB
SwapTotal: 2097148 kB
SwapFree: 2097148 kB
Zswap: 0 kB
Zswapped: 0 kB
Dirty: 1108 kB
Writeback: 0 kB
AnonPages: 4190636 kB
Mapped: 576132 kB
Shmem: 597448 kB
KReclaimable: 1034860 kB
Slab: 1190884 kB
SReclaimable: 1034860 kB
SUnreclaim: 156024 kB
KernelStack: 18176 kB
PageTables: 46816 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 10229872 kB
Committed_AS: 12296292 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 46468 kB
VmallocChunk: 0 kB
Percpu: 2464 kB
HardwareCorrupted: 0 kB
AnonHugePages: 1202176 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
FileHugePages: 0 kB
FilePmdMapped: 0 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 548764 kB
DirectMap2M: 10866688 kB
DirectMap1G: 5242880 kB
nyslay@nyslay-pc:/usr/lib/python3.10/site-packages/py3status/modules>
Old py3status version in use, on current version all is OK