mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Fix memory percentage left warning. Fixes #1966
This commit is contained in:
1 parent
3286348a95
commit
5eb5658a74
1 file changed
+1
-1
@@ -844,7 +844,7 @@ class BaseNode:
|
||||
"""
|
||||
|
||||
available_ram = int(psutil.virtual_memory().available / (1024 * 1024))
|
||||
percentage_left = psutil.virtual_memory().percent
|
||||
percentage_left = 100 - psutil.virtual_memory().percent
|
||||
if requested_ram > available_ram:
|
||||
message = '"{}" requires {}MB of RAM to run but there is only {}MB - {}% of RAM left on "{}"'.format(self.name,
|
||||
requested_ram,
|
||||
|
||||
Reference in new issue
Block a user