Debian Codegraph @

etc/machine.sh

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 set -eu
3
4 online_governorsscip-shell shell shell-project 0.0.0 online_governors().() {
5 FOUND=""
6 for cpu in "/sys/devices/system/cpu/cpu"[0-9]* ; do
7 if grepscip-shell system . . grep. -vq '^1$' "$cpu/online" 2>/dev/nullscip-shell filesystem . . `/dev/null`.; then
8 continue
9 fi
10 if [scip-shell system . . `[`. ! -e "$cpu/cpufreq" ]; then
11 continue
12 fi
13 catscip-shell system . . cat. "$cpu/cpufreq/scaling_governor"
14 FOUND=1
15 done
16 if [scip-shell system . . `[`. -z "$FOUND" ]; then
17 echoscip-shell system . . echo. "nocpufreq_support"
18 fi
19 }
20
21 # hostname is not on arch
22 if command -v hostname >/dev/nullscip-shell filesystem . . `/dev/null`. 2>/dev/nullscip-shell filesystem . . `/dev/null`.; then
23 printfscip-shell system . . printf. "$(hostnamescip-shell system . . hostname.)"
24 elif command -v hostnamectl >/dev/nullscip-shell filesystem . . `/dev/null`. 2>/dev/nullscip-shell filesystem . . `/dev/null`.; then
25 printfscip-shell system . . printf. "$(hostnamectl --static)"
26 else
27 printfscip-shell system . . printf. "unknown_host"
28 fi
29 printfscip-shell system . . printf. -
30 if lsscip-shell system . . ls. /sys/devices/system/cpu/cpu[0-9]*/topology/thread_siblings_list >/dev/nullscip-shell filesystem . . `/dev/null`. 2>/dev/nullscip-shell filesystem . . `/dev/null`.; then
31 grepscip-shell system . . grep. -q '[^0-9]' /sys/devices/system/cpu/cpu[0-9]*/topology/thread_siblings_list && printfscip-shell system . . printf. ht || printfscip-shell system . . printf. noht
32 else
33 printfscip-shell system . . printf. unknown_ht
34 fi
35 printfscip-shell system . . printf. -
36 if [scip-shell system . . `[`. -f /sys/devices/system/cpu/intel_pstate/no_turboscip-shell filesystem . . `/sys/devices/system/cpu/intel_pstate/no_turbo`. ]; then
37 grepscip-shell system . . grep. -q 1 /sys/devices/system/cpu/intel_pstate/no_turboscip-shell filesystem . . `/sys/devices/system/cpu/intel_pstate/no_turbo`. && printfscip-shell system . . printf. notb || printfscip-shell system . . printf. tb
38 else
39 printfscip-shell system . . printf. notb_support
40 fi
41 printfscip-shell system . . printf. -
42 if [scip-shell system . . `[`. -f /sys/class/power_supply/AC/onlinescip-shell filesystem . . `/sys/class/power_supply/AC/online`. ]; then
43 grepscip-shell system . . grep. -q 1 /sys/class/power_supply/AC/onlinescip-shell filesystem . . `/sys/class/power_supply/AC/online`. && printfscip-shell system . . printf. ac || printfscip-shell system . . printf. noac
44 else
45 printfscip-shell system . . printf. nops
46 fi
47 printfscip-shell system . . printf. -
48 printfscip-shell system . . printf. "$(printfscip-shell system . . printf. "%s" "$(online_governorsscip-shell shell shell-project 0.0.0 online_governors(). | uniqscip-shell system . . uniq.)" | trscip-shell system . . tr. '\n' '_')"
49 printfscip-shell system . . printf. -
50 printfscip-shell system . . printf. "$(gccscip-shell system . . gcc. -march=native -Q --help=target | grepscip-shell system . . grep. -v 'Known valid arguments' | grepscip-shell system . . grep. march | cutscip-shell system . . cut. -d= -f2 | grepscip-shell system . . grep. -ow '\S*')"
51 printfscip-shell system . . printf. '\n'