Metadata-Version: 2.1
Name: crc-shinigami
Version: 0.3.2
Summary: A stand alone Python application for killing errant processes on Slurm based compute nodes.
Home-page: https://github.com/pitt-crc/shinigami
Keywords: process,terminate,slurm
Author: Pitt Center for Research Computing
Requires-Python: >=3.8
Classifier: Environment :: Console
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Typing :: Typed
Requires-Dist: asyncssh[bcrypt,fido2] (>=2.13.2,<3.0.0)
Requires-Dist: pandas (==1.5.3)
Requires-Dist: pydantic (>=2.0.3,<3.0.0)
Requires-Dist: pydantic-settings (>=2.0.2,<3.0.0)
Project-URL: Repository, https://github.com/pitt-crc/shinigami
Description-Content-Type: text/markdown

# Shinigami
[![](https://app.codacy.com/project/badge/Grade/d5325904cffc4936b24dd6be0d58a1ee)](https://app.codacy.com/gh/pitt-crc/shinigami/dashboard)
[![](https://app.codacy.com/project/badge/Coverage/d5325904cffc4936b24dd6be0d58a1ee)](https://app.codacy.com/gh/pitt-crc/shinigami/dashboard)

Shinigami is a stand alone Python application for killing errant processes on Slurm based compute nodes.
The application scans for and terminates any running processes not associated with a currently running Slurm job.
Processes associated with whitelisted users (root, administrators, service accounts, etc.) are ignored.

## Installation and Setup

The `shinigami` command line utility is installable via the pip (or pipx) package manager:

```bash
pipx install shinigami
```

To be of maximal use, it is recommended to run the utility every half hour.
However, you may find a different cadence more appropriate depending on your cluster size and use case.
Running the utility automatically is accomplished via a simple cron job:

```cron
0,30 * * * * shinigami
```

You may wish to configure the cron job to run under a dedicated service account.
When doing so, ensure the user is added to the admin list and satisfies the following criteria:

- Exists on all compute nodes
- Has appropriate permissions to terminate system processes on compute nodes
- Has established SSH keys for connecting to compute nodes

