给Proxmox VE(PVE)添加CPU和硬盘相关信息显示的教程

一、实现以下功能
1、在PVE首页增加cpu相关信息显示,包括:每个核心的频率、每个核心的温度、实时功耗、最大频率、最小频率等;
2、在PVE首页增加硬盘相关信息显示,包括:硬盘型号、容量、温度、健康指数、通电小时、通电次数、读写量、SMART是否正常;
3、理论上可以适配PVE任意版本;

 

二、使用方法
1、复制下面的安装依赖命令脚本,到PVE的Shell状态下运行,等到最后的一行的显示为 “成功!” 就表示本条命令安装成功。

apt update ; apt install linux-cpupower && modprobe msr && echo msr > /etc/modules-load.d/turbostat-msr.conf && chmod +s /usr/sbin/turbostat && echo 成功!

 

2、如果你的PVE之前使用过同类或者其他类似的修改PVE页面的脚本,先用下面命令恢复到官方默认设置(如果PVE没有做过修改的,本步骤不需要操作):

apt update
apt install pve-manager proxmox-widget-toolkit --reinstall
rm -f /usr/share/perl5/PVE/API2/Nodes.pm*bak
rm -f /usr/share/pve-manager/js/pvemanagerlib.js*bak
rm -f /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js*bak

 

3、复制下面的一键安装命令脚本,到PVE的Shell状态下运行:

(curl -Lf -o /tmp/temp.sh https://raw.githubusercontent.com/a904055262/PVE-manager-status/main/showtempcpufreq.sh || curl -Lf -o /tmp/temp.sh https://ghproxy.com/https://raw.githubusercontent.com/a904055262/PVE-manager-status/main/showtempcpufreq.sh) && chmod +x /tmp/temp.sh && /tmp/temp.sh remod

 

三、效果展示

 

四、脚本作者开源仓库地址:

https://github.com/a904055262/PVE-manager-status

点赞
  1. 司徒说道:
    Google Chrome Windows 10
    pve8.0.4可用,CPU是13500,多硬盘,显示不完整,需要调整高度。 修改文件:/usr/share/pve-manager/js/pvemanagerlib.js 查找widget.pveNodeStatus ,调整height即可
    1. 博主说道:
      Google Chrome Windows 10
      嗯,可以根据自己实际情况调整参数。
  2. 火锅路人甲说道:
    Google Chrome Windows 10
    pve8.0.3设置后完美显示,感谢分享。
  3. billzhangtao说道:
    Sogou Explorer Windows 10
    好用~ pve8.0设置后完美显示
    1. 博主说道:
      Google Chrome Windows 10
      好的,谢谢反馈。

发表回复