mirror of
https://github.com/pi-hole/PADD.git
synced 2026-04-02 00:18:44 +01:00
Add query frequency to mega PADD
Signed-off-by: yubiuser <github@yubiuser.dev>
This commit is contained in:
10
padd.sh
10
padd.sh
@@ -396,6 +396,7 @@ GetSummaryInformation() {
|
|||||||
top_blocked_raw="N/A"
|
top_blocked_raw="N/A"
|
||||||
top_domain_raw="N/A"
|
top_domain_raw="N/A"
|
||||||
top_client_raw="N/A"
|
top_client_raw="N/A"
|
||||||
|
dns_queries_frequency="N/A"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -418,7 +419,7 @@ GetSummaryInformation() {
|
|||||||
|
|
||||||
cache_size=$(GetPADDValue cache.size)
|
cache_size=$(GetPADDValue cache.size)
|
||||||
cache_evictions=$(GetPADDValue cache.evicted)
|
cache_evictions=$(GetPADDValue cache.evicted)
|
||||||
cache_inserts=$(echo "${padd_data}"| GetPADDValue cache.inserted)
|
cache_inserts=$(GetPADDValue cache.inserted)
|
||||||
|
|
||||||
latest_blocked_raw=$(GetPADDValue recent_blocked)
|
latest_blocked_raw=$(GetPADDValue recent_blocked)
|
||||||
|
|
||||||
@@ -428,6 +429,9 @@ GetSummaryInformation() {
|
|||||||
|
|
||||||
top_client_raw=$(GetPADDValue top_client)
|
top_client_raw=$(GetPADDValue top_client)
|
||||||
|
|
||||||
|
dns_queries_frequency_raw=$(GetPADDValue queries.query_frequency)
|
||||||
|
dns_queries_frequency=$(echo "${dns_queries_frequency_raw}" | awk '{printf "%.f", $1 * 60}')
|
||||||
|
|
||||||
privacy_level=$(GetPADDValue config.privacy_level)
|
privacy_level=$(GetPADDValue config.privacy_level)
|
||||||
|
|
||||||
# Substitute 'null' values returned by FTL for privacy level >1
|
# Substitute 'null' values returned by FTL for privacy level >1
|
||||||
@@ -471,7 +475,7 @@ GetSystemInformation() {
|
|||||||
cpu_temp_raw=$(GetPADDValue sensors.cpu_temp)
|
cpu_temp_raw=$(GetPADDValue sensors.cpu_temp)
|
||||||
if [ "${cpu_temp_raw}" != null ]; then
|
if [ "${cpu_temp_raw}" != null ]; then
|
||||||
cpu_temp=$(printf "%.1f" "${cpu_temp_raw}")
|
cpu_temp=$(printf "%.1f" "${cpu_temp_raw}")
|
||||||
temp_unit=$(echo "${padd_data}" | GetPADDValue sensors.unit)
|
temp_unit=$(GetPADDValue sensors.unit)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Temp + Unit
|
# Temp + Unit
|
||||||
@@ -1245,7 +1249,7 @@ PrintDashboard() {
|
|||||||
moveXOffset; printf " %-10s%-39s${clear_line}\n" "Latest:" "${latest_blocked}"
|
moveXOffset; printf " %-10s%-39s${clear_line}\n" "Latest:" "${latest_blocked}"
|
||||||
moveXOffset; printf " %-10s%-39s${clear_line}\n" "Top Ad:" "${top_blocked}"
|
moveXOffset; printf " %-10s%-39s${clear_line}\n" "Top Ad:" "${top_blocked}"
|
||||||
moveXOffset; printf " %-10s%-39s${clear_line}\n" "Top Dmn:" "${top_domain}"
|
moveXOffset; printf " %-10s%-39s${clear_line}\n" "Top Dmn:" "${top_domain}"
|
||||||
moveXOffset; printf " %-10s%-39s${clear_line}\n" "Top Clnt:" "${top_client}"
|
moveXOffset; printf " %-10s%-30s%-12s%-19s${clear_line}\n" "Top Clnt:" "${top_client}" "Query rate: " "${dns_queries_frequency} q/min"
|
||||||
moveXOffset; printf "%s${clear_line}\n" "${bold_text}FTL ============================================================================${reset_text}"
|
moveXOffset; printf "%s${clear_line}\n" "${bold_text}FTL ============================================================================${reset_text}"
|
||||||
moveXOffset; printf " %-10s%-9s %-10s%-9s %-10s%-9s${clear_line}\n" "PID:" "${ftlPID}" "CPU Use:" "${ftl_cpu}" "Mem. Use:" "${ftl_mem_percentage}"
|
moveXOffset; printf " %-10s%-9s %-10s%-9s %-10s%-9s${clear_line}\n" "PID:" "${ftlPID}" "CPU Use:" "${ftl_cpu}" "Mem. Use:" "${ftl_mem_percentage}"
|
||||||
moveXOffset; printf " %-10s%-69s${clear_line}\n" "DNSCache:" "${cache_inserts} insertions, ${cache_evictions} deletions, ${cache_size} total entries"
|
moveXOffset; printf " %-10s%-69s${clear_line}\n" "DNSCache:" "${cache_inserts} insertions, ${cache_evictions} deletions, ${cache_size} total entries"
|
||||||
|
|||||||
Reference in New Issue
Block a user