Skip to content

Pi-hole Latency Stats v4.3.0 - Dashboard 2.4.0

Latest

Choose a tag to compare

@panoc panoc released this 03 Feb 17:50
· 3 commits to main since this release
0ac96db

1. Core Script (pihole_stats.sh)

  • Performance Architecture:

  • New: Merged calculations into single workers. Sorts data once, then performs instant lookups for Median/P95.

  • Impact: Dashboard generation with all options enabled is ~15% faster. CLI mode is slightly slower (single-threaded) but significantly more stable.

  • Database Stability:

  • New: Added PRAGMA busy_timeout = 30000; to all SQL connections. The script now waits for the DB to be free instead of crashing immediately.

  • New: Forced WAL (Write-Ahead Log) Mode when using Snapshots (-snap). This allows Readers and Writers to operate simultaneously, eliminating the "Database Locked" error.


2. Dashboard (dash.html)

  • Objective Health Metrics:
  • Old: Health Bar was calculated based on User Configured Tiers (Subjective).
  • New: Health Bar is now calculated using Hardcoded SQL Logic (Objective).
    • Result: Changing visual tiers (L01, L02) no longer breaks the accuracy of the Health score.

3. Cron Maker (cronmaker.sh)

  • Safety & Defaults:

  • Old: Read default settings from pihole_stats.conf (which users might have broken).

  • New: Uses Hardcoded Factory Defaults for Tiers and Logic to ensure new profiles are always valid. Reads installation paths from a read-only .phls_defaults file.

  • ️Priority Injection:

  • New: Automatically appends /usr/bin/nice -n 19 /usr/bin/ionice -c 3 to every new Cron job it creates.

  • Profile Management:

  • New: Explicitly handles default.conf vs custom profiles correctly, ensuring the Dashboard receives the correct -dash "ProfileName" argument.


4. Installer (install_phls.sh)

  • Auto-Patching:

  • New: Detects existing PHLS cron jobs on the system and injects nice -n 19 ionice -c 3 automatically during upgrade.

  • Path Intelligence:

  • New: Generates a hidden file .phls_defaults containing the validated installation paths (SAFE_INSTALL_DIR, SAFE_DASH_DIR). This bridges the gap between the Installer and Cron Maker.

  • New: Updates the pihole_stats.conf DASH_DIR variable using sed if the user chooses a custom dashboard path.