Skip to content

Instantly share code, notes, and snippets.

@FnTm
Last active November 7, 2018 11:00
Show Gist options
  • Save FnTm/f394c54d863481a88f39ff89cf3058bf to your computer and use it in GitHub Desktop.
Save FnTm/f394c54d863481a88f39ff89cf3058bf to your computer and use it in GitHub Desktop.
Checking what the Java Runtime DNS TTL property is
# Changing the cache TTL to something bigger might be useful, and this command let's you check what it's currently at
jrunscript -e "print(java.security.Security.getProperty(\"networkaddress.cache.ttl\"))"
# And this let's you check that value for a docker image
docker run -it openjdk:8u151 /bin/bash -c 'jrunscript -e "print(java.security.Security.getProperty(\"networkaddress.cache.ttl\"))"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment