Skip to content
Snippets Groups Projects
Commit 47fd5c21 authored by Daniel CARRON's avatar Daniel CARRON :b:
Browse files

Added units to resources monitoring

parent 279f2081
No related branches found
No related tags found
No related merge requests found
Pipeline #75336 failed
This commit is part of merge request !6. Comments created here will be created in the context of that merge request.
......@@ -100,7 +100,7 @@ def gpu_constants():
"""
return run_nvidia_smi(
("gpu_name", "driver_version", "memory.total"),
("gpu_name", "gpu_driver_version", "gpu_memory_total"),
("gpu_name", "gpu_driver_version", "gpu_memory_total_GB"),
)
......@@ -135,10 +135,10 @@ def gpu_log():
"utilization.gpu",
),
(
"gpu_memory_total",
"gpu_memory_used",
"gpu_memory_free",
"gpu_percent",
"gpu_memory_total_GB",
"gpu_memory_used_GB",
"gpu_memory_free_percent",
"gpu_usage_percent",
),
)
......@@ -165,7 +165,7 @@ def cpu_constants():
1. ``cpu_count`` (:py:class:`int`): number of logical CPUs available
"""
return (
("cpu_memory_total", psutil.virtual_memory().total / GB),
("cpu_memory_total_GB", psutil.virtual_memory().total / GB),
("cpu_count", psutil.cpu_count(logical=True)),
)
......@@ -245,9 +245,9 @@ class CPULogger:
# at this point, but ensures to update counts later on
gone.add(k)
return (
("cpu_memory_used", psutil.virtual_memory().used / GB),
("cpu_rss", sum([k.rss for k in memory_info]) / GB),
("cpu_vms", sum([k.vms for k in memory_info]) / GB),
("cpu_memory_used_GB", psutil.virtual_memory().used / GB),
("cpu_rss_GB", sum([k.rss for k in memory_info]) / GB),
("cpu_vms_GB", sum([k.vms for k in memory_info]) / GB),
("cpu_percent", sum(cpu_percent)),
("cpu_processes", len(self.cluster) - len(gone)),
("cpu_open_files", sum(open_files)),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment