mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-10-03 07:46:18 +00:00
Update SystemStatus.py
This commit is contained in:
@@ -64,10 +64,12 @@ class Memory:
|
|||||||
try:
|
try:
|
||||||
if self.__memoryType__ == "virtual":
|
if self.__memoryType__ == "virtual":
|
||||||
memory = psutil.virtual_memory()
|
memory = psutil.virtual_memory()
|
||||||
|
self.available = memory.available
|
||||||
else:
|
else:
|
||||||
memory = psutil.swap_memory()
|
memory = psutil.swap_memory()
|
||||||
|
self.available = memory.free
|
||||||
self.total = memory.total
|
self.total = memory.total
|
||||||
self.available = memory.available
|
|
||||||
self.percent = memory.percent
|
self.percent = memory.percent
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
current_app.logger.error("Get Memory percent error", e)
|
current_app.logger.error("Get Memory percent error", e)
|
||||||
|
Reference in New Issue
Block a user