Skip to content

Instantly share code, notes, and snippets.

@killbus
Created February 12, 2021 05:46
Show Gist options
  • Save killbus/64a8715b01babbcb7578a81d6a0a4c5d to your computer and use it in GitHub Desktop.
Save killbus/64a8715b01babbcb7578a81d6a0a4c5d to your computer and use it in GitHub Desktop.

create a cron for

#!/bin/bash

cpulimit --pid `ps aux|awk '{if($3 < 10) print $2}'` --limit=99
cpulimit --pid `ps aux|awk '{if($3 > 60) print $2}'` --limit=25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment