Skip to content

Commit 11b9b78

Browse files
MTSistemiclaude
andcommitted
monitor: v2 - power+load charts, .sfmon recorder/analyzer with time scrubber
- skillfish-hud-val: add `all` batch mode (one process, all metrics incl. gpu_power). - Monitor: six charts (temperature, CPU/GPU load, frequency, power W, GPU voltage, fan); refresh 0.3/0.5/0.75/1/2 s; CPU load from /proc/stat; HUD helper resolved by absolute path. - Records to .sfmon (CSV + metadata header, full history). Viewer mode (`skillfish-monitor file.sfmon`) renders the whole run with a draggable time scrubber and per-cursor readouts. In-app Open button. - MIME type application/x-skillfish-monitor (*.sfmon) + desktop association; postinst refreshes the shared-mime db. metainfo 26.06.6. CI: package the mime, content-check the deb. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 9a1963b commit 11b9b78

7 files changed

Lines changed: 627 additions & 197 deletions

File tree

apps/monitor/os.skillfish.monitor.metainfo.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@
4141
</screenshot>
4242
</screenshots>
4343
<releases>
44+
<release version="26.06.6" date="2026-06-10">
45+
<description>
46+
<p>Monitor v2: added power (W) and CPU/GPU load charts (six panels total); refresh now selectable down to 0.5 s. Recordings are saved as .sfmon files (CSV-backed) and can be re-opened in the Monitor as a benchmark analyzer with a time scrubber to inspect the whole run second by second.</p>
47+
</description>
48+
</release>
4449
<release version="26.06.5" date="2026-06-10">
4550
<description><p>REC button: record telemetry to CSV with a min/avg/max summary at the end of the session.</p></description>
4651
</release>

apps/monitor/skillfish-monitor

Lines changed: 285 additions & 89 deletions
Large diffs are not rendered by default.

scripts/build-debs-ci.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@ ctrl $P "python3, python3-pyqt6, python3-apt, gir1.2-appstream-1.0, appstream, c
5353
P=skillfish-monitor
5454
put $P 0755 apps/monitor/skillfish-monitor usr/local/bin/skillfish-monitor
5555
put $P 0644 system/usr/share/applications/os.skillfish.monitor.desktop usr/share/applications/os.skillfish.monitor.desktop
56+
put $P 0644 system/usr/share/mime/packages/os.skillfish.monitor.xml usr/share/mime/packages/os.skillfish.monitor.xml
5657
shot $P apps/monitor/os.skillfish.monitor.metainfo.xml
57-
ctrl $P "python3, python3-pyqt6" "SkillFishOS Monitor - live sensor charts"
58+
ctrl $P "python3, python3-pyqt6" "SkillFishOS Monitor - live sensor charts + .sfmon benchmark analyzer"
59+
# monitor ships a MIME type (.sfmon recordings) → also refresh the shared-mime db
60+
printf '#!/bin/sh\nset -e\nupdate-mime-database /usr/share/mime >/dev/null 2>&1 || true\nupdate-desktop-database -q 2>/dev/null || true\nappstreamcli refresh-cache --force >/dev/null 2>&1 || true\nexit 0\n' > "$OUT/$P/DEBIAN/postinst"
61+
chmod 0755 "$OUT/$P/DEBIAN/postinst"
5862

