Files
Domoticz/perf.sh
2025-03-06 11:09:58 +01:00

8 lines
196 B
Bash
Executable File

#!/bin/bash
while :
do
ps aux --sort=-%cpu | grep -v "watch" |awk -v date="$(date +%Y-%m-%d-"%H:%M:%S")" 'NR>1{if($3>30.0) if($10>"0:10")print date,$10,$2,$3,$11}' >>/tmp/perf.txt
sleep 10
done