LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   shell script for stress testing (https://www.linuxquestions.org/questions/programming-9/shell-script-for-stress-testing-230298/)

blackzone 09-13-2004 09:10 PM

shell script for stress testing
 
need to write a script to stress test a dns server.

mainly just keep sending "dig @127.0.0.3 test.example.com" and see how many returned.

my question is not sure how to count it?

I'm thinking maybe send it to a file? dig @127.0.0.3 test.example.com>>file
and count how many returned. Can anyone help on this?

ilikejam 09-13-2004 10:14 PM

What does the dig command return for the DNS server you're using?

blackzone 09-13-2004 10:35 PM

dig basically is like nslookup.

right now I just print out the date before and after query and check how many query I can do in a second

ilikejam 09-14-2004 12:00 AM

I've thought of something better that what I was originally thinking of (I was originally going to grep a dump of all the outputs from the requests...):

do:
Code:

time for ((a=1; a <= 1000; a++)); do dig @127.0.0.3 test.example.com; done
That will tell you how long it took to do 1000 dig requests in a row.

Dave


All times are GMT -5. The time now is 06:30 PM.