5963
P=skillfish-kernel-manager
6064
put $P 0755 apps/kernel-manager/skillfish-kernel-manager usr/local/bin/skillfish-kernel-manager
@@ -104,4 +108,5 @@ check skillfish-kernel-manager_${VER}_all.deb ./usr/local/bin/skillfish-kernel-m
104108
check skillfish-ai-panel_${VER}_all.deb ./usr/local/bin/skillfish-ai-panel skillfish
105109
check skillfish-base_${VER}_all.deb ./usr/local/bin/skillfish-freeze-check.sh unclean-shutdown
106110
check skillfish-tuner_${VER}_all.deb ./usr/local/bin/skillfish-tuner _silicon
111+
check skillfish-monitor_${VER}_all.deb ./usr/local/bin/skillfish-monitor SFMON_EXT
107112
echo "ALL DEBS VERIFIED"
Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
11
#!/bin/bash
2+
# SkillFishOS sensor value helper. Single key: `skillfish-hud-val <key>`.
3+
# Batch: `skillfish-hud-val all` prints "key value" lines for every metric in ONE
4+
# process (used by the Monitor app and the telemetry web dashboard to avoid a
5+
# subprocess fan-out per sample). CPU load% is stateful (delta) → computed by callers.
26
GHW=$(echo /sys/class/drm/card0/device/hwmon/hwmon*)
37
hw(){ for h in /sys/class/hwmon/hwmon*; do [ "$(cat "$h/name" 2>/dev/null)" = "$1" ] && { echo "$h"; return; }; done; }
48
# locale: it* -> Italian labels, anything else -> English
59
_loc="${LC_ALL:-${LC_MESSAGES:-${LANG:-$LANGUAGE}}}"; case "$_loc" in it*) IT=1;; *) IT=0;; esac
6-
case "$1" in
7-
lbl_use) [ "$IT" = 1 ] && echo "uso" || echo "use" ;;
8-
lbl_disk) [ "$IT" = 1 ] && echo "DISCO" || echo "DISK" ;;
9-
cpu_temp) awk '{printf "%.0f",$1/1000}' "$(hw k10temp)/temp1_input" 2>/dev/null ;;
10-
gpu_freq) awk '/\*/{print $2}' /sys/class/drm/card0/device/pp_dpm_sclk 2>/dev/null ;;
11-
gpu_util) cat /run/skillfish-gpu-util 2>/dev/null || echo 0 ;;
12-
gpu_temp) awk '{printf "%.0f",$1/1000}' "$GHW/temp1_input" 2>/dev/null ;;
13-
gpu_power) awk '{printf "%.0f",$1/1000000}' "$GHW/power1_average" 2>/dev/null ;;
14-
gpu_mv) cat "$GHW/in0_input" 2>/dev/null ;;
15-
vram) awk '{printf "%.0f",$1/1048576}' /sys/class/drm/card0/device/mem_info_vram_used 2>/dev/null ;;
16-
fan) cat "$(hw nct6686)/fan2_input" 2>/dev/null ;;
17-
cu) cat /run/skillfish/cu_active 2>/dev/null || echo "?" ;;
18-
cpu_mhz) awk -F: '/cpu MHz/{printf "%d",$2; exit}' /proc/cpuinfo 2>/dev/null ;;
19-
esac
10+
11+
get(){
12+
case "$1" in
13+
lbl_use) [ "$IT" = 1 ] && echo "uso" || echo "use" ;;
14+
lbl_disk) [ "$IT" = 1 ] && echo "DISCO" || echo "DISK" ;;
15+
cpu_temp) awk '{printf "%.0f",$1/1000}' "$(hw k10temp)/temp1_input" 2>/dev/null ;;
16+
gpu_freq) awk '/\*/{print $2}' /sys/class/drm/card0/device/pp_dpm_sclk 2>/dev/null ;;
17+
gpu_util) cat /run/skillfish-gpu-util 2>/dev/null || echo 0 ;;
18+
gpu_temp) awk '{printf "%.0f",$1/1000}' "$GHW/temp1_input" 2>/dev/null ;;
19+
gpu_power) awk '{printf "%.0f",$1/1000000}' "$GHW/power1_average" 2>/dev/null ;;
20+
gpu_mv) cat "$GHW/in0_input" 2>/dev/null ;;
21+
vram) awk '{printf "%.0f",$1/1048576}' /sys/class/drm/card0/device/mem_info_vram_used 2>/dev/null ;;
22+
fan) cat "$(hw nct6686)/fan2_input" 2>/dev/null ;;
23+
cu) cat /run/skillfish/cu_active 2>/dev/null || echo "?" ;;
24+
cpu_mhz) awk -F: '/cpu MHz/{printf "%d",$2; exit}' /proc/cpuinfo 2>/dev/null ;;
25+
esac
26+
}
27+
28+
if [ "$1" = "all" ]; then
29+
for k in cpu_temp gpu_temp cpu_mhz gpu_freq gpu_mv gpu_power fan vram gpu_util cu; do
30+
printf '%s %s\n' "$k" "$(get "$k")"
31+
done
32+
exit 0
33+
fi
34+
get "$1"

0 commit comments

Comments
 (0)