fixed ramswap

main
Paco Hope 2023-10-08 14:02:36 -04:00
parent 9f00bc5519
commit 37797bfd7f
1 changed files with 2 additions and 1 deletions

View File

@ -137,7 +137,8 @@ class Update:
"""
# get last line, split it on spaces
# Total 2097152 259452 1837700 12%
swapinfo = self.callCommand(['/usr/sbin/swapinfo']).splitlines()[-1:].split(" ")
swaptext = self.callCommand(['/usr/sbin/swapinfo']).splitlines()[-1:]
swapinfo = re.split( " +", swaptext[0] )
self.ramswap = str(int(swapinfo[2]) / int(swapinfo[1]))
# these don't seem to exist on FreeBSD in the same way
self.rambuff = str(0)