chrony: don't resolve IP addresses to hostnames

If we don't want to show any host names in graphs/legend, it makes sense to not resolve them.

I occasionally notice the issue with name resolution of IPv6 addresses on certain networks, which makes `chronyc tracking` take 20+ seconds. Adding -n makes it almost instantaneous.
This commit is contained in:
Anton Shestakov 2022-03-27 14:51:32 +03:00 committed by Lars Kruse
parent 37279214d1
commit e12c8afdb7
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ if [ "$1" = "config" ]; then
exit 0
fi
chrony_status="$("$CHRONYC" tracking)"
chrony_status="$("$CHRONYC" -n tracking)"
echo "$fields" | while read fieldname factor regex label; do
status_line="$(echo "$chrony_status" | grep -i -- "$regex " | cut -d ":" -f 2-)"
if [ -z "$status_line" ]; then