lost and found ( for me ? )

Dell Inspiron 1526: replace CMOS battery

Here are snapshots when replacing CMOS battery of Dell Inspiron 1526 notebook.

Someone said that Dell Inspiron 1526 did not boot… this seems to be caused by running out of CMOS battery.So you might get this fixed by replacing CMOS battery.

I replaced an old CMOS battery with the new one Mitsubishi CR2032.

Regarding how to replace CMOS battery, I referred to http://www.youtube.com/watch?v=LIEF2_fcvZU

In my case, It took around two  hours to replace that..

remove battery


remove the inside back panel








remove DVD ROM


remove HDD








remove front panel and keyboard





remove display





Here is CMOS battery.




After replacing CMOS battery. Ubuntu is running :D

PowerDNS: generate DNS queries with dnsbulktest

dnsbulktest contains Power DNS source code.

In short, dnsbulktest sends out many parallel queries to validate resolver performance.

Please see how to build dnsbulktest

Here is how to generate DNS queries with dnsbulktest.
# dnsbulktest --help
Usage: dnsbulktest [--options] ip-address portnumber [limit]
Allowed options:
 -h [ --help ]          produce help message
 -q [ --quiet ]         be quiet about individual queries
 -t [ --type ] arg (=A) What type to query for
 -e [ --envoutput ]     write report in shell environment format

prepare a queries list file like this:
# cat query_list.txt
1,www.google.com
2,www.amazon.com
3,www.facebook.com
4,www.yahoo.com
5,www.isc.org

generate DNS queries
# dnsbulktest 192.168.104.1 53 -t A < query_list.txt
Read 10 domains!
Reply to question for qname='www.facebook.com.', qtype=A
Rcode: 0, RD: 1, QR: 1, TC: 0, AA: 0, opcode: 0
0 www.facebook.com. IN CNAME 2863 star.c10r.facebook.com.
0 star.c10r.facebook.com. IN A 8 31.13.68.8
www.facebook.com|A: (6.613msec) rcode: 0, 31.13.68.8
Reply to question for qname='www.www.yahoo.com.', qtype=A
Rcode: 0, RD: 1, QR: 1, TC: 0, AA: 0, opcode: 0
0 www.www.yahoo.com. IN CNAME 1721 rc.yahoo.com.
0 rc.yahoo.com. IN CNAME 119 rc.g01.yahoodns.net.
0 rc.g01.yahoodns.net. IN CNAME 197 tw-rc.g01.yahoodns.net.
0 tw-rc.g01.yahoodns.net. IN A 222 119.160.242.96
www.www.yahoo.com|A: (15.113msec) rcode: 0, 119.160.242.96
Reply to question for qname='www.google.com.', qtype=A
Rcode: 0, RD: 1, QR: 1, TC: 0, AA: 0, opcode: 0
0 www.google.com. IN A 100 74.125.235.180
0 www.google.com. IN A 100 74.125.235.178
0 www.google.com. IN A 100 74.125.235.177
0 www.google.com. IN A 100 74.125.235.176
0 www.google.com. IN A 100 74.125.235.179
www.google.com|A: (19.087msec) rcode: 0, 74.125.235.180, 74.125.235.178, 74.125.235.177, 74.125.235.176, 74.125.235.179
Reply to question for qname='www.www.facebook.com.', qtype=A
Rcode: 3, RD: 1, QR: 1, TC: 0, AA: 0, opcode: 0
www.www.facebook.com|A: (21.008msec) rcode: 3
Reply to question for qname='www.amazon.com.', qtype=A
Rcode: 0, RD: 1, QR: 1, TC: 0, AA: 0, opcode: 0
0 www.amazon.com. IN A 22 205.251.242.54
www.amazon.com|A: (22.784msec) rcode: 0, 205.251.242.54
Reply to question for qname='www.www.isc.org.', qtype=A
Rcode: 3, RD: 1, QR: 1, TC: 0, AA: 0, opcode: 0
www.www.isc.org|A: (24.104msec) rcode: 3
Reply to question for qname='www.www.google.com.', qtype=A
Rcode: 3, RD: 1, QR: 1, TC: 0, AA: 0, opcode: 0
1 google.com. IN SOA 60 ns1.google.com. dns-admin.google.com. 1539512 7200 1800 1209600 300
www.www.google.com|A: (61.593msec) rcode: 3
Reply to question for qname='www.yahoo.com.', qtype=A
Rcode: 0, RD: 1, QR: 1, TC: 0, AA: 0, opcode: 0
0 www.yahoo.com. IN CNAME 14 fd-fp3.wg1.b.yahoo.com.
0 fd-fp3.wg1.b.yahoo.com. IN CNAME 186 ds-fp3.wg1.b.yahoo.com.
0 ds-fp3.wg1.b.yahoo.com. IN CNAME 34 ds-eu-fp3-lfb.wa1.b.yahoo.com.
0 ds-eu-fp3-lfb.wa1.b.yahoo.com. IN CNAME 211 ds-eu-fp3.wa1.b.yahoo.com.
0 ds-eu-fp3.wa1.b.yahoo.com. IN A 58 87.248.112.181
0 ds-eu-fp3.wa1.b.yahoo.com. IN A 58 87.248.122.122
www.yahoo.com|A: (108.175msec) rcode: 0, 87.248.112.181, 87.248.122.122
Reply to question for qname='www.www.amazon.com.', qtype=A
Rcode: 3, RD: 1, QR: 1, TC: 0, AA: 0, opcode: 0
1 www.amazon.com. IN SOA 60 ns-942.amazon.com. root.amazon.com. 1385561108 3600 900 7776000 60
www.www.amazon.com|A: (191.223msec) rcode: 3
Reply to question for qname='www.isc.org.', qtype=A
Rcode: 0, RD: 1, QR: 1, TC: 0, AA: 0, opcode: 0
0 www.isc.org. IN A 60 149.20.64.69
www.isc.org|A: (324.438msec) rcode: 0, 149.20.64.69
Sending                                 Receiving                          
 Queued                         10       Received                       10
 Error -/-                       0       Timeouts                        0
                                         Unexpected                      0
