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.
-
pipShould 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
pippackage 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
.zippackage.
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
jobinfois 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
jobinfowas 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
Scriptsfolder. - 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
FILENAMEjob information file in CSV format.
Options
-u USER,--user USERthe username.-a,--allocshow allocation code(s).-r,--recentshow most recent job ID.-c,--cpushow total CPU usage in core-hours.-m,--memshow total memory usage in GB.-s,--simplesimple output formatting (no table).-v,--versionprints version information and exits.-h,--helpshows 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
- Extract the total CPU and memory usage for user
user2.
jobinfo test.csv -u user2 -cm
- 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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jobinfo-1.0.11.tar.gz.
File metadata
- Download URL: jobinfo-1.0.11.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5efe26970d24b7d04d8ac3567020b8a3511f2ae5d54ded4644b8c9c41f90741
|
|
| MD5 |
ee1c0e4c041c372e31bdbec6ed98cae1
|
|
| BLAKE2b-256 |
9ac16ec5630fe35ede55617b990d78de70f448dbfe45e742405b0e9efcd21435
|
File details
Details for the file jobinfo-1.0.11-py3-none-any.whl.
File metadata
- Download URL: jobinfo-1.0.11-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5f39289123f5b19fe9e69ac1e324c87e819303d5d9409ee9676840c451f43fd
|
|
| MD5 |
19bd2a81d1244ca9bd90de880a760876
|
|
| BLAKE2b-256 |
71bc68d3d838907c3bcac97657d8d4c421abd7cdc79b2da83b03adc1b22ac941
|