找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 283|回复: 2

[Debian] 求助,PVE web界面显示主板温度问题

[复制链接]
自己重新装了it87.c驱动,目前风扇速度,主板温度都可以显示了,但是pve web界面读取主板温度位置不对,请问这个应该怎么改?

这个是

sensors -j 目前js是读的acpitz-acpi-0这里温度

  1.   "acpitz-acpi-0":{
  2.       "Adapter": "ACPI interface",
  3.       "temp1":{
  4.          "temp1_input": 16.800,
  5.          "temp1_crit": 20.800
  6.       },
  7.       "temp2":{
  8.          "temp2_input": 27.800,
  9.          "temp2_crit": 105.000
  10.       }
  11.    },
复制代码
我想想js读gigabyte_wmi-virtual-0这里的温度
  1. "gigabyte_wmi-virtual-0":{
  2.       "Adapter": "Virtual device",
  3.       "temp1":{
  4.          "temp1_input": 41.000
  5.       },
  6.       "temp2":{
  7.          "temp2_input": 42.000
  8.       },
  9.       "temp3":{
  10.          "temp3_input": 36.000
  11.       },
  12.       "temp5":{
  13.          "temp5_input": 39.000
  14.       }
复制代码
请问一下JS代码应该怎么修改,自己尝试了几次,都修改不成功
这个是js代码
  1.              let acpitzs = value.matchAll(/^acpitz-acpi-(\d*)$\n.*?\n((?:temp)[\s\S]*?^\n)+/gm);
  2.                     for (const acpitz of acpitzs) {
  3.                         let acpitzNumber = parseInt(acpitz[1], 10);
  4.                         data[acpitzNumber] = {
  5.                             acpisensors: []
  6.                         };

  7.                         let acpisensors = acpitz[2].matchAll(/^temp\d+:\s*\+([^°C ]+).*$/gm);
  8.                         for (const acpisensor of acpisensors) {
  9.                             data[acpitzNumber]['acpisensors'].push(acpisensor[1]);
  10.                         }

  11.                         for (const [k, acpitz] of data.entries()) {
  12.                             if (acpitz.acpisensors.length > 0) {
  13.                                 output += '主板: ';
  14.                                 for (const acpiTemp of acpitz.acpisensors) {
  15.                                     output += `${acpiTemp}°C, `;
  16.                                 }
  17.                                 output = output.slice(0, -2);
  18.                                 output += ' | ';
  19.                             } else {
  20.                                 output = output.slice(0, -2)
复制代码



我的恩山、我的无线 The best wifi forum is right here.
这是我的


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
搞定了, 只替换一个 gigabyte_wmi-virtual-
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-5-6 14:42

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表