Skip to main content

Python library for parsing PBS accounting logs

Project description

The pbsacct Python module is an inteface for processing accounting log data from the various PBS variants (TORQUE, PBS Pro, and OpenPBS), including the support sending that data to a database for persistance and analysis. DB persistance is currently supported for MySQL/MariaDB, with SQLite and PostgreSQL in various stages of development.

For example, here is a simple example of using the module to read a TORQUE accounting log file and print information about the jobs logged therein:

#!/use/bin/env python
import pbsacct
jobs = pbsacct.jobs_from_file("/var/spool/torque/server_priv/accounting/20180627")
for jobid in jobs.keys():
  job = jobs[jobid]
  print "%s: user=%s group=%s account=%s" % \
        (jobid,job.user(),job.group(),job.account())
# Here endeth the program

More complete examples (including DB connectivity) can be found at:

https://github.com/tabaer/pbstools/blob/master/sbin/job-db-update https://github.com/tabaer/pbstools/blob/master/sbin/jobscript-to-db https://github.com/tabaer/pbstools/blob/master/sbin/pbsacct-dump https://github.com/tabaer/pbstools/blob/master/sbin/sw_app-cache https://github.com/tabaer/pbstools/blob/master/sbin/sw_app-index

The pbsacct Python module is part of the pbstools collection of utilities:

https://github.com/tabaer/pbstools

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pbsacct-3.4.6-py2.py3-none-any.whl (14.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pbsacct-3.4.6-py2.py3-none-any.whl.

File metadata

  • Download URL: pbsacct-3.4.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/2.7.16

File hashes

Hashes for pbsacct-3.4.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3d74e4cd57fc82c40f226ecd2de116e8e8f3d6fb36ed27883c8d03c8a26959cd
MD5 bc67f7930891c7b66f5d10ba63acd287
BLAKE2b-256 490af890cfdf1f00ede12bfaf3f3eb9915221c35350d4ca3e70bfdd4589480c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page