Skip to main content

Xsinfo

Collect info about the current nodes and cores usage so that it can help one choose which and how much resource can be allocated for a job on SLURM.

Install

git clone https://github.com/FranckLejzerowicz/Xsinfo.git
cd Xsinfo
pip install -e .

*Note that python should be python3

Outputs

Two outputs:

Table

In a file located in ~/.xsinfo/YYYY-MM-DD.tsv containing the table returned by the following Slurm's sinfo command and expanded with cpu_load, memory_load (both in % of available CPUs and memory per node), as well as the number of allocated and idle CPUs per node:

sinfo --Node -h -O NodeList:10,Partition:10,StateLong:10,CPUsLoad:10,CPUsState:12,Sockets:4,Cores:4,Threads:4,Memory:12,FreeMem:12

Note: if Xsinfo is re-run the same day twice, it will not re-run this sinfo command. Instead, it will read the expanded ~/.xsinfo/YYYY-MM-DD.tsv file. If you need to re-run Xsinfo the same day if node usage changes that quick, please use the --refresh option (in ~/.xsinfo/ is only kept the latest table).

This table can be used by Xpbs - optionally - to allocate CPUs from idle nodes that have the right amount of memory available.

Stdout

Summaries are printed in stdout, including:

  • "nodes per % of cpu load": nodes are binned per quartile of cpu load.
  • "nodes per % of mem load": nodes are binned per quartile of memory load.

For the nodes binned in these two different ways are of shown:

  • Their total number of CPUs (cpus)
  • Their total available memory in GiB (mem(gb))
  • Their average and standard deviation of available memory (av and ±)
  • Their number (of nodes) (nodes)
  • Their names (of nodes) (names)

Usage

Just run:

Xsinfo [OPTIONS]
  • --torque: Use if your scheduler is Torque (and not Slurm), as the native qstats summary is a bit different and thus Xsinfo has to know that in order to properly parse out the node usage information [OPTION NOT YET WORKING!]
  • --refresh: Force rewriting of the expanded node info collected today.
  • --show: Will print the full cpu and memory info per nodes.

Options

Usage: Xsinfo [OPTIONS]

Options:
  --torque / --no-torque        Switch from Slurm to Torque  [default: no-
                                torque]
  --refresh, --no-refresh TEXT  Whether to update any sinfo snapshot file
                                written today in ~/.slurm.
  --version                     Show the version and exit.
  --help                        Show this message and exit.

Bug Reports

contact franck.lejzerowicz@gmail.com

Release files for Xsinfo 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Xsinfo 1.2
File Size Uploaded
Xsinfo-1.2.tar.gz 14.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Xsinfo 1.2
File Interpreter ABI Platform
Xsinfo-1.2-py3-none-any.whl Python 3 none any Details

Total release size: 28.3 kB

Release files / Xsinfo-1.2.tar.gz

Download URL Xsinfo-1.2.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0a169a223f136c44f5a00dfac86a14c8abbc34006e53b14acfa7220aef1a7389
BLAKE2b-256 checksum
How to use checksums
a54808d4ecd025271ed56a77379e0e2ae36c1aa85aa948e1168fd2e9a8983ae9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.63.1 importlib-metadata/4.10.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

Release files / Xsinfo-1.2-py3-none-any.whl

Download URL Xsinfo-1.2-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4579c9168e76fce12e63d6b81b7720f3c4539a279b4fe18dcf771c2f6104b45
BLAKE2b-256 checksum
How to use checksums
ab72f5ff3ff893b250d1dc61908c7401e909f6fb5a58befb1c2fd829d32eb6c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.63.1 importlib-metadata/4.10.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

Release history Release notifications | RSS feed

This release

1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page