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
- Host: GitHub
- URL: https://github.com/simonrw/sgeparse
- Owner: simonrw
- License: mit
- Created: 2015-05-15T14:16:45.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-05-20T09:02:40.000Z (about 11 years ago)
- Last Synced: 2025-03-31T04:14:55.058Z (over 1 year ago)
- Language: Python
- Homepage: https://pypi.python.org/pypi/sgeparse
- Size: 152 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
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``