A tool to retrieve and display Slurm usage data
Project description
slurm-scredits
scredits
is a Slurm utility for checking account balance. The utility calculates the remaining service units or SU left in the account.
The utility shows SU as an aggregate of cpu+gpu+mem usage.
Prerequisites
- Slurm with Accounting enabled.
- Make sure you have TRES resources enabled and GrpTRESMins billing set.
- Optionally gres/gpu enabled and configured.
Usage
usage: scredits [-h] [-v] [-V] [-d]
Retrieve and display Slurm usage data.
options:
-h, --help show this help message and exit
-v, --verbose Print debug messages
-V, --version Print program version
-d, --detailed Show detailed account and user association
Installation
pip install scredits
Setting up Slurm
scredits
currently support the following setup.
- Balance is limited per account
- Account limit is set through
GrpTRESMins
usingbilling
parameter.
Following is an example setup
Creating account test_account
with billing balance of 1000
sacctmgr add account test_account set GrpTRESMins=billing=1000
Add test_user
user to account test_account
sacctmgr add user test_user set Account=test_account
Checking balance for all users
[test@localhost ~]$ scredits
Account | Allocation(SU) | Remaining(SU) | Used(SU) | Used(%) |
-----------------------------------------------------------------------------
test_account | 1000.0 | 1000.0 | 0 | 0.0
If you want more details use the -d
flag.
[test@localhost ~]$ scredits -d
Account | User | Consumed (SU) | % SU Usage | Used Resources
------------------------------------------------------------------------------------------
root | | | |
| root | 0 | 0.00% | cpu=0, mem=0, gpu=0
-------------------- | --------------- | --------------- | --------------- | ------------------------------
test_account | | | |
| test_user | 0 | 0.0% | cpu=0, mem=0, gpu=0
Build yourself
Clone the repo
git clone https://github.com/giuliolibrando/slurm-scredits.git
enter into the folder
cd slurm-scredits
install via pip
pip install .
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file scredits-1.1.1.tar.gz
.
File metadata
- Download URL: scredits-1.1.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b4ee80649a5d44a93419289e01231ac2a80eebbf3a0b439f1cd77f8447bc0dd |
|
MD5 | 7bdd5aa3587ab3c14b8e73007a776ae3 |
|
BLAKE2b-256 | 262aab7c8354ea2705eea7ca36fcffedc03735c69f3909e9a493533e85b82446 |
File details
Details for the file scredits-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: scredits-1.1.1-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | feec77c66567686b83a96e1acf7668d28d99a2bfc3034adaa4ba110346547ecf |
|
MD5 | 8fce86a24f931b70838ec6353d4f01bc |
|
BLAKE2b-256 | eacf32e4dfee2882d0302eed8f9e9eb04321552094c8abd1affa65639c593b64 |