add status subcommand instead of running with set -x master
authormirabilos <t.glaser@tarent.de>
Sat, 26 Oct 2019 15:25:35 +0000 (17:25 +0200)
committermirabilos <mirabilos@evolvis.org>
Sat, 26 Oct 2019 15:25:35 +0000 (17:25 +0200)
(todo: tool for enabling/disabling individual CPUs)

mksh/sysadmin/schnell

index d3a2f2b..94c7766 100644 (file)
@@ -3,9 +3,6 @@
 # run as root
 (( USER_ID )) && exec sudo "$0" "$@"
 
-# run verbosely
-set -x
-
 # decide what to do
 case x$1 {
 (x|xauto)
@@ -17,9 +14,12 @@ case x$1 {
 (x0|xoff)
        for a in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo powersave >$a; done
        ;;
+(xstatus)
+       ;;
 (*)
        echo call with on/off/auto
        exit 1
        ;;
 }
+grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
 exit 0