WIPACrepo/pyglidein

Min Max Avg Idle time calculations missing for SLURM

Opened this issue · 0 comments

When running pyglidein on SLURM clusters without qstat the metrics function Stacktraces with:

Traceback (most recent call last):
  File "/home/heaths/.local/bin/pyglidein_client", line 11, in <module>
    load_entry_point('pyglidein==1.1.2', 'console_scripts', 'pyglidein_client')()
  File "/home/heaths/.local/lib/python2.7/site-packages/pyglidein/client.py", line 239, in main
    metrics_bundle.update_metrics(metrics.get_mma_idle_time())
  File "/home/heaths/.local/lib/python2.7/site-packages/pyglidein/client_metrics.py", line 117, in get_mma_idle_time
    output = check_output(cmd, shell=False, env=os.environ, stderr=STDOUT)
  File "/usr/lib64/python2.7/subprocess.py", line 568, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Add a SLURM function to the metrics class to handle output from squeue.