An open API service indexing awesome lists of open source software.

https://github.com/simonrw/sgeparse

Simple python module for parsing the output of SGE qstat
https://github.com/simonrw/sgeparse

Last synced: 10 months ago
JSON representation

Simple python module for parsing the output of SGE qstat

Awesome Lists containing this project

README

          

========
sgeparse
========

.. image:: https://travis-ci.org/mindriot101/sgeparse.svg
:target: https://travis-ci.org/mindriot101/sgeparse
.. image:: https://badge.fury.io/py/sgeparse.svg
:target: http://badge.fury.io/py/sgeparse

Simple python module for parsing the output of SGE qstat. There is only one top level function: ``get_jobs`` which returns a list of dictionaries of currently queued (running or waiting) jobs.

------------
Requirements
------------

The only requirements are Python version 2.7+ or 3.3+. All code uses the standard library. The binary ``qstat`` must be available and in your ``$PATH``.

-------
Example
-------

::

>>> from sgeparse import get_jobs
>>> jobs = get_jobs()
>>> # => {"name": "jobname", "owner": "me", ... }

The user argument can be used to specify which user to query:

::

>>> from sgeparse import get_jobs
>>> jobs = get_jobs(user='nobody')
>>> # => {"name": "jobname", "owner": "nobody", ... }

--------------
Available keys
--------------

- ``job_number``
- ``priority``
- ``name``
- ``owner``
- ``state``
- ``start_time``
- ``queue``
- ``host``
- ``slots``