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


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/ --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

Project details

Release history Release notifications | RSS feed

This version


Download files

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

Files for kill-hogs, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size kill_hogs-0.1-py3.7.egg (17.1 kB) File type Egg Python version 3.7 Upload date Hashes View
Filename, size kill_hogs-0.1-py3-none-any.whl (21.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size kill hogs-0.1.tar.gz (7.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page