I would like to listen to the CPU usage, by getting each core percentage usage: CPUcore1 and CPUcore2 in a loop.
while :
do
if [ $CPUcore1 -gt 95 ] && [ $CPUcore2 -gt 95 ]
then
//script..
fi
done
CPUcore1 and CPUcore2 should be equal to what present on htop
In this example:
CPUcore1=70.0
CPUcore2=44.4
I know that some calculation should be made in order to evaluate this.