Sent                            10      Total                           10

DNS Status                                                                 
 OK                              6                                        
 Error                           0                                        
 No Data                         0                                        
 NXDOMAIN                        4                                        
 Unknowns                        0                                        
Answers                          10                                        
 Timeouts                        0                                        
Total                            10                                        

Mean response time: 79.4138 msec, median: 31.5408 msec
Time < 19.087 msec             0.100% cumulative
Time < 22.784 msec             1.000% cumulative
Time < 61.593 msec             2.500% cumulative
Time < 191.223 msec           10.000% cumulative
Time <  0.000 msec            25.000% cumulative
Time <  0.000 msec            50.000% cumulative
Time <  0.000 msec            75.000% cumulative
Time <  0.000 msec            90.000% cumulative
Time <  0.000 msec            97.500% cumulative
Time <  0.000 msec            99.000% cumulative
Time <  0.000 msec            99.990% cumulative

capture data collected on the target DNS server.
# tshark -i virbr8 port 53 -R '(ip.src == 192.168.104.159)'
tshark: Lua: Error during loading:
[string "/usr/share/wireshark/init.lua"]:46: dofile has been disabled due to running Wireshark as superuser. See http://wiki.wireshark.org/CaptureSetup/CapturePrivileges for help in running Wireshark as an unprivileged user.
tshark: -R without -2 is deprecated. For single-pass filtering use -Y.
Running as user "root" and group "root". This could be dangerous.
Capturing on 'virbr8'
 0.000000 192.168.104.159 -> 192.168.104.1 DNS 76 Standard query 0x0000  A www.facebook.com
 0.000084 192.168.104.159 -> 192.168.104.1 DNS 78 Standard query 0x0100  A www.www.amazon.com
 0.000132 192.168.104.159 -> 192.168.104.1 DNS 77 Standard query 0x0200  A www.www.yahoo.com
 0.000151 192.168.104.159 -> 192.168.104.1 DNS 71 Standard query 0x0300  A www.isc.org
 0.000180 192.168.104.159 -> 192.168.104.1 DNS 74 Standard query 0x0400  A www.google.com
 0.000195 192.168.104.159 -> 192.168.104.1 DNS 80 Standard query 0x0500  A www.www.facebook.com
 0.000222 192.168.104.159 -> 192.168.104.1 DNS 74 Standard query 0x0600  A www.amazon.com
 0.000238 192.168.104.159 -> 192.168.104.1 DNS 78 Standard query 0x0700  A www.www.google.com
 0.000260 192.168.104.159 -> 192.168.104.1 DNS 73 Standard query 0x0800  A www.yahoo.com
 0.000275 192.168.104.159 -> 192.168.104.1 DNS 75 Standard query 0x0900  A www.www.isc.org

send AAAA queries
# dnsbulktest 192.168.104.1 53 -t AAAA < query_list.txt
Read 10 domains!
Reply to question for qname='www.facebook.com.', qtype=AAAA
Rcode: 0, RD: 1, QR: 1, TC: 0, AA: 0, opcode: 0
0 www.facebook.com. IN CNAME 2771 star.c10r.facebook.com.
0 star.c10r.facebook.com. IN AAAA 1 2a03:2880:f002:101:face:b00c:0:1
www.facebook.com|AAAA: (49.616msec) rcode: 0, 2a03:2880:f002:101:face:b00c:0:1
Reply to question for qname='www.www.yahoo.com.', qtype=AAAA
Rcode: 0, RD: 1, QR: 1, TC: 0, AA: 0, opcode: 0
0 www.www.yahoo.com. IN CNAME 1629 rc.yahoo.com.
0 rc.yahoo.com. IN CNAME 27 rc.g01.yahoodns.net.
0 rc.g01.yahoodns.net. IN CNAME 105 tw-rc.g01.yahoodns.net.
1 g01.yahoodns.net. IN SOA 23 yf1.yahoo.com. hostmaster.yahoo-inc.com. 1385561391 30 30 86400 300
www.www.yahoo.com|AAAA: (63.251msec) rcode: 0

