# sysctl -n dev.cpu.0.temperature



## Niatross (Jan 5, 2013)

I am running FreeBSD 9.0-RELEASE in a virtual machine.

I run the following command and it returns a value of "-1":


```
sysctl -n dev.cpu.0.temperature
```

I don't even know if virtual hardware has virtual sensors to detect the temperature of a CPU inside a virtual machine. Can somebody enlighten me? Am I wasting my time thinking you can view the temperature of a virtual processor?

Why does the command (above) return a "-1" value? If it was working correctly, it should display a Celsius value.

Note:
I have the coretemp.ko kernel module loaded but when I load the coretemp.ko kernel module, I receive the following messages:


```
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
coretemp0: [color="Red"]Tj(target) value 0 does not seem right.[/color]
acpi_throttle1: <ACPI CPU Throttling> on cpu1
acpi_throttle1: [color="Red"]failed to attach P_CNT[/color]
device_attach: acpi_throttle1 attach returned 6
coretemp1: <CPU On-Die Thermal Sensoprs> on cpu1
coretemp1: [color="Red"]Tj(target) value 0 does not seem right.[/color]
```


----------



## wblock@ (Jan 5, 2013)

It's like a Zen koan: what is the temperature of a virtual CPU?


----------



## usdmatt (Jan 5, 2013)

I don't know for sure but it's extremely doubtful that virtualisation software would bother implementing support for passing sensor data from the host into guests. It's up to the host system to monitor its hardware.


----------

