3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 12:12:53 +01:00

Remove CPUlimit wrapper scripts

This commit is contained in:
James Lu 2016-06-20 17:11:27 -07:00
parent 58e3c6626c
commit 1caf42e8c3
2 changed files with 0 additions and 24 deletions

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
# Script to kill PyLink quickly when running under CPUlimit, since
# it will daemonize after threads are spawned and Ctrl-C won't work.
kill $(cat pylink.pid)
echo 'Killed. Press Ctrl-C in the PyLink window to exit.'

View File

@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Shell script to start PyLink under CPUlimit, throttling it if it starts abusing the CPU.
# Set this to whatever you want. cpulimit --help
LIMIT=35
# Change to the PyLink root directory.
WRAPPER_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
cd "$WRAPPER_DIR"
if [[ ! -z "$(which cpulimit)" ]]; then
# -z makes cpulimit exit when PyLink dies.
cpulimit -l $LIMIT -z ./pylink $*
echo "PyLink has been started (daemonized) under cpulimit, and will automatically be throttled if it goes over the CPU limit of ${LIMIT}%."
echo "To kill the process manually, run ./kill.sh"
else
echo 'cpulimit not found in $PATH! Aborting.'
fi