you can generate ANY queries too.
# dnsbulktest -q -e 192.168.104.1 53 -t ANY 100 < query_list.txt
Read 10 domains!
Sending                                 Receiving                          
 Queued                         10       Received                       10
 Error -/-                       0       Timeouts                        0
                                         Unexpected                      0
Sent                            10      Total                           10

DNS Status                                                                 
 OK                              0                                        
 Error                           0                                        
 No Data                         3                                        
 NXDOMAIN                        4                                        
 Unknowns                        3                                        
Answers                          10                                        
 Timeouts                        0                                        
Total                            10                                        

Mean response time: 104.247 msec, median: 79.0895 msec
Time <  1.454 msec             0.100% cumulative
Time < 53.464 msec             1.000% cumulative
Time < 181.391 msec            2.500% cumulative
Time < 187.094 msec           10.000% cumulative
Time <  0.000 msec            25.000% cumulative
Time <  0.000 msec            50.000% cumulative
Time <  0.000 msec            75.000% cumulative
Time <  0.000 msec            90.000% cumulative
Time <  0.000 msec            97.500% cumulative
Time <  0.000 msec            99.000% cumulative
Time <  0.000 msec            99.990% cumulative
DBT_QUEUED=10
DBT_SENDERRORS=0
DBT_RECEIVED=10
DBT_TIMEOUTS=0
DBT_UNEXPECTEDS=0
DBT_OKPERCENTAGE=0
DBT_OKPERCENTAGEINT=0

capture data on the target box.
421.057780 192.168.104.159 -> 192.168.104.1 DNS 76 Standard query 0x0000  ANY www.facebook.com
421.057863 192.168.104.159 -> 192.168.104.1 DNS 78 Standard query 0x0100  ANY www.www.amazon.com
421.057882 192.168.104.159 -> 192.168.104.1 DNS 77 Standard query 0x0200  ANY www.www.yahoo.com
421.057922 192.168.104.159 -> 192.168.104.1 DNS 71 Standard query 0x0300  ANY www.isc.org
421.057937 192.168.104.159 -> 192.168.104.1 DNS 74 Standard query 0x0400  ANY www.google.com
421.057963 192.168.104.159 -> 192.168.104.1 DNS 80 Standard query 0x0500  ANY www.www.facebook.com
421.057978 192.168.104.159 -> 192.168.104.1 DNS 74 Standard query 0x0600  ANY www.amazon.com
421.058001 192.168.104.159 -> 192.168.104.1 DNS 78 Standard query 0x0700  ANY www.www.google.com
421.058015 192.168.104.159 -> 192.168.104.1 DNS 73 Standard query 0x0800  ANY www.yahoo.com
421.058040 192.168.104.159 -> 192.168.104.1 DNS 75 Standard query 0x0900  ANY www.www.isc.org

- generate DNS queries with Alexa 1 million list

Alexa top 1 million list is suitable format for dnsbulktest.
You can generate DNS queries with top-1m list like this:
# apt-get install unzip

# unzip top-1m.csv.zip
Archive:  top-1m.csv.zip
 inflating: top-1m.csv   

# head -5 top-1m.csv
1,google.com
2,facebook.com
3,youtube.com
4,yahoo.com
5,baidu.com



# dnsbulktest 192.168.104.1 53 -t A -q -e 10000 < top-1m.csv
Read 10000 domains!
Sending                                 Receiving                          
 Queued                      10000       Received                     9416
 Error -/-                       0       Timeouts                      584
                                         Unexpected                      0
Sent                         10000      Total                        10000

DNS Status                                                                 
 OK                           9231                                        
 Error                           0                                        
 No Data                       119                                        
 NXDOMAIN                       66                                        
 Unknowns                        0                                        
Answers                        9416                                        
 Timeouts                      584                                        
Total                         10000                                        

Mean response time: 2454.06 msec, median: 2206.39 msec
Time < 23.281 msec             0.100% cumulative
Time < 146.635 msec            1.000% cumulative
Time < 449.268 msec            2.500% cumulative
Time < 1386.564 msec          10.000% cumulative
Time < 1765.986 msec          25.000% cumulative
Time < 2137.124 msec          50.000% cumulative
Time < 2907.570 msec          75.000% cumulative
Time < 4123.878 msec          90.000% cumulative
Time < 5899.170 msec          97.500% cumulative
Time < 6975.723 msec          99.000% cumulative
Time < 10515.954 msec         99.990% cumulative
DBT_QUEUED=10000
DBT_SENDERRORS=0
DBT_RECEIVED=9416
DBT_TIMEOUTS=584
DBT_UNEXPECTEDS=0
DBT_OKPERCENTAGE=92.31
DBT_OKPERCENTAGEINT=92