install sensors with:
1 |
apt-get install lm-sensors |
for the average core temp use this:
1 |
sensors | grep "Core " | sed 's/+|°C//g;' | awk 'BEGIN{s=0;i=1;} {for (; i <= FNR; i++) s = s+$3 }; END { i--;print s/i }' |
and max core temp:
1 |
sensors | grep "Core " | sed 's/+|.0°C//g;' | awk 'BEGIN{s=0;} {for (i = 1; i <= FNR; i++) if($3 > s){s = $3}; } END { print s } |
Important is in sed to escape the ‘|’ in regex like ‘|’
Hello, I enjoy reading all of your article post. I wanted to
write a little comment to support you.
It’s remarkable designed for me to have a website, which is beneficial in favor of my
knowledge. thanks admin