improve docstring
This commit is contained in:
+12
-9
@@ -1,21 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
slurm-eff-tool.py - Slurm job efficiency reporting and investigation tool.
|
||||
slurm-eff-tool.py - Slurm job efficiency analysis and reporting and tool.
|
||||
|
||||
Also targeted at automation and backfeeding use cases.
|
||||
|
||||
Efficiency definitions:
|
||||
CPU_Eff = TotalCPU_seconds / CPUTimeRAW * 100
|
||||
Time_Eff = ElapsedRaw_seconds / (TimelimitRaw_minutes * 60) * 100
|
||||
CPU_Eff = CPU_time / walltime * 100
|
||||
Time_Eff = walltime / timelimit * 100
|
||||
|
||||
Mem_Eff = 100 (slurm recorded mem usage) / (mem allocated by system)
|
||||
|
||||
This script intentionally asks sacct for raw parsable fields and caches those rows.
|
||||
TODO: allow to cache a faster already parsed and binary format. Keep sacct text option for
|
||||
debug option
|
||||
Waste definitions:
|
||||
|
||||
waste_CPU = walltime * (100 - CPU_Eff) * n_cpus [hours]
|
||||
waste_Mem = walltime * (100 - Mem_eff) * \
|
||||
(req_mem - (n_cpus * default_mem_per_cpu )) [GB*hours]
|
||||
waste_total = waste_CPU + waste_Mem/default_mem_per_cpu
|
||||
|
||||
2006 D. Feichtinger <derek.feichtinger@psi.ch>
|
||||
"""
|
||||
# initial version of script produced by vibe coding of an exact functionality
|
||||
# description using chatgpt-5.5
|
||||
# 2026 D. Feichtinger <derek.feichtinger@psi.ch>
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
Reference in New Issue
Block a user