time dig website @localhost – measuring the browsing time from localhost

This command have a useful function. Especially when we want to measure the speed our access from localhost through proxy to some website.
In my case, I have a problem with squid. I though the problem is squid but no.
I read in http://www.mail-archive.com/tanya-jawab@linux.or.id/msg15689.html that I should check /etc/resolv.conf file again.
This is my resolv.conf :

search kanaanlocaldomain.com
nameserver 202.100.39.6
nameserver 222.100.39.7

The guy in mail archive suggested that I should use nameserver 127.0.0.1 instead of kanaanlocaldomain.com it will make everything shorter.
of maybe I should try to delete 127.0.0.1 so the server will directly search the address through the dns 202.100.39.6.
And Yes.. I don’t have the slower of failed connection anymore.
This is the result of
#time dig google.com @localhost

; < > DiG 9.4.3-P3 < > google.com @localhost
;; global options: printcmd
;; Got answer:
;; ->>HEADER< <- opcode: QUERY, status: NOERROR, id: 42305
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 4, ADDITIONAL: 0

;; QUESTION SECTION:
;google.com. IN A

;; ANSWER SECTION:
google.com. 300 IN A 64.233.181.105
google.com. 300 IN A 64.233.181.104
google.com. 300 IN A 64.233.181.106
google.com. 300 IN A 64.233.181.103
google.com. 300 IN A 64.233.181.147
google.com. 300 IN A 64.233.181.99

;; AUTHORITY SECTION:
google.com. 172068 IN NS ns2.google.com.
google.com. 172068 IN NS ns3.google.com.
google.com. 172068 IN NS ns4.google.com.
google.com. 172068 IN NS ns1.google.com.

;; Query time: 124 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Sep 20 10:15:48 2010
;; MSG SIZE rcvd: 196

real 0m0.136s
user 0m0.005s
sys 0m0.005s

the query time is taking 124 msec.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.