aboutsummaryrefslogtreecommitdiff
path: root/etc/machine.sh
diff options
context:
space:
mode:
Diffstat (limited to 'etc/machine.sh')
-rwxr-xr-xetc/machine.sh11
1 files changed, 11 insertions, 0 deletions
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'