Difference between revisions of "Curl-loader: Install di Ubuntu"

From OnnoWiki
Jump to navigation Jump to search
Line 25: Line 25:
  
  
 +
==Instalasi==
  
 +
Lakukan
  
 +
cd /usr/local/stc
 +
bunzip2 curl-loader-0.56.tar.bz2
 +
tar xvf curl-loader-0.56.tar
 +
cd /usr/local/src/curl-loader-0.56/
 +
make
 +
make install
  
 +
mkdir -p /usr/bin
 +
mkdir -p /usr/share/man/man1
 +
mkdir -p /usr/share/man/man5
 +
mkdir -p /usr/share/doc/curl-loader/
 +
cp -f curl-loader /usr/bin
 +
cp -f doc/curl-loader.1 /usr/share/man/man1/ 
 +
cp -f doc/curl-loader-config.5 /usr/share/man/man5/
 +
cp -f doc/* /usr/share/doc/curl-loader/
 +
cp -rf conf-examples /usr/share/doc/curl-loader/
  
download the source code ( curl-loader-0.56.tar.bz2 ) and compile that.
+
==Ubah Sysctl==
# bunzip2 curl-loader-0.56.tar.bz2
 
  
# tar xvf curl-loader-0.56.tar
+
ulimit -n 10000
 +
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse
  
# cd curl-loader-0.56/
+
==Contoh Konfigurasi==
  
# make
+
ls curl-loader-0.56/conf-examples/
  
# make install
+
  10K.conf                          https.conf
mkdir -p /usr/bin
+
60K.conf                          ipv6.conf
mkdir -p /usr/share/man/man1
+
bax-login-logoff-noncycling.conf  log-hdr-body.conf
mkdir -p /usr/share/man/man5
+
bax-logs.conf                    login-uas-cycling.conf
mkdir -p /usr/share/doc/curl-loader/
+
bax.conf                          login-uas-logoff-cycling.conf
cp -f curl-loader /usr/bin
+
big-load.conf                    multipart-formdata-post.conf
cp -f doc/curl-loader.1 /usr/share/man/man1/  
+
bulk-dual-url.conf                post-form-tokens-fr-file.conf
cp -f doc/curl-loader-config.5 /usr/share/man/man5/
+
bulk.conf                        post-xml.conf
cp -f doc/* /usr/share/doc/curl-loader/
+
credentials.cred                  put.conf
cp -rf conf-examples /usr/share/doc/curl-loader/
+
custom-hdrs.conf                  random_file_records.conf
 
+
delete.conf                      rate-limit.conf
QUICK-START file describes that some tuning tips and sample usage.
+
fetch-probability-once.conf      resp-errors.conf
# ulimit -n 10000
+
fetch-probability.conf            some.xml
# echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse
+
ftp-http.conf                    timers-random-range.conf
 
+
ftp-upload.conf                  url-randomize.conf
sample configurations
+
ftp.conf                          url-template-file.txt
# ls curl-loader-0.56/conf-examples/
+
get-forms.conf                    url-template-fr-file.conf
10K.conf                          https.conf
+
get-post-login-cycling.conf      url-template-resp-dynamic.conf
60K.conf                          ipv6.conf
+
get-post-login.conf
bax-login-logoff-noncycling.conf  log-hdr-body.conf
 
bax-logs.conf                    login-uas-cycling.conf
 
bax.conf                          login-uas-logoff-cycling.conf
 
big-load.conf                    multipart-formdata-post.conf
 
bulk-dual-url.conf                post-form-tokens-fr-file.conf
 
bulk.conf                        post-xml.conf
 
credentials.cred                  put.conf
 
custom-hdrs.conf                  random_file_records.conf
 
delete.conf                      rate-limit.conf
 
fetch-probability-once.conf      resp-errors.conf
 
fetch-probability.conf            some.xml
 
ftp-http.conf                    timers-random-range.conf
 
ftp-upload.conf                  url-randomize.conf
 
ftp.conf                          url-template-file.txt
 
get-forms.conf                    url-template-fr-file.conf
 
get-post-login-cycling.conf      url-template-resp-dynamic.conf
 
get-post-login.conf
 
  
 
Let’s use curl-loader!
 
Let’s use curl-loader!
Line 83: Line 83:
  
  
i# grep -v ^# my_bulk.conf
+
# grep -v ^# my_bulk.conf
  
 
BATCH_NAME= bulk   
 
BATCH_NAME= bulk   

Revision as of 13:08, 7 June 2015

Instalasi curl-loader

Cek Versi

uname -ri; tail -1 /etc/lsb-release
3.13.0-24-generic x86_64
DISTRIB_DESCRIPTION="Ubuntu 14.04 LTS"

Instalasi Aplikasi Pendukung

apt-get install libssl-dev build-essential


Download curl-loader

Dari

http://curl-loader.sourceforge.net/

Atau

cd /usr/local/src
wget http://sourceforge.net/projects/curl-loader/files/curl-loader-stable/curl-loader-0.56/curl-loader-0.56.tar.bz2


Instalasi

Lakukan

cd /usr/local/stc
bunzip2 curl-loader-0.56.tar.bz2
tar xvf curl-loader-0.56.tar
cd /usr/local/src/curl-loader-0.56/
make
make install
mkdir -p /usr/bin
mkdir -p /usr/share/man/man1
mkdir -p /usr/share/man/man5
mkdir -p /usr/share/doc/curl-loader/
cp -f curl-loader /usr/bin
cp -f doc/curl-loader.1 /usr/share/man/man1/  
cp -f doc/curl-loader-config.5 /usr/share/man/man5/
cp -f doc/* /usr/share/doc/curl-loader/
cp -rf conf-examples /usr/share/doc/curl-loader/

Ubah Sysctl

ulimit -n 10000
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse

Contoh Konfigurasi

ls curl-loader-0.56/conf-examples/
10K.conf                          https.conf
60K.conf                          ipv6.conf
bax-login-logoff-noncycling.conf  log-hdr-body.conf
bax-logs.conf                     login-uas-cycling.conf
bax.conf                          login-uas-logoff-cycling.conf
big-load.conf                     multipart-formdata-post.conf
bulk-dual-url.conf                post-form-tokens-fr-file.conf
bulk.conf                         post-xml.conf
credentials.cred                  put.conf
custom-hdrs.conf                  random_file_records.conf
delete.conf                       rate-limit.conf
fetch-probability-once.conf       resp-errors.conf
fetch-probability.conf            some.xml
ftp-http.conf                     timers-random-range.conf
ftp-upload.conf                   url-randomize.conf
ftp.conf                          url-template-file.txt
get-forms.conf                    url-template-fr-file.conf
get-post-login-cycling.conf       url-template-resp-dynamic.conf
get-post-login.conf

Let’s use curl-loader!

curl-loader 10.0.0.10 ---- 10.0.0.20 apache

make load profile.

  1. cp /usr/share/doc/curl-loader/conf-examples/bulk.conf ./my_bulk.conf


  1. grep -v ^# my_bulk.conf

BATCH_NAME= bulk CLIENTS_NUM_MAX=200 # Same as CLIENTS_NUM CLIENTS_RAMPUP_INC=5 INTERFACE =eth1 NETMASK=8 IP_ADDR_MIN= 10.0.0.100 IP_ADDR_MAX= 10.0.0.200 IP_SHARED_NUM=3 CYCLES_NUM= -1 URLS_NUM= 1


URL=http://10.0.0.20 REQUEST_TYPE=GET TIMER_URL_COMPLETION = 5000 TIMER_AFTER_URL_SLEEP = 500

run test

  1. curl-loader -f ./my_bulk.conf

check access logs. HTTP accesses coming from multiple clients root@ubuntu1404-vm2:~# tail -5 /var/log/apache2/access.log 10.0.0.101 - - [01/Sep/2014:23:40:58 +0900] "GET / HTTP/1.1" 200 11764 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" 10.0.0.102 - - [01/Sep/2014:23:40:58 +0900] "GET / HTTP/1.1" 200 11764 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" 10.0.0.100 - - [01/Sep/2014:23:40:58 +0900] "GET / HTTP/1.1" 200 11764 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" 10.0.0.100 - - [01/Sep/2014:23:40:58 +0900] "GET / HTTP/1.1" 200 11764 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" 10.0.0.101 - - [01/Sep/2014:23:40:58 +0900] "GET / HTTP/1.1" 200 11764 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"

Referensi