From e81c0ebfb445274c0bce80f4d5c3501a5927aae8 Mon Sep 17 00:00:00 2001 From: Andre Ramnitz Date: Fri, 31 May 2024 23:13:19 +0200 Subject: [PATCH] cheap amd-prefcore script: rice-up --- local/bin/prefcore-v2 | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/local/bin/prefcore-v2 b/local/bin/prefcore-v2 index 62faef46..a0fcd417 100755 --- a/local/bin/prefcore-v2 +++ b/local/bin/prefcore-v2 @@ -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 -- 2.51.2