Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Proxmox CPU Frequency Patch

Shows the current CPU frequency next to the CPU model in the Proxmox VE WebGUI summary page. Updates every 2 seconds.

Works with Intel and AMD CPUs on Proxmox VE 9.x.

Before / After

Before:  8 x Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz (1 Socket)
After:   8 x Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz (1 Socket) @ 1100 MHz
                                                                   ^^^^^^^^^^

The frequency value updates dynamically based on actual CPU clock speed (useful for verifying powersave governor, turbo boost, etc.)

Installation

wget https://raw.githubusercontent.com/<user>/pve-cpufreq-patch/main/pve-cpufreq-patch.sh
bash pve-cpufreq-patch.sh

Then hard-reload the Proxmox WebGUI in your browser: Ctrl+Shift+R

After PVE Updates

Updates to pve-manager, proxmox-widget-toolkit, or libpve-access-control will overwrite the patched files. Simply re-run:

bash pve-cpufreq-patch.sh

Already patched files are detected and skipped ([SKIP]).

What it patches

File Change
/usr/share/perl5/PVE/API2/Nodes.pm Reads current avg CPU frequency from sysfs, adds cur_mhz to the API response
/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js Displays cur_mhz next to the CPU model string
/usr/share/pve-manager/js/pvemanagerlib.js Reduces status polling interval from 5s to 2s

How it works

Proxmox caches cpuinfo (including MHz) on first read and never refreshes it. This patch:

  1. Clones the cached cpuinfo object (doesn't modify the cache)
  2. Reads the current average frequency from /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
  3. Injects it as cur_mhz into the API response
  4. Renders it inline in the WebGUI via a patched render_cpu_model function

Rollback

Restore the original files:

cp /usr/share/perl5/PVE/API2/Nodes.pm.bak /usr/share/perl5/PVE/API2/Nodes.pm
cp /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js.bak.cpufreq /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
systemctl restart pvedaemon pveproxy

Notes

  • If the WebGUI feels sluggish, change interval: 2000 back to 3000 or 5000 in pvemanagerlib.js
  • Requires python3 (pre-installed on Proxmox)
  • Backups of patched files are created automatically on first run (.bak / .bak.cpufreq)

License

MIT

About

Show current CPU frequency in Proxmox VE WebGUI. Intel & AMD. Updates every 2s.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages