RE: [PHP] sending a large number of connections at the same time
| From: | o dot cook at etoncollege dot org dot uk | Date: | Wed, 16 Aug 2000 12:57:54 +0000 |
| Subject: | RE: [PHP] sending a large number of connections at the same time | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-11978@lists.php.net to get a copy of this message | ||
Assuming you're using Apache as your webserver, try ApacheBench.
It's as /home/src/apache_1.3.12/src/support/ab on my system. So just look
thru your source dictory.
It's options are as follows:
marley:/home/src/apache_1.3.12/src/support# ab -h
Usage: ab [options] [http://]hostname[:port]/path
Options are:
-n requests Number of requests to perform
-c concurrency Number of multiple requests to make
-t timelimit Seconds to max. wait for responses
-p postfile File containg data to POST
-T content-type Content-type header for POSTing
-v verbosity How much troubleshooting info to print
-w Print out results in HTML tables
-i Use HEAD instead of GET
-x attributes String to insert as table attributes
-y attributes String to insert as tr attributes
-z attributes String to insert as td or th attributes
-C attribute Add cookie, eg. 'Apache=1234. (repeatable)
-H attribute Add Arbitrary header line, eg. 'Accept-Encoding: zop'
Inserted after all normal header lines. (repeatable)
-A attribute Add Basic WWW Authentication, the attributes
are a colon separated username and password.
-p attribute Add Basic Proxy Authentication, the attributes
are a colon separated username and password.
-V Print version number and exit
-k Use HTTP KeepAlive feature
-h Display usage information (this message)
So you would want "ab -n 100 -c 100 http://www.yourserver.com/" or something
similar.
I hope that's of use.
Ollie
-----------------------------------
Ollie Cook +44 (7946) 057 198
Programmer, XCalibre Communications
-----------------------------------
> -----Original Message-----
> From: Denis Bourdon [mailto:dbourdon@dbourdon.com]
> Sent: 16 August 2000 13:45
> To: php-general@lists.php.net
> Subject: [PHP] sending a large number of connections at the same time
>
>
> Hello!
>
> I'd like to test the site I have created and I want to make
> 100 or so
> connections to my http://localhost.
>
> Making a 'for' loop with
> fopen("http://localhost","r")
> simulates 100
> connections that are succesive and not simultaneous.
>
> Any idea? I thought of a shell script, but no idea to write
> it... And it's
> pretty urgent... Thanks!
>
> Den.
>
> --
> Denis Bourdon - dbourdon@dbourdon.com
> Etudiant a Telecom Grenoble ENSIMAG/ENSERG
> site personnel: www.dbourdon.com
> webmaster de l'espace etudiants de Telecom Grenoble:
> www-telecoms.imag.fr/etudiants
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>