########### GENERAL SECTION ##################
BATCH_NAME=smalltest
CLIENTS_NUM_MAX=10
CLIENTS_NUM_START=1
CLIENTS_RAMPUP_INC=2
INTERFACE =eth0
NETMASK=255.255.255.0
IP_ADDR_MIN= 192.168.0.1
IP_ADDR_MAX= 192.168.0.255
CYCLES_NUM= -1
URLS_NUM= 1
########### URLs SECTION #######################
URL=http://targethost/somefile.html
URL_SHORT_NAME="somefile"
REQUEST_TYPE=GET
TIMER_URL_COMPLETION = 0
TIMER_AFTER_URL_SLEEP = 0结合curl-loader在终端的输出、log文件,以及Tomcat产生的log 三个方面,我进一步了解以下参数:
This name is used for the display while the curl\-loader is running, and also for the three generated files. This is a tag for the general section.
CLIENTS_NUM_MAX
The maximum number of clients to be used for this batch.
CLIENTS_NUM_START
the number of clients to use when the curl\-loader program is first started. If this number is less than the number specified by CLIENTS_NUM_MAX then the cur\-loader tool will add more clients every second. The number of new clients to add is specified by the CLIENTS_RAMPUP_INC
CLIENTS_RAMPUP_INC
the number of clients to add each second when the value of the CLIENTS_NUM_START tag is less than the value of the CLIENTS_NUM_MAX.This is a tag for the general section.
INTERFACE
This requires a valid interface name and specifies the interface that will be used for connecting to the server(s) specified in the URLs of the URL section. You can do:
ls /sys/class/net or run /sbin/ifconfig or /sbin/ip addr
to get the names of your network interfaces. Normally you would use something like eth0. This is a tag for the general section.
NETMASK
This requires a valid netmask as the value. For IPv4 you can use either a traditional dotted-quad specification like 255.255.255.0,or you you can use a CIDR number like 24. For IPv6 only CIDR values from 0 to 128 are supported. This is a tag for the general section.
IP_ADDR_MIN
This requires a valid IP address as the value. This is the first address to use and the first client you create will use this as its source address. The tool supports two operating modes. In the first mode, a secondary IP is used for each client and added to the network interface. The first client gets IP_ADDR_MIN, then each new client will increment this by one and use that address, until the IP_ADDR_MAX is reached and the address will wrap back to IP_ADDR_MIN. In the second mode, you specify the only IP, optionally to be the real address for the interface specified in the INTERFACE tag, and you use it for IP_ADDR_MIN and IP_ADDR_MAX and all clients use the only IP-address. This is a tag for the general section.
作为第一个visual client的IP地址。有两种模式:
- 每新增一个client,都会将IP地址自增1,直至IP_ADDR_MAX;
- 使用当前的真实IP,IP_ADDR_MIN和IP_ADDR_MAX都是这个IP地址,所有的client都使用同一个IP
This requires a valid IP address as the value. This is the last address from your address pool.
CYCLES_NUM
This requires a valid signed integer value. This is the number of cycles to be performed. If the value is
============ loading batch is: appletest ======================================
--------------------------------------------------------------------------------
Interval stats (latest:3 sec, clients:2, CAPS-curr:1):
H/F Req:3,1xx:0,2xx:3,3xx:0,4xx:0,5xx:0,Err:0,T-Err:0,D:857ms,D-2xx:857ms,Ti:12050B/s,To:152B/s
H/F/S Req:0,1xx:0,2xx:0,3xx:0,4xx:0,5xx:0,Err:0,T-Err:0,D:0ms,D-2xx:0ms,Ti:0B/s,To:0B/s
--------------------------------------------------------------------------------
Summary stats (runs:3 secs, CAPS-average:2):
H/F Req:3,1xx:0,2xx:3,3xx:0,4xx:0,5xx:0,Err:0,T-Err:0,D:857ms,D-2xx:857ms,Ti:12050B/s,To:152B/s
H/F/S Req:0,1xx:0,2xx:0,3xx:0,4xx:0,5xx:0,Err:0,T-Err:0,D:0ms,D-2xx:0ms,Ti:0B/s,To:0B/s
=================================================================================
Automatic: adding 1 clients/sec. Stop inc and manual [M].
=================================================================================
URLS_NUM
This requires a valid unsigned integer value. This is the number of URLs in the URL section. This is a tag for the general section.
”之类的错误。
URL
This is the first tag of a URL subsection. It must be a valid URL supported by the curl\-loader tool. Valid URLs for downloading with curl\-loader must start with "http://", "https://", or "ftp://". The one exception
to this rule is when the URL is blank because the URL_USE_CURRENT is included and set to 1 in this URL section. Upload URLs will need to have a file name, but download URLs can end with a "/".This is a tag for the URL section.
URL_SHORT_NAME
This optional tag requires an ASCII string with at most 12 characters.It is used for the operational statistics display while the curl-loader tool is running.This is a tag for the URL section.
显示在appletest.ops的Operation Name栏中。如:URL0:local-index
REQUEST_TYPE
This tag is required for all http and https URLs. It requires a string value of "GET", "POST", or "PUT". URLs for ftp should not use this tag.This is a tag for the URL section.
请求类型:GET POST PUT――额,GET、POST 请求都好说,但PUT请求我之前没有实现过,只是看REST文章时有点印象。OK,贴个链接来扫盲(http://www.hackbase.com/tech/2011-04-28/63500.html Get、POST、PUT三者的区别)
TIMER_URL_COMPLETION
This optional tag requires an unsigned integer value. This specifies the time in milliseconds to wait for a url fetching operation to complete.If the value is 0, this means there is no time limit enforced.
If the value is greater than 0, then if the fetch is not completed in that amount of time, the fetch is cancelled and is considered a time out.Values between 1 and 19 should not be used because the operating system and curl-loader cannot enforce such short timers.This is a tag for the URL section.
官方描述得很清楚了,它是定义完成时间的。若为零,则没有时间限制;且不能在1到19之间取值。
TIMER_AFTER_URL_SLEEP
This optional tag requires an unsigned integer value. This specifies the time in milliseconds for a client to sleep after finishing a fetch. The value 0 means do not sleep at all, but instead immediately continue.
Random timer values could be an option specified as e.g. 0-2000,which means, that a client will sleep for some random time from 0 to 2000 milliseconds.This is a tag for the URL section.
这个也不用多说――休眠时间。若为零,则完全没有休眠时间;取值范围在0到2000毫秒