# Add CPU Temp sensors on Proxmox gui

<span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap"><span class="yt-core-attributed-string--link-inherit-color" style="font-weight: bold; color: rgb(255, 255, 255);">Please back up files before editing!!</span><span class="yt-core-attributed-string--link-inherit-color" style="color: rgb(255, 255, 255);"> </span></span>

<span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap"><span class="yt-core-attributed-string--link-inherit-color" style="color: rgb(255, 255, 255);">apt-get install lm-sensors </span></span>

<span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap"><span class="yt-core-attributed-string--link-inherit-color" style="color: rgb(255, 255, 255);">vim /usr/share/perl5/PVE/API2/Nodes.pm </span></span>

<span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap"><span class="yt-core-attributed-string--link-inherit-color" style="color: rgb(255, 255, 255);">search for: version\_text </span></span>

<span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap"><span class="yt-core-attributed-string--link-inherit-color" style="color: rgb(255, 255, 255);">vim /usr/share/pve-manager/js/pvemanagerlib.js </span></span>

<span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap"><span class="yt-core-attributed-string--link-inherit-color" style="color: rgb(255, 255, 255);">search for: PVE Manager Version Add code systemctl restart pveproxy (versions 8 search for pveversion  
</span></span>

<span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap"><span class="yt-core-attributed-string--link-inherit-color" style="color: rgb(255, 255, 255);">modify file and add</span></span>

```shell
    {
            itemId: 'thermal',
            colspan: 2,
            printBar: false,
            title: gettext('CPU Thermal State'),
            textField: 'thermalstate',
            renderer:function(value){
                let objValue = JSON.parse(value);
                let cores = objValue["coretemp-isa-0000"]
                let items = Object.keys(cores).filter(item => /Core/.test(item));
                let str = '';
                items.forEach((x, idx) => {
                        str += cores[x][`temp${idx+2}_input`] + ' ';
                });
                str += '°C';
                return str;
            }
    }
```

![image.png](https://wiki.tinod.net/uploads/images/gallery/2024-05/scaled-1680-/HUv4TljdmUOZSJt8-image.png)

Restart pveproxy (sometimes you need to clear cache to make it work)

systemctl restart pveproxy

![image.png](https://wiki.tinod.net/uploads/images/gallery/2024-05/scaled-1680-/bZJSmDxkLC4g3sOP-image.png)