diff options
author | Jason Gross <jgross@mit.edu> | 2017-09-15 16:27:58 -0400 |
---|---|---|
committer | Jason Gross <jasongross9@gmail.com> | 2017-09-27 09:06:50 -0400 |
commit | 3eb500b11a3faf768cf96fd6034141eff6ffa83c (patch) | |
tree | d3438d79e0e35a4b39a7829f8adcaf3514775e82 /etc/hyperthreading.sh | |
parent | d9cdac885b57f168581c4cbb566aadb45eda7d34 (diff) |
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.
Diffstat (limited to 'etc/hyperthreading.sh')
-rwxr-xr-x | etc/hyperthreading.sh | 10 |
1 files changed, 9 insertions, 1 deletions
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 <on|off>" ; 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 <on|off>" + *) usage esac |