Is there a way to list the local dns cache? I would like to get a list of my current cache on my phone, what is the command to issue in order to retrieve that list ?

I would like to get a command and not an app that does that, since i want to incorporate that command into a script that i am write.

Thanks.
In Android, the DNS Cache is not on the OS level (Linux), but on the Java level (managed by java.net.InetAddress). Therefore, it is not possible to list the cache contents from the shell, however you can access it from the Java code. 

Please see Java DNS cache viewer question on StackOverflow, one of the answers has a sample Java code that prints the positive and negative DNS cache. You can incorporate that code into whatever solution you're building.