Post

Proxmox VE 8.1 - Display CPU Temp Summary in Real Time

This is from this article on Reddit:

Displaying CPU Temperature in Proxmox Summery in Real Time

Install lm-sensors

Type the following in the proxmox shell:

1
apt-get install lm-sensors

Next we can check if its working. To do this we can type sensors

The main part we are interested in is:

1
2
3
4
5
6
7
8
9
root@pve:~# sensors

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +23.0°C  (high = +84.0°C, crit = +100.0°C)
Core 0:        +21.0°C  (high = +84.0°C, crit = +100.0°C)
Core 1:        +21.0°C  (high = +84.0°C, crit = +100.0°C)
Core 2:        +22.0°C  (high = +84.0°C, crit = +100.0°C)
Core 3:        +19.0°C  (high = +84.0°C, crit = +100.0°C)

If you see this you are good to go!

Add the Output of lm-sensors

Here we will use Nano to edit some files. In your shell, type the following:

1
nano /usr/share/perl5/PVE/API2/Nodes.pm

Next, you will need to find $dinfo within this file.

The code should look like this:

1
2
3
4
$res->{pveversion} = PVE::pvecfg::package() . "/" .
   PVE::pvecfg::version_text();
 
my $dinfo = df('/', 1);     # output is bytes

Add the following code:

1
$res->{thermalstate} = \sensors\;

So the final result should look like this:

1
2
3
4
$res->{pveversion} = PVE::pvecfg::package() . "/" .
    PVE::pvecfg::version_text();

$res->{thermalstate} = `sensors`;

Log out and then back in to Proxmox to see the changes.

This post is licensed under CC BY 4.0 by the author.