From 3eb500b11a3faf768cf96fd6034141eff6ffa83c Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Fri, 15 Sep 2017 16:27:58 -0400 Subject: Update etc scripts to include governor It needs to be in performance, not powersave, to work well on my machine. While we're at it, also have the scripts print usage if you pass no arguments, rather than giving an error message about $1 being unset. --- etc/hyperthreading.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'etc/hyperthreading.sh') diff --git a/etc/hyperthreading.sh b/etc/hyperthreading.sh index 977942965..e003d8fb5 100755 --- a/etc/hyperthreading.sh +++ b/etc/hyperthreading.sh @@ -1,6 +1,14 @@ #!/bin/sh set -eu +usage() { + echo "USAGE: $0 " ; exit 111 +} + +if [ "$#" -eq 0 ]; then + usage +fi + case $1 in on) for f in "/sys/devices/system/cpu/cpu"[0-9]*/online; do @@ -20,5 +28,5 @@ case $1 in cores=$(printf "$cores\n$coreid") done ;; - *) echo "USAGE: hyperthreading.sh " + *) usage esac -- cgit v1.2.3