File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ async def get(self):
46
46
except (psutil .NoSuchProcess , psutil .AccessDenied ) as e :
47
47
pass
48
48
49
+ available = psutil .virtual_memory ().available
50
+
49
51
if callable (config .mem_limit ):
50
52
mem_limit = config .mem_limit (rss = rss , pss = pss )
51
53
else : # mem_limit is an Int
@@ -58,6 +60,7 @@ async def get(self):
58
60
)
59
61
60
62
metrics = {"rss" : rss , "limits" : limits }
63
+ metrics ["mem_avail" ] = available
61
64
if pss is not None :
62
65
metrics ["pss" ] = pss
63
66
Original file line number Diff line number Diff line change @@ -54,7 +54,10 @@ class ResourceUseDisplay(Configurable):
54
54
55
55
system_memory_metrics = List (
56
56
trait = PSUtilMetric (),
57
- default_value = [{"name" : "virtual_memory" , "attribute" : "total" }],
57
+ default_value = [
58
+ {"name" : "virtual_memory" , "attribute" : "total" },
59
+ {"name" : "virtual_memory" , "attribute" : "available" }
60
+ ],
58
61
)
59
62
60
63
process_cpu_metrics = List (
You can’t perform that action at this time.
0 commit comments