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):
4646 except (psutil .NoSuchProcess , psutil .AccessDenied ) as e :
4747 pass
4848
49+ available = psutil .virtual_memory ().available
50+
4951 if callable (config .mem_limit ):
5052 mem_limit = config .mem_limit (rss = rss , pss = pss )
5153 else : # mem_limit is an Int
@@ -58,6 +60,7 @@ async def get(self):
5860 )
5961
6062 metrics = {"rss" : rss , "limits" : limits }
63+ metrics ["mem_avail" ] = available
6164 if pss is not None :
6265 metrics ["pss" ] = pss
6366
Original file line number Diff line number Diff line change @@ -54,7 +54,10 @@ class ResourceUseDisplay(Configurable):
5454
5555 system_memory_metrics = List (
5656 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+ ],
5861 )
5962
6063 process_cpu_metrics = List (
You can’t perform that action at this time.
0 commit comments