Commit aa5390a8 authored by Maxime Hubert's avatar Maxime Hubert
Browse files

Fix monitor not being run

parent 68077327
Pipeline #125110 passed with stage
in 33 seconds
......@@ -71,9 +71,8 @@ class Monitor():
self.monitor = Process(target=self.monitor_resources)
def increment_log_file(self, log_dict):
"""Increment the file pointed by the `log_file` attribute with a new dict
......@@ -98,15 +97,14 @@ class Monitor():
the process supposed to be monitored is already gone
# Try to retrieve the main_process
process = psutil.Process(self.main_process_pid)
logger.debug('MAIN PID: ', self.main_process_pid)
logger.debug('MONITOR PID: ', os.getpid())
# Load the NVIDIA handler
with NvmlHandler() as nvml_h:
while process.is_running() and process.status() != psutil.STATUS_ZOMBIE:
while process.is_running() and process.status() != psutil.STATUS_ZOMBIE and process.status() != psutil.STATUS_SLEEPING:
# Gather resources use from psutil
resources_use = utils.psutil_snapshot()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment