Open ManuelSchneid3r opened 9 years ago
If you like I can help you fix that. Reply with the output to: free -m
free -m
gesamt benutzt frei gemns. Puffer/Cache verfügbar
Speicher: 6904 1827 1324 543 3752 4243
Swap: 0 0 0
\o/ yay! non English! lol I know Frei means free. Can you translate the other columns, please?
free -m
overall used free shared. Buffer/Cache available
mamory: 6904 1827 1324 543 3752 4243
Swap: 0 0 0
thanks: sudo nano /usr/bin/archey
at or near line 215:
find: used = int(ram[2]) - int(ram[5]) - int(ram[6])
place a # in front of the word "used"
This will comment the line and preserve it for later if you need to revert.
Under that line add: used = int(ram[2]) + int(ram[4])
It should look like:
used = int(ram[2]) + int(ram[4])
ctrl+x to save and hit enter without changing the name of the file.
It should be fixed.
wouldn't it be easier to parse /proc/meminfo
?
"Here's one I prepared earlier." :
out = cat("/proc/meminfo").splitlines()
for line in range(0, len(out)-1):
mem = out[line].split()
if mem[0] == 'MemFree:':
outMemFree = int(mem[1])
elif mem[0] == 'MemTotal:':
outMemTotal = int(mem[1])
elif mem[0] == 'Buffers:':
outMemBuf = int(mem[1])
elif mem[0] == 'Cached:':
outMemCache = int(mem[1])
elif mem[0] == 'SwapTotal:':
outMemSwapTotal = int(mem[1])
elif mem[0] == "SwapFree:":
outMemSwapFree = int(mem[1])
outMemUsed = outMemTotal - (outMemFree + outMemBuf + outMemCache)
outMemSwapUsed = outMemSwapTotal - outMemSwapFree
Used the version currently available in the AUR.