diff --git a/padd.sh b/padd.sh index 8e28ab5..7fa51e9 100755 --- a/padd.sh +++ b/padd.sh @@ -396,6 +396,7 @@ GetSummaryInformation() { top_blocked_raw="N/A" top_domain_raw="N/A" top_client_raw="N/A" + dns_queries_frequency="N/A" return fi @@ -418,7 +419,7 @@ GetSummaryInformation() { cache_size=$(GetPADDValue cache.size) cache_evictions=$(GetPADDValue cache.evicted) - cache_inserts=$(echo "${padd_data}"| GetPADDValue cache.inserted) + cache_inserts=$(GetPADDValue cache.inserted) latest_blocked_raw=$(GetPADDValue recent_blocked) @@ -428,6 +429,9 @@ GetSummaryInformation() { 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) # Substitute 'null' values returned by FTL for privacy level >1 @@ -471,7 +475,7 @@ GetSystemInformation() { cpu_temp_raw=$(GetPADDValue sensors.cpu_temp) if [ "${cpu_temp_raw}" != null ]; then cpu_temp=$(printf "%.1f" "${cpu_temp_raw}") - temp_unit=$(echo "${padd_data}" | GetPADDValue sensors.unit) + temp_unit=$(GetPADDValue sensors.unit) fi # Temp + Unit @@ -1245,7 +1249,7 @@ PrintDashboard() { 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 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 " %-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"