bundlewrap/bundles/hardware/files/cpu_frequency
2021-11-10 03:26:33 +01:00

8 lines
237 B
Bash

#!/bin/bash
date=$(date --utc +%s%N)
for cpu in $(cat /sys/devices/system/cpu/cpu0/cpufreq/affected_cpus)
do
echo "cpu_frequency,cpu=$cpu mhz=$(expr $(cat /sys/devices/system/cpu/cpu$cpu/cpufreq/scaling_cur_freq) / 1000) $date"
done