Name | nuse JSON |
Version |
0.1.7
JSON |
| download |
home_page | None |
Summary | A simple resource monitoring tool for SLURM jobs. |
upload_time | 2025-02-05 12:54:06 |
maintainer | None |
docs_url | None |
author | Jacob Molin Nielsen |
requires_python | None |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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.

## 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:
```bash
pip install nuse
```
## Usage
In your script include.
```python
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.
**NOTE**: You should include `start_monitoring()` in the script you submit to SLRUM. Don't put it in a [submitit](https://github.com/facebookincubator/submitit) script.
Job-Specific Log:
To display the resource usage log for a specific job on a node, run in your CLI:
```bash
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:
```bash
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_<hostname>.cluster_<SLURM_JOB_ID>.log.
Then, the nuse CLI tool uses these logs to provide an easy-to-read, real-time view of resource usage.
Happy monitoring!
## Planned improvements
* `nuse clear` to remove the monitoring directory. Until then just delete the ~/.monitoring folder.
Raw data
{
"_id": null,
"home_page": null,
"name": "nuse",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Jacob Molin Nielsen",
"author_email": "jacob.molin@me.com",
"download_url": "https://files.pythonhosted.org/packages/19/4a/dcebec9370ef16a1d2588461a702fba9f44259933d068b11eb6c74ee8a7f/nuse-0.1.7.tar.gz",
"platform": null,
"description": "# nuse\n\nnuse 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.\n\n\n\n## Features\n\n- **Job-Specific Monitoring:** Capture and view resource usage for each job (e.g., using cgroup filtering).\n- **Node-Wide Monitoring:** Automatically collect a separate log for overall node usage.\n- **Command-Line Interface:** Installed via pip, the `nuse` command lets you quickly view logs with a simple one-liner.\n- **Custom Log Directory:** Easily configure where logs are stored by setting the `MONITOR_LOG_DIR` environment variable.\n\n## Installation\n\nInstall nuse directly from PyPI:\n\n```bash\npip install nuse\n```\n\n## Usage\n\nIn your script include.\n\n```python\nfrom nuse import start_monitoring\n\nstart_monitoring(filter_cgroup=True)\n\n# your code\n```\n**INFO**: You can set filter_cgroup to `False` to watch the entire node and not just your own job.\n**NOTE**: You should include `start_monitoring()` in the script you submit to SLRUM. Don't put it in a [submitit](https://github.com/facebookincubator/submitit) script.\n\nJob-Specific Log:\nTo display the resource usage log for a specific job on a node, run in your CLI:\n\n```bash\nnuse node305 49847516\n```\n\nHere, node305 is the node's short name and 49847516 is the SLURM job ID.\n\n## Configuration\nLog Directory:\n* By default, nuse stores logs in the directory ~/.monitoring.\nTo change the log directory, set the environment variable before running your jobs:\n\n```bash\nexport MONITOR_LOG_DIR=\"/path/to/your/log_directory\"\n```\n\n## How it Works\n\nWhen included in your SLURM job pipeline (via start_monitoring(filter_cgroup=True) from the nuse package), nuse will:\n\n* Create a job-specific log file with a naming convention like cpu_memory_usage_<hostname>.cluster_<SLURM_JOB_ID>.log.\n\nThen, the nuse CLI tool uses these logs to provide an easy-to-read, real-time view of resource usage.\n\nHappy monitoring!\n\n## Planned improvements\n\n* `nuse clear` to remove the monitoring directory. Until then just delete the ~/.monitoring folder.\n",
"bugtrack_url": null,
"license": null,
"summary": "A simple resource monitoring tool for SLURM jobs.",
"version": "0.1.7",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "252f78ef92a150eca348d0ca69494a593a5d5c6faf23fb453efaea1460f0c1b5",
"md5": "7dc3bfc7ea75e8bceb0cb4faa6550cdf",
"sha256": "60051dd5b97d25979a345ba0d8482d76c7777cbb7f186c870138fdd9be6233cf"
},
"downloads": -1,
"filename": "nuse-0.1.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7dc3bfc7ea75e8bceb0cb4faa6550cdf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5697,
"upload_time": "2025-02-05T12:54:02",
"upload_time_iso_8601": "2025-02-05T12:54:02.353945Z",
"url": "https://files.pythonhosted.org/packages/25/2f/78ef92a150eca348d0ca69494a593a5d5c6faf23fb453efaea1460f0c1b5/nuse-0.1.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "194adcebec9370ef16a1d2588461a702fba9f44259933d068b11eb6c74ee8a7f",
"md5": "abfe37ec3c44e464cca6cf9d21a0aaea",
"sha256": "e493bfd465c5c51c50dc4afa1cadfac25181a474d5a80f74ed3a7e787bd85500"
},
"downloads": -1,
"filename": "nuse-0.1.7.tar.gz",
"has_sig": false,
"md5_digest": "abfe37ec3c44e464cca6cf9d21a0aaea",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 78055,
"upload_time": "2025-02-05T12:54:06",
"upload_time_iso_8601": "2025-02-05T12:54:06.591578Z",
"url": "https://files.pythonhosted.org/packages/19/4a/dcebec9370ef16a1d2588461a702fba9f44259933d068b11eb6c74ee8a7f/nuse-0.1.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-05 12:54:06",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "nuse"
}