feat: add user script tracking
This commit is contained in:
9
scripts/power-monitor
Executable file
9
scripts/power-monitor
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
RAPL0="/sys/class/powercap/intel-rapl:0/energy_uj"
|
||||
RAPL1="/sys/class/powercap/intel-rapl:1/energy_uj"
|
||||
while true; do
|
||||
e1=$(( $(cat "$RAPL0") + $(cat "$RAPL1") ))
|
||||
sleep 2
|
||||
e2=$(( $(cat "$RAPL0") + $(cat "$RAPL1") ))
|
||||
echo "scale=1; ($e2 - $e1) / 2000000" | bc > /tmp/power_now
|
||||
done
|
||||
Reference in New Issue
Block a user