Curl-loader: Install di Ubuntu
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
cd /usr/local/src ls curl-loader-0.56/conf-examples/
10K.conf delete.conf ipv6.conf resp-errors.conf 60K.conf fetch-probability.conf log-hdr-body.conf some.xml bax.conf fetch-probability-once.conf login-uas-cycling.conf timers-random-range.conf bax-login-logoff-noncycling.conf ftp.conf login-uas-logoff-cycling.conf url-randomize.conf bax-logs.conf ftp-http.conf multipart-formdata-post.conf url-template-file.txt big-load.conf ftp-upload.conf post-form-tokens-fr-file.conf url-template-fr-file.conf bulk.conf get-forms.conf post-xml.conf url-template-resp-dynamic.conf bulk-dual-url.conf get-post-login.conf put.conf credentials.cred get-post-login-cycling.conf random_file_records.conf custom-hdrs.conf https.conf rate-limit.conf
Membuat konfigurasi sendiri
cd /usr/local/src/curl-loader-0.56/conf-examples cp bulk.conf ~ cd ~
Edit bulk.conf
vi bulk.conf
Isi dengan
########### GENERAL SECTION ################################ BATCH_NAME= bulk CLIENTS_NUM_MAX=200 # Same as CLIENTS_NUM #CLIENTS_NUM_START=10 CLIENTS_RAMPUP_INC=5 INTERFACE=eth1 NETMASK=24 IP_ADDR_MIN= 192.168.0.90 IP_ADDR_MAX= 192.168.0.99 IP_SHARED_NUM=10 CYCLES_NUM= -1 URLS_NUM= 1 ########### URL SECTION #################################### URL=http://192.168.0.80/wiki/index.php/Main_Page #URL=http://localhost/apache2-default/ACE-INSTALL.html #URL=http://localhost/ACE-INSTALL.html URL_SHORT_NAME="local-apache" REQUEST_TYPE=GET TIMER_URL_COMPLETION = 5000 TIMER_AFTER_URL_SLEEP = 500
Set ifconfig
ifconfig eth0:90 192.168.0.90 ifconfig eth0:91 192.168.0.91 ifconfig eth0:92 192.168.0.92 ifconfig eth0:93 192.168.0.93 ifconfig eth0:94 192.168.0.94 ifconfig eth0:95 192.168.0.95 ifconfig eth0:96 192.168.0.96 ifconfig eth0:97 192.168.0.97 ifconfig eth0:98 192.168.0.98 ifconfig eth0:99 192.168.0.99
run test
- 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)"