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/machine.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'etc/machine.sh') diff --git a/etc/machine.sh b/etc/machine.sh index 5fcb7289a..69edb149a 100755 --- a/etc/machine.sh +++ b/etc/machine.sh @@ -1,6 +1,15 @@ #!/bin/sh set -eu +online_governors() { + for cpu in "/sys/devices/system/cpu/cpu"[0-9]* ; do + if grep -vq '^1$' "$cpu/online" 2>/dev/null; then + continue + fi + cat "$cpu/cpufreq/scaling_governor" + done +} + printf "$(hostname)" printf - grep -q '[^0-9]' /sys/devices/system/cpu/cpu[0-9]*/topology/thread_siblings_list && printf ht || printf noht @@ -17,5 +26,7 @@ else printf nops fi printf - +printf "$(echo -n "$(online_governors | uniq)" | tr '\n' '_')" +printf - printf "$(gcc -march=native -Q --help=target|grep march | cut -d= -f2 | grep -ow '\S*')" printf '\n' -- cgit v1.2.3