一、安装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温度显示。
19 Comments
why does the keto diet work
July 7, 2021 at 7:53 amketo whipped cream
keto snacks walmart
July 7, 2021 at 1:32 amketo diet plan free pdf
ketones in urine keto diet
July 7, 2021 at 12:04 amketo taco shells
free to contact dating
June 25, 2021 at 10:49 amdelete christian dating for free account
atlanta free dating
June 25, 2021 at 9:44 amfree mfm bisexual dating site
free vegetarian dating
June 24, 2021 at 9:34 amfarmers only free dating site
latest dating sites in usa for free
June 24, 2021 at 2:56 amfree plus size dating uk
sda dating free
June 23, 2021 at 10:55 pmcompletely free online dating south africa
Usescedge
June 13, 2021 at 10:06 pmbuy accutane 5 mg online usa
online dating seniors free
June 2, 2021 at 1:33 am100 free dating no cost ever
free fat dating
June 1, 2021 at 8:19 pmdating free services single
free online video speed dating
June 1, 2021 at 8:15 pm100% free dating site in in kuwait
free dating sites other than pof
June 1, 2021 at 6:08 pmtotally free senior dating
new free dating website
May 27, 2021 at 12:41 amfree dating sites for young women
100% free senior dating website
May 21, 2021 at 12:06 ama good free dating site
free dating adelaide
May 20, 2021 at 11:29 pmi kissed dating goodbye free ebook
free online chinese dating sites
May 20, 2021 at 5:33 aminterracial free dating sites
ukrainian dating sites free
May 19, 2021 at 7:04 pmukrainian dating sites free
tinder in hong kong
May 16, 2021 at 3:05 pmtinder in hong kong
PVE添加cpu温度显示 – rock funs