]> Freerunner's - dotfiles.git/commitdiff
cheap amd-prefcore script: rice-up
authorAndre Ramnitz <tux.rising@gmail.com>
Fri, 31 May 2024 21:13:19 +0000 (23:13 +0200)
committerAndre Ramnitz <tux.rising@gmail.com>
Sun, 18 Aug 2024 16:18:53 +0000 (18:18 +0200)
local/bin/prefcore-v2

index 62faef466e5122841f762b40ef4b0c32d05db6c0..a0fcd417701add9d32e89ceb268cb9e4406c403a 100755 (executable)
@@ -1,7 +1,26 @@
-#!/bin/bash
+#!/bin/sh
 
-for i in $(ls -1 /sys/devices/system/cpu | grep -E cpu\[0-9\]);
-    do printf $i\ && cat /sys/devices/system/cpu/$i/acpi_cppc/highest_perf; done |\
-    sort -k2 -r | head -n12
+echo "Best high-performing CCX1 cores:"
+i=0
+while [ $i -ne 8 ]
+    do
+    printf "cpu$i %s\n" $(cat /sys/devices/system/cpu/cpu$i/acpi_cppc/highest_perf);
+    i=$(("$i"+1));
+    done
 
+echo "Best high-performing CCX2 cores:"
+i=8
+while [ $i -ne 16 ]
+    do
+    printf "cpu$i %s\n" $(cat /sys/devices/system/cpu/cpu$i/acpi_cppc/highest_perf);
+    i=$(("$i"+1));
+    done
+
+# echo "Best low-performing cores:"
+# i=0
+# while [ $i -ne 15 ]
+#     do
+#     printf "cpu$i %s\n" $(cat /sys/devices/system/cpu/cpu$i/acpi_cppc/lowest_perf);
+#     i=$(("$i"+1));
+#     done