è² è·ãã¹ããæ°è»½ã«è¡ããsiegeã§ã¡ãã£ã¨ããã£ã
siege: version 3.0.9
TL;DR
httpsã®ãªã¯ã¨ã¹ãã®éã«ããã¨ãããã¨ããããªãã¦ãlddã§è¦ãã
opensslã®ã©ã¤ãã©ãªèªã¿è¾¼ãã§ãªãã£ãã
Siege
詳ããã¯ä¸è¨URLãåç §ãã¦ãã ããã
kappa大å
çã®è¨äºãè¦ã¦ãããããããï¼ã£ã¦ãªã£ã¦å°å
¥ããã
è² è·ãã¹ããããããµã¼ããä»ã§ã¯AWSã®ã¹ãããã¤ã³ã¹ã¿ã³ã¹ãå©ç¨ããã°
c3.4xlargeã$0.5/hã§åããã¦æé«ã ã
ã¤ã³ã¹ãã¼ã«
# gccãå¿ è¦ãªã®ã§ã¤ã³ã¹ãã¼ã« $ yum install gcc $ wget http://download.joedog.org/siege/siege-3.0.9.tar.gz $ tar xzf siege-3.0.9.tar.gz $ cd siege-3.0.9 $ ./configure $ make -j 16 $ make install
HTTPSã«ã¤ãªãããªã?
$ siege -c 1 -t 2S http://example.com/ ** SIEGE 3.0.9 ** Preparing 1 concurrent users for battle. The server is now under siege... HTTP/1.1 200 0.69 secs: 5121 bytes ==> GET / HTTP/1.1 200 0.68 secs: 5123 bytes ==> GET / Lifting the server siege... done. Transactions: 0 hits Availability: 0.00 % Elapsed time: 1.00 secs Data transferred: 0.00 MB Response time: 0.00 secs Transaction rate: 0.00 trans/sec Throughput: 0.00 MB/sec Concurrency: 0.01 Successful transactions: 1 Failed transactions: 0 Longest transaction: 0.01 Shortest transaction: 0.01 FILE: /root/siege.log You can disable this annoying message by editing the .siegerc file in your home directory; change the directive 'show-logfile' to false. $
ã§ã¯å¿çããã®ã«
$ siege -c 1-t 2S https://example.com/ ** SIEGE 3.0.9 ** Preparing 1 concurrent users for battle. The server is now under siege... Lifting the server siege... done. Transactions: 0 hits Availability: 0.00 % Elapsed time: 4.68 secs Data transferred: 0.00 MB Response time: 0.00 secs Transaction rate: 0.00 trans/sec Throughput: 0.00 MB/sec Concurrency: 0.00 Successful transactions: 0 Failed transactions: 3 Longest transaction: 0.00 Shortest transaction: 0.00 FILE: /root/siege.log You can disable this annoying message by editing the .siegerc file in your home directory; change the directive 'show-logfile' to false. $
ãªã©ã¨Failedã«ãªã£ã¦ãã¾ã£ãã
æåãcookieã§èªè¨¼ãã¦ããã®ã§cookieã®æ¸¡ãæ¹ãæªãã£ãã®ãã¨æã£ãã
ãµã¨ã©ã¤ãã©ãªã¡ããã¨èªã¿è¾¼ãã§ããã®ãæ°ã«ãªã£ãã®ã§ç¢ºèªãã¦ã¿ãã
$ ldd /usr/local/bin/siege linux-vdso.so.1 => (0x00007fff0a7fe000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe27e031000) libc.so.6 => /lib64/libc.so.6 (0x00007fe27dc8c000) /lib64/ld-linux-x86-64.so.2 (0x00007fe27e253000) $
ãã...
ã¨ãããã¨ã§yum install openssl-devel
ããã¦ããå度ã¤ã³ã¹ãã¼ã«ããªããã
$ ldd /usr/local/bin/siege linux-vdso.so.1 => (0x00007fff3a561000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f77766e2000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f77764de000) libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f7776270000) libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f7775e8c000) libc.so.6 => /lib64/libc.so.6 (0x00007f7775ae7000) /lib64/ld-linux-x86-64.so.2 (0x00007f7776904000) libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f77758a3000) libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f77755be000) libcom_err.so.2 => /usr/lib64/libcom_err.so.2 (0x00007f77753bb000) libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f777518f000) libz.so.1 => /lib64/libz.so.1 (0x00007f7774f79000) libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f7774d6e000) libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f7774b6a000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f7774953000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f777473d000) libselinux.so.1 => /usr/lib64/libselinux.so.1 (0x00007f777451b000) $
ãããè²ã èªã¿è¾¼ãã§ãã
æ¹ãã¦ç¢ºèª
$ siege -c 1 -t 3S https://example.com/ ** SIEGE 3.0.9 ** Preparing 1 concurrent users for battle. The server is now under siege... HTTP/1.1 200 0.78 secs: 5119 bytes ==> GET / Lifting the server siege... done. Transactions: 1 hits Availability: 100.00 % Elapsed time: 2.89 secs Data transferred: 0.00 MB Response time: 0.78 secs Transaction rate: 0.35 trans/sec Throughput: 0.00 MB/sec Concurrency: 0.27 Successful transactions: 1 Failed transactions: 0 Longest transaction: 0.78 Shortest transaction: 0.78 FILE: /root/siege.log You can disable this annoying message by editing the .siegerc file in your home directory; change the directive 'show-logfile' to false. $
ç¡äºã¬ã¹ãã³ã¹ãåå¾ãããã¨ãã§ããã
cookieã®æ¸¡ãæ¹
--header="Cookie: k=v; k=v;"
ã¿ãããªæ¸¡ãæ¹ã§ãããã
$ siege -c 1 -t 3S https://example.com/ --header="Cookie: key_one=value_one; domain=.example.com; path=/; expires=Fri, 13 Feb 2015 16:41:26 -0000; key_two=value_two; path=/;"
ãã¡ãããã¯ä»¥ä¸ã§ãã