Merge pull request #1413 from wvogel/patch-1

Fix pdns_rel to always have correct output
This commit is contained in:
Kenyon Ralph 2024-03-02 14:22:30 -08:00 committed by GitHub
commit 973bb83fde
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -49,6 +49,8 @@ if [ -f "$state_file" ] && [ "$(stat --format=%Y "$state_file")" -gt "$(date --d
d_queries=$((queries - old_queries))
if [ $d_queries -gt 0 ] ; then
echo packetcache_hitrate.value $(( d_hits * 100 / d_queries ))
else
echo packetcache_hitrate.value 0
fi
fi