I want to run apache benchmark the which is listed after userid logged in.
How can i pass this session to ab command ?
For example, x user is logged in though browser and he is redirected to his home profile page. Profile page has so many links, that will be shown only user is logged in. How can i access these links using "ab" command.
ab -n10 -c2 -p post_data.txt https://integration.crossroads.net/index.php (I posted some data using ab, it worked fine for me) .
In order to do that you should create a session using browser, after that, assuming you're using standard techniques (i.e. sessions and session cookies) you'll be able to grab the cookie sent to your app containing the session id, something like
PHPSESSID=isldkdkkd8989s9f8
which can be found using firebug or your browser cookies inspector.
Having that information you can pass it to ab
command with -C
option and Apache Benchmark will act as a logged user
ab -n10 -c2 -p post_data.txt -C PHPSESSID=isldkdkkd8989s9f8 https://integration.crossroads.net/index.php
P.S. As Jaitsu said you should accept right answers to your questions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With