From 1caf42e8c378d55a7ad778b03f1ba751911e8256 Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 20 Jun 2016 17:11:27 -0700 Subject: [PATCH] Remove CPUlimit wrapper scripts --- kill.sh | 6 ------ start-cpulimit.sh | 18 ------------------ 2 files changed, 24 deletions(-) delete mode 100755 kill.sh delete mode 100755 start-cpulimit.sh diff --git a/kill.sh b/kill.sh deleted file mode 100755 index ad46b13..0000000 --- a/kill.sh +++ /dev/null @@ -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.' diff --git a/start-cpulimit.sh b/start-cpulimit.sh deleted file mode 100755 index 5c0914d..0000000 --- a/start-cpulimit.sh +++ /dev/null @@ -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