Skip to content

Commit

Permalink
Now aborting monitoring loop if CPU consumption time is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Nilsson committed Nov 22, 2024
1 parent e2935c1 commit 321d90f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pilot/util/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ def job_monitor_tasks(job: JobData, mt: MonitoringTime, args: object) -> tuple[i
logger.info(f'(instant) CPU consumption time for pid={job.pid}: {cpuconsumptiontime} (rounded to {job.cpuconsumptiontime})')
elif _cpuconsumptiontime == -1:
logger.warning('could not get CPU consumption time')
elif _cpuconsumptiontime == 0.0:
logger.warning(f'process {job.pid} can no longer be monitored (due to stat problems) - aborting')
return 0, ""
else:
logger.warning(f'process {job.pid} is no longer using CPU - aborting')
return 0, ""
Expand Down

0 comments on commit 321d90f

Please sign in to comment.