relleums / qstat

parse Grid Engine qstat job info list into a list of python dicts
GNU General Public License v3.0
12 stars 3 forks source link

Any qstat specific version required? #1

Closed sert23 closed 6 years ago

sert23 commented 6 years ago

Hi there! Nice piece of software I could really use it. However it's not working on my server, I get this error: qstat returncode: 2 qstat std output: b"qstat: invalid option -- 'm'\nusage: \n qstat [-f [-1]] [-W site_specific] [-x] [ job_identifier... | destination... ]\n qstat [-a|-i|-r|-e] [-u user] [-n [-1]] [-s] [-G|-M] [-R] [job_id... | destination...]\n qstat -Q [-f [-1]] [-W site_specific] [ destination... ]\n qstat -q [-G|-M] [ destination... ]\n qstat -B [-f [-1]] [-W site_specific] [ server_name... ]\n" Traceback (most recent call last): File "/home/eap/sRNAtoolbox/qtest.py", line 3, in queue_info, job_info = qstat() File "/opt/venv/sRNAtoolbox2017/lib/python3.5/site-packages/qstat/_tools.py", line 20, in qstat xml = qstat2xml(qstat_path=qstat_path) File "/opt/venv/sRNAtoolbox2017/lib/python3.5/site-packages/qstat/_tools.py", line 37, in qstat2xml qstatxml = sp.check_output([qstat_path, xml_option], stderr=sp.STDOUT) File "/usr/lib/python3.5/subprocess.py", line 626, in check_output **kwargs).stdout File "/usr/lib/python3.5/subprocess.py", line 708, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['qstat', '-xml']' returned non-zero exit status 2

Maybe this has to do with qstat version. Which one were you using when you developped this? Thanks

relleums commented 6 years ago

Hi sert23,

this qstat wrapper was developed for 'Sun Grid Engine, GE 6.2u5p3'.

Please post your qstat version like this:

qstat -help
GE 6.2u5p3
usage: qstat [options]
        [-cb]                             view additional binding specific parameters
        [-ext]                            view additional attributes
        [-explain a|c|A|E]                show reason for c(onfiguration ambiguous), a(larm), suspend A(larm), E(rror) state
...

And here the top of my qstat's man page:

man qstat
QSTAT(1)                 Sun Grid Engine User Commands                QSTAT(1)

NAME
       qstat - show the status of Sun Grid Engine jobs and queues
...
sert23 commented 6 years ago

thanks for your reply, I ended up writing a small parser for my version (inspired in your code). This is the output from man.

qstat(1B) PBS qstat(1B)

NAME qstat - show status of pbs batch jobs