• news
  • pics
  • linux
  • windows
  • proxmox
  • game
  • news
  • pics
  • linux
  • windows
  • proxmox
  • game
Home
proxmox

PVE添加cpu温度显示

一、安装lm-sensors

apt-get install lm-sensors


安装成功后,可以通过命令查看cpu温度:

[email protected]:~# sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:        +27.8°C  (crit = +74.0°C)
temp2:        +29.8°C  (crit = +74.0°C)
 
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +38.0°C  (high = +68.0°C, crit = +73.0°C)
Core 0:        +36.0°C  (high = +68.0°C, crit = +73.0°C)
Core 1:        +35.0°C  (high = +68.0°C, crit = +73.0°C)
Core 2:        +34.0°C  (high = +68.0°C, crit = +73.0°C)
Core 3:        +38.0°C  (high = +68.0°C, crit = +73.0°C)

星际蜗牛的暴力风扇虽然吵,但是不得不佩服散热能力确实强。

二、编辑修改文件
1、/usr/share/perl5/PVE/API2/Nodes.pm

搜索my $dinfo = df(‘/’, 1);
以pve5.4.3为例,在296行:

    293         $res->{pveversion} = PVE::pvecfg::package() . "/" .
    294             PVE::pvecfg::version_text();
    295 
    296         my $dinfo = df('/', 1);     # output is bytes
    297 


添加:$res->{thermalstate} = `sensors`;
修改后:
 

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


2、/usr/share/pve-manager/js/pvemanagerlib.js

2.1、搜索PVE.panel.StatusView,修改height为320

  16876 Ext.define('PVE.node.StatusView', {
  16877     extend: 'PVE.panel.StatusView',
  16878     alias: 'widget.pveNodeStatus',
  16879 
  16880     height: 300,
  16881     bodyPadding: '20 15 20 15',
  16882 
  16883     layout: {
  16884         type: 'table',
  16885         columns: 2,
  16886         tableAttrs: {
  16887             style: {
  16888                 width: '100%'
  16889             }
  16890         }
  16891     },


2.2、搜索PVE Manager Version

  16990         {
  16991             itemId: 'version',
  16992             colspan: 2,
  16993             printBar: false,
  16994             title: gettext('PVE Manager Version'),
  16995             textField: 'pveversion',
  16996             value: ''
  16997         }


在后面添加一个item,修改后为
 

        {
            itemId: 'version',
            colspan: 2,
            printBar: false,
            title: gettext('PVE Manager Version'),
            textField: 'pveversion',
            value: ''
        },
        {
            itemId: 'thermal',
            colspan: 2,
            printBar: false,
            title: gettext('CPU温度'),
            textField: 'thermalstate',
            renderer:function(value){
                const c0 = value.match(/Core 0.*?\+([\d\.]+)Â/)[1];
                const c1 = value.match(/Core 1.*?\+([\d\.]+)Â/)[1];
                const c2 = value.match(/Core 2.*?\+([\d\.]+)Â/)[1];
                const c3 = value.match(/Core 8.*?\+([\d\.]+)Â/)[1];
                return `核0: ${c0} ℃ | 核1: ${c1} ℃ | 核2: ${c2} ℃ | 核3: ${c3} ℃`
            }
        }


三、重启pve web管理服务

systemctl restart pveproxy


至此,就已经成功添加了pve web管理端cpu温度显示。

Previous article 如何加速Linux下的编译速度(加速make)
Next article proxmox去除登录订阅提示

therock

19 Comments

  1. why does the keto diet work
    July 7, 2021 at 7:53 am

    keto whipped cream

  2. keto snacks walmart
    July 7, 2021 at 1:32 am

    keto diet plan free pdf

  3. ketones in urine keto diet
    July 7, 2021 at 12:04 am

    keto taco shells

  4. free to contact dating
    June 25, 2021 at 10:49 am

    delete christian dating for free account

  5. atlanta free dating
    June 25, 2021 at 9:44 am

    free mfm bisexual dating site

  6. free vegetarian dating
    June 24, 2021 at 9:34 am

    farmers only free dating site

  7. latest dating sites in usa for free
    June 24, 2021 at 2:56 am

    free plus size dating uk

  8. sda dating free
    June 23, 2021 at 10:55 pm

    completely free online dating south africa

  9. Usescedge
    June 13, 2021 at 10:06 pm

    buy accutane 5 mg online usa

  10. online dating seniors free
    June 2, 2021 at 1:33 am

    100 free dating no cost ever

  11. free fat dating
    June 1, 2021 at 8:19 pm

    dating free services single

  12. free online video speed dating
    June 1, 2021 at 8:15 pm

    100% free dating site in in kuwait

  13. free dating sites other than pof
    June 1, 2021 at 6:08 pm

    totally free senior dating

  14. new free dating website
    May 27, 2021 at 12:41 am

    free dating sites for young women

  15. 100% free senior dating website
    May 21, 2021 at 12:06 am

    a good free dating site

  16. free dating adelaide
    May 20, 2021 at 11:29 pm

    i kissed dating goodbye free ebook

  17. free online chinese dating sites
    May 20, 2021 at 5:33 am

    interracial free dating sites

  18. ukrainian dating sites free
    May 19, 2021 at 7:04 pm

    ukrainian dating sites free

  19. tinder in hong kong
    May 16, 2021 at 3:05 pm

    tinder in hong kong

    PVE添加cpu温度显示 – rock funs

Meta
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Categories
  • game
  • linux
  • news
  • pics
  • proxmox
  • windows
Recent Posts
  • proxmox7.3直通显卡
  • Proxmox VE 直通显卡方案及解决N卡Code43
  • Linux系统出现:You have new mail in /var/spool/mail/root 的原因及解决办法
  • debian系统解决中文乱码
  • pve添加git和pvetools
Recent Comments
  • EdgarTot on proxmox7.3直通显卡
  • Ashvem on proxmox7.3直通显卡
  • Tedvem on proxmox7.3直通显卡
  • Jackvem on proxmox7.3直通显卡
  • Miavem on proxmox7.3直通显卡
Archives
  • March 2023 (1)
  • December 2022 (4)
  • November 2022 (6)
  • April 2022 (1)
  • February 2022 (5)
  • January 2022 (2)
  • December 2021 (3)
  • November 2021 (1)
  • October 2021 (2)
  • September 2021 (1)
  • August 2021 (1)
  • July 2021 (8)
  • June 2021 (14)
  • May 2021 (2)
  • April 2021 (2)
  • March 2021 (10)
  • January 2021 (4)
  • December 2020 (4)
  • November 2020 (13)
  • April 2020 (276)
  • March 2020 (1)
  • June 2019 (5)
  • May 2019 (10)
  • December 2015 (1)