Skip to main content

A script that kills processes of users generating excessive load.It is meant with HPC login nodes in mind.

Project description

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

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kill hogs-0.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distributions

kill_hogs-0.1-py3.7.egg (17.1 kB view details)

Uploaded Egg

kill_hogs-0.1-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file kill hogs-0.1.tar.gz.

File metadata

  • Download URL: kill hogs-0.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using 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+

File hashes

Hashes for kill hogs-0.1.tar.gz
Algorithm Hash digest
SHA256 e0a54cb7b0d82757381073bdbc7087db224623bea5b9ea8c64914ef7b50c1c46
MD5 22b5637fbf12675f2f24f1862f0ab00e
BLAKE2b-256 4189029d564c16454ef63df943540ba0479c4a7ca2999c440ead41e544c50871

See more details on using hashes here.

File details

Details for the file kill_hogs-0.1-py3.7.egg.

File metadata

  • Download URL: kill_hogs-0.1-py3.7.egg
  • Upload date:
  • Size: 17.1 kB
  • Tags: Egg
  • Uploaded using 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+

File hashes

Hashes for kill_hogs-0.1-py3.7.egg
Algorithm Hash digest
SHA256 0877f98fcd2bb25df2b40130dcc8694fa43c9391eda53885f9bf31d00a384d71
MD5 474876ebb59deed48cb26bb456916f6a
BLAKE2b-256 ccd8f4514a77d000499414b361d7e712ecbea6f6069525939878e1d6ccb41a33

See more details on using hashes here.

File details

Details for the file kill_hogs-0.1-py3-none-any.whl.

File metadata

  • Download URL: kill_hogs-0.1-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using 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+

File hashes

Hashes for kill_hogs-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18e130a2fc2a8b01c75b1110bafb86512cf5d6990783e6ce118eab6790265b1c
MD5 15b11f9344ff7dbaccb7898e4dc997ba
BLAKE2b-256 9540791fd8c92429c69583adfeaef08140e219ea1ee693cbb57a546a223a792f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page