Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions padd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
Loading