Skip to main content

This tool extracts useful information about scheduled jobs.

Project description

What is jobinfo?

Researchers on a Linux-based computing system submit computing jobs to run and process their research data. Information on these jobs is collated in an output table as they run and provide a record of the resources used by the job. jobinfo extracts useful information from such tables, including,

  • Allocation code(s) corresponding to a user.
  • Most recently submitter job ID.
  • Total CPU usage in core-hours.
  • Total memory usage in GB.

Installation Instructions

Prerequisites

  • Ensure Python 3.6+ is installed.
python --version

or

python3 --version
  • If you don't have Python 3.6+ installed, go to the official webpage and follow the instructions to install the latest version.

  • pip Should come with Python, but ensure it's up to date.

python -m pip install --upgrade pip

Option A: pipx Installation (recommended)

  • Install the latest version of pipx.

  • Run the following command to install jobinfo.

pipx install jobinfo

Option B: Virtual Environment Installation (recommended)

  • Create and activate a virtual environment.
python -m venv testenv
source testenv/bin/activate  # Linux/Mac
testenv\Scripts\activate     # Windows
  • Run the following command to install jobinfo.
pip install jobinfo
  • After your work is done deactivate the virtual environment.
deactivate

Option C: Global Installation (not recommended)

  • Use pip package manager.
pip install --upgrade jobinfo
  • For a user-specific install (to avoid system-wide install),
pip install --user jobinfo

Option D: Build From Source

  • Download the source code either using the following command or as a .zip package.
git clone https://github.com/ahama92/jobinfo.git
cd jobinfo
  • You may choose to use a virtual environment (recommended) or install globally (not recommended) just like before.
pipx install -e .

or

pip install -e .

Installation Confirmation

  • Check if jobinfo is installed correctly.
jobinfo --version

Troubleshooting

If you use Windows, I highly recommend installing the Ubuntu terminal environment from Microsoft Store. This app provides a lot of what a Linux terminal has to offer. You can do all of your research work and computations from this terminal. If for some reason, you still want to use Windows and you face issues with running jobinfo, here are some possible remedies.

  • Check if jobinfo was installed.
pip show jobinfo
  • The output should show the installation location similar to c:\users\USER\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages.
  • Go to that path in your file explorer.
  • Then go one step up. In my example it would be the python39\ folder.
  • Then go to the Scripts folder.
  • Copy the path.
  • Then type the following command in a Windows PowerShell.
$env:Path += ";C:\Users\USER\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts"
  • Don't forget to change the path to that one you just copied, not my example!

Software Prerequisites

  • Python 3.6 or higher.

Usage Guide

Basic Usage

jobinfo FILENAME -u USER [-a] [-r] [-c] [-m] [-s] [-v] [-h]

Positional Arguments

  • FILENAME job information file in CSV format.

Options

  • -u USER, --user USER the username.
  • -a, --alloc show allocation code(s).
  • -r, --recent show most recent job ID.
  • -c, --cpu show total CPU usage in core-hours.
  • -m, --mem show total memory usage in GB.
  • -s, --simple simple output formatting (no table).
  • -v, --version prints version information and exits.
  • -h, --help shows the help message and exits.

Examples

Let's try out a few examples with a test.csv. This files contains the following information.

Username Allocation JobID CPUs JobDuration Memory
user1 alloc-1 111111 16 1800 180
user2 alloc-2 222222 8 600 36
user2 alloc-3 333333 32 480 600
  • Extract the allocation code(s) for user user1.
jobinfo test.csv -u user1 -a

test-1

  • Extract the total CPU and memory usage for user user2.
jobinfo test.csv -u user2 -cm

test-1

  • Extract allocation code(s), most recent job ID, as well as total CPU and memory usage for user user2. Print the output in simple formatting with no table.
jobinfo test.csv -u user2 -arcms

test-1

Notes

Make sure the input file is in CSV format with exactly the following header,

Username,Allocation,JobID,CPUs,JobDuration,Memory

Project details


Download files

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

Source Distribution

jobinfo-1.0.10.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

jobinfo-1.0.10-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file jobinfo-1.0.10.tar.gz.

File metadata

  • Download URL: jobinfo-1.0.10.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for jobinfo-1.0.10.tar.gz
Algorithm Hash digest
SHA256 b7944b293c99a2e56ce9b0a787132e511fc4b15aba0875bce6430e931b639778
MD5 c77b0b6ee2fce5eed5bcd2959f4fd19f
BLAKE2b-256 6ae8a49f3d348e85366f5198285ac6c1c24ba60a2bde0b6e5c412bc3cbde0fe3

See more details on using hashes here.

File details

Details for the file jobinfo-1.0.10-py3-none-any.whl.

File metadata

  • Download URL: jobinfo-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for jobinfo-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 39afa10881e516323995843e66302deee12084b86a1118c4eea3d7a406411fcb
MD5 86c832d63b79bb3d06c0161859bdf522
BLAKE2b-256 354252a104ccc9c3108aad52daf278960be9b47f25e3f3880cafc663fde448f9

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