Skip to main content

A simple resource monitoring tool for SLURM jobs.

Project description

nuse

nuse is a simple resource monitoring tool for SLURM jobs. It allows users to view the CPU and memory usage logs for individual jobs and the entire node. With nuse, when running a SLURM-based workflow, you can easily monitor resource consumption through command-line tools.

nuse example

Features

  • Job-Specific Monitoring: Capture and view resource usage for each job (e.g., using cgroup filtering).
  • Node-Wide Monitoring: Automatically collect a separate log for overall node usage.
  • Command-Line Interface: Installed via pip, the nuse command lets you quickly view logs with a simple one-liner.
  • Custom Log Directory: Easily configure where logs are stored by setting the MONITOR_LOG_DIR environment variable.

Installation

Install nuse directly from PyPI:

pip install nuse

Usage

In your script include

from nuse import start_monitoring

start_monitoring(filter_cgroup=True)

# your code

INFO: You can set filter_cgroup to False to watch the entire node and not just your own job.

Job-Specific Log: To display the resource usage log for a specific job on a node, run in your CLI:

nuse node305 49847516

Here, node305 is the node's short name and 49847516 is the SLURM job ID.

Configuration

Log Directory:

  • By default, nuse stores logs in the directory ~/.monitoring. To change the log directory, set the environment variable before running your jobs:
export MONITOR_LOG_DIR="/path/to/your/log_directory"

How it Works

When included in your SLURM job pipeline (via start_monitoring(filter_cgroup=True) from the nuse package), nuse will:

  • Create a job-specific log file with a naming convention like cpu_memory_usage_.cluster_<SLURM_JOB_ID>.log.
  • Also create a node-wide log file named cpu_memory_usage__node.log for monitoring overall resources.

Then, the nuse CLI tool uses these logs to provide an easy-to-read, real-time view of resource usage.

Happy monitoring!

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

nuse-0.1.5.tar.gz (77.9 kB view details)

Uploaded Source

Built Distribution

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

nuse-0.1.5-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file nuse-0.1.5.tar.gz.

File metadata

  • Download URL: nuse-0.1.5.tar.gz
  • Upload date:
  • Size: 77.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for nuse-0.1.5.tar.gz
Algorithm Hash digest
SHA256 50ad34092d6bf383db503e2aa9b0ff0ebf5199ef8735b5b4d9d1f7c6d5371200
MD5 ba4bf81497064c42631bd8cf9fdcee51
BLAKE2b-256 a2cb31f0ba272f07c26defab158e8424266d882ac837d84b2c9f877cdc58a996

See more details on using hashes here.

File details

Details for the file nuse-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: nuse-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for nuse-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0f7f71f467293ec5e627e58976217b2e21931d062a9bf55d899eb289e2f4a5f3
MD5 bacbd2b00a0f41eac1227dbeb1b8e2af
BLAKE2b-256 427fecddf6094f30a0118481a74abe72bee007a933a659c49b3949dc35b4f9ef

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