- There is a minor bug in it, that doesn't affect functionality so much as the "logging". I used a global var like a dummy and then reference that in the threads.
- I also added a 3rd command line param to tell the script how many times each thread should run through the list of URL's.
- I also added a sleep() feature so each thread will pause between each run through the list of URL's. Right now that is just a global var instead of a command line param.
On a related note, I wanted to do a better simulation of the types of requests coming through to our prod box. My clever idea, take the actual requests out of Apache's access_log or (in my case) ssl_request_log.
So how to easily grab all those requests to build my file? The format of my ssl_request_log looks a bit like this (some stuff renamed to protect the innocent):
[08/Aug/2007:14:42:23 -0400] 22.214.171.124 SSLv3 RC4-MD5 "GET /appcontext/en/US/CZN2/css/main.css HTTP/1.1" -
Well I just want the URI starting after the GET, so from the Linux/Unix/Cygwin command line do something like this....
This is much easier than sitting here trying to piece together URL's by hand.