$ sysctl dev.cpu | grep temp
dev.cpu.0.temperature: 36,0C
dev.cpu.1.temperature: 37,0C
# CPU frequency control
device [url=http://www.FreeBSD.org/cgi/man.cgi?query=cpufreq&apropos=0&sektion=0&manpath=FreeBSD+8.0-RELEASE&format=html]cpufreq[/URL]
device [url=http://www.FreeBSD.org/cgi/man.cgi?query=amdtemp&apropos=0&sektion=0&manpath=FreeBSD+8.0-RELEASE&format=html]amdtemp[/URL] # for AMD CPU
#device [url=http://www.FreeBSD.org/cgi/man.cgi?query=coretemp&apropos=0&sektion=0&manpath=FreeBSD+8.0-RELEASE&format=html]coretemp[/URL] # for Intel CPU
coretemp_load="YES"
dev.cpu.0.temperature: 59.0C
dev.cpu.1.temperature: 57.0C
dev.cpu.2.temperature: 55.0C
dev.cpu.3.temperature: 56.0C
You're on FreeBSD, and the documentation is at your fingertips!sk8harddiefast said:There Is difference of grep and -n on sysctl? (except the output of "sysctl -n dev.cpu.0.temperature" shows the temp of the first core and "sysctl dev.cpu | grep" shows temp of all cores)
% sysctl -n dev.cpu
or better, call % sysctl -n dev.cpu.n.temperature
four times one for each core. Like this:#!/bin/sh
cores=0
until [ $cores -eq 4 ]
do
echo Core \#$cores: `sysctl -n dev.cpu.$cores.temperature`
cores=`expr $cores + 1`
done
#!/bin/sh
cores=0
until [ $cores -eq 4 ]
do
echo Core \#$cores: `sysctl -n dev.cpu.$cores.temperature`
cores=`expr $cores + 1`
done
sysctl -a | grep temp
net.inet6.ip6.use_tempaddr: 0
net.inet6.ip6.temppltime: 86400
net.inet6.ip6.tempvltime: 604800
net.inet6.ip6.prefer_tempaddr: 0
dev.cpu.0.temperature: 33.0C
dev.cpu.1.temperature: 32.0C
dev.cpu.2.temperature: 28.0C
dev.cpu.3.temperature: 32.0C
dev.coretemp.0.%desc: CPU On-Die Thermal Sensors
dev.coretemp.0.%driver: coretemp
dev.coretemp.0.%parent: cpu0
dev.coretemp.1.%desc: CPU On-Die Thermal Sensors
dev.coretemp.1.%driver: coretemp
dev.coretemp.1.%parent: cpu1
dev.coretemp.2.%desc: CPU On-Die Thermal Sensors
dev.coretemp.2.%driver: coretemp
dev.coretemp.2.%parent: cpu2
dev.coretemp.3.%desc: CPU On-Die Thermal Sensors
dev.coretemp.3.%driver: coretemp
dev.coretemp.3.%parent: cpu3
sysctl dev.cpu | grep temp
dev.cpu.0.temperature: 32.0C
dev.cpu.1.temperature: 31.0C
dev.cpu.2.temperature: 28.0C
dev.cpu.3.temperature: 31.0C
sysctl dev.cpu.0.temperature