qstat and long job names

后端 未结 9 1523
[愿得一人]
[愿得一人] 2021-01-31 08:23

How can I get qstat to give me full job names?

I know qstat -r gives detailed information about the task, but it\'s too much and the resource r

9条回答
  •  深忆病人
    2021-01-31 08:38

    For me the script of Physical Chemist didn't work so I wrote a very simple script using the xml.tree.ElementTree module which i regard as somewhat easier than xml.dom.minidom

    import os
    import xml.etree.ElementTree as ET
    f = os.popen('qstat -x')
    tree = ET.parse(f)
    root = tree.getroot()
    print "Job_Id   walltime state     nodes       Job_Name"
    print "------   -------- ----- --------------- --------------------------"
    for job in root:
        print job.find('Job_Id').text, " ",
        print job.find('resources_used').find('walltime').text, " ",
        print job.find('job_state').text, " ",
        print job.find('Resource_List').find('nodes').text, " ",
        print job.find('Job_Name').text
    

提交回复
热议问题