Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- ncupus=`sysctl -n hw.ncpu`
- while :; do
- echo -e "\ec\e[1mCPU Temperature\e[0m \e[3m[press ^C to exit]\e[0m"
- for cpus in `seq 0 $((${ncpus}-1))`; do
- printf "%s %3s %s%6s \t%s%5s\n"\
- "cpu" $cpus\
- "temp:" `sysctl -n dev.cpu.$cpus.temperature`\
- "freq:" `sysctl -n dev.cpu.$cpus.freq`
- done
- sleep 0.2
- echo -e '\r\e['$((${ncpus}+1))'A'
- done
Add Comment
Please, Sign In to add comment