Kill hogs
We at team HPC of the university of Groningen run job schedueling clusters. Some users are running their programs on the login node of these clusters instead of submitting jobs. This leads to a high load on the login node, which leads to unhappy users who are unable to submit jobs. "kill hogs" is a crude attempt at mittigating these problems. It is a cronjob that checks the resources (cpu and ram) that are used by each user. If they reach a certain treshold, all the user's processes above a minimum treshold are killed. The user is informed of this via a message in the terminal. A message is also send to slack to inform us.
this program might kill processes you don't want killed and lock you out
Installation.
We install the cronjob via ansible on a centos7 host instead of installing the requirements with pip, we opt for the following yum packages.
- python36-requests
- python36-psutil
The cronjob looks like this:
*/2 * * * * root /usr/bin/python36 /opt/kill_hoggs/kill_hoggs.py --slack
Run tests
python -m unittest unittests.test_kill_hogs
# Or if you want coverage information.
coverage run -m unittest unittests.test_kill_hogs
coverage report -m kill_hogs.py
Release files for kill-hogs 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kill hogs-0.1.tar.gz | 7.2 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kill_hogs-0.1-py3.7.egg | Legacy Egg format | - | - | Details |
| kill_hogs-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.8 kB
Release files / kill hogs-0.1.tar.gz
| Download URL | kill hogs-0.1.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e0a54cb7b0d82757381073bdbc7087db224623bea5b9ea8c64914ef7b50c1c46
|
|
BLAKE2b-256 checksum How to use checksums |
4189029d564c16454ef63df943540ba0479c4a7ca2999c440ead41e544c50871
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4+
|
Release files / kill_hogs-0.1-py3.7.egg
| Download URL | kill_hogs-0.1-py3.7.egg |
|---|---|
| Size | 17.1 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
0877f98fcd2bb25df2b40130dcc8694fa43c9391eda53885f9bf31d00a384d71
|
|
BLAKE2b-256 checksum How to use checksums |
ccd8f4514a77d000499414b361d7e712ecbea6f6069525939878e1d6ccb41a33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4+
|
Release files / kill_hogs-0.1-py3-none-any.whl
| Download URL | kill_hogs-0.1-py3-none-any.whl |
|---|---|
| Size | 21.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18e130a2fc2a8b01c75b1110bafb86512cf5d6990783e6ce118eab6790265b1c
|
|
BLAKE2b-256 checksum How to use checksums |
9540791fd8c92429c69583adfeaef08140e219ea1ee693cbb57a546a223a792f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4+
|