From b9baf35dfaa0cacd366533bf93b199e78b1b5853 Mon Sep 17 00:00:00 2001 From: "Aaron D. Lee" Date: Mon, 5 Jan 2026 21:13:16 -0500 Subject: [PATCH] Show CPU speed and temp in MOTD when overclocked MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Displays MHz and temperature when arm_freq or over_voltage is set in config.txt 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- rpi/setup.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rpi/setup.sh b/rpi/setup.sh index b363eb4..72c5a2c 100755 --- a/rpi/setup.sh +++ b/rpi/setup.sh @@ -345,6 +345,16 @@ if systemctl is-active --quiet stegasoo 2>/dev/null; then echo "" echo -e " \033[0;32m●\033[0m Stegasoo is running" echo -e " \033[0;33m$STEGASOO_URL\033[0m" + # Show CPU stats if overclocked + if grep -qE "^(arm_freq|over_voltage)" /boot/firmware/config.txt 2>/dev/null || \ + grep -qE "^(arm_freq|over_voltage)" /boot/config.txt 2>/dev/null; then + CPU_FREQ=$(vcgencmd measure_clock arm 2>/dev/null | cut -d= -f2) + CPU_TEMP=$(vcgencmd measure_temp 2>/dev/null | cut -d= -f2) + if [ -n "$CPU_FREQ" ] && [ -n "$CPU_TEMP" ]; then + CPU_MHZ=$((CPU_FREQ / 1000000)) + echo -e " \033[0;35m⚡\033[0m ${CPU_MHZ} MHz \033[0;35m🌡\033[0m ${CPU_TEMP}" + fi + fi echo "" else echo ""