找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 698|回复: 4

[openwrt(x86)] 虚拟机OPENWRT能否获得PVE的温度信息 ?

[复制链接]
今日看到OP里面有推送的插件 请问能否让OP 获取PVE的各种温度参数并且推送呢
我的恩山、我的无线 The best wifi forum is right here.
本帖最后由 tty228 于 2023-5-26 21:07 编辑







本帖子中包含更多资源

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

×

点评

请问这是什么插件  详情 回复 发表于 2023-6-1 23:19
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报


请问这是什么插件

点评

https://github.com/tty228/luci-app-wechatpush/releases 高级设置里面更改温度获取方式 首页显示的话,如果是通过 autocore 插件更改的主页温度 需要在 cpuinfo 文件 (/sbin/cpuinfo) 上加入一行 `[ -z "$cpu_t  详情 回复 发表于 2023-6-1 23:35
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

本帖最后由 tty228 于 2023-6-1 23:38 编辑
chris.. 发表于 2023-6-1 23:19
请问这是什么插件

https://github.com/tty228/luci-app-wechatpush/releases


高级设置里面更改温度获取方式

首页显示的话,如果是通过 autocore 插件更改的主页温度
需要在 cpuinfo 文件 (/sbin/cpuinfo) 上加入一行

  1. [ -z "$cpu_temp" ] && cpu_temp="$(/usr/share/wechatpush/wechatpush soc)°C"
复制代码
以上代码加到下面的代码后面,意思为下面的代码无法获取温度时,调用上面的代码获取 pve 温度

  1. case "$DISTRIB_TARGET" in
  2. "bcm27xx"/*)
  3.         cpu_temp="$(vcgencmd measure_temp | awk -F '=' '{print $2}' | awk -F "'" '{print $1}')°C" ;;
  4. "x86"/*)
  5.         if grep -q "GenuineIntel" "/proc/cpuinfo"; then
  6.                 cpu_temp="$(sensors "coretemp-*" 2>"/dev/null" | grep -E "(Package id |Core )" | grep -Eo "\+[0-9.]*°C" | head -n1 | tr -d "+")"
  7.         elif grep -q "AuthenticAMD" "/proc/cpuinfo"; then
  8.                 cpu_temp="$(sensors "k*temp-*" 2>"/dev/null" | awk '/Tdie/ {print $2}' | head -n1 | tr -d "+")"
  9.         fi
  10.         ;;
  11. *)
  12.         [ ! -e "$THERMAL_PATH/thermal_zone0/temp" ] || \
  13.                 cpu_temp="$(awk '{printf("%.1f°C", $0 / 1000)}' "$THERMAL_PATH/thermal_zone0/temp")"
  14.         ;;
  15. esac
复制代码


其他同理

点评

好的,谢谢大佬  详情 回复 发表于 2023-6-1 23:36
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

tty228 发表于 2023-6-1 23:35
https://github.com/tty228/luci-app-wechatpush/releases

好的,谢谢大佬
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

关闭

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

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

GMT+8, 2024-4-28 15:54

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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

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