您的位置:首页 > 其它

autobench的使用过程中遇到的一点错误

2012-12-26 10:21 423 查看
1.autobench运行时出现错误提示(安装了httperf之后):

httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE

解决:更改文件的配置

文件1 : /etc/security/limits.conf 由于最新的版本 * hard nofile 65535 这一项都是65535,因此可以不用改了,有人把它改成了102400.

文件2 : /usr/include/bits/typesizes.h将 #define __FD_SET_SIZE 1024 的1024修改为65535就可以了,有人把他也修改成102400

以上2个文件修改之后,需要重新编译httperf

2.bench2graph按照文档里的命令(bench2graph results.tsv results.ps 3 5 6)生成的图片无法打开

解决: cp /usr/local/bin/bench2graph /usr/local/bin/bench2png (为了不改变源码的内容,直接复制了一份)

sed -i 's/postscript color/png xffffff/g' /usr/local/bin/bench2png

命令执行以后,图片皆可显示!

3.防火墙阻止访问发生的错误:failed: No route to host at /usr/local/bin/autobench_admin

解决:关闭防火墙,/etc/init.d/iptables status 查看防火墙状态;/etc/init.d/iptables stop 暂时关闭防火墙

永久关闭防火墙:chkconfig --level 35 iptables off

一个示例:

autobench_admin --single_host --host1 192.168.1.5 --uri1 /jiazhuang --clients 192.168.1.5:4600,192.168.1.30:4600,192.168.1.147:4600 --quiet --low_rate 10 high_rate 80 --rate_step 10 --num_call 10 --num_conn 800
--timeout 5 --file tet.tsv --verbose --debug

一个示例:

autobench --single_host --host1 hostname --uri1 / --quiet --low_rate 100 --high_rate 100 --rate_step 1 --const_test_time 1800 --timeout 5 --file output.tsv --num_call 10

(Benchmark parameters: 100 connections per second, 10 requests per connection, 1800 seconds)

图片转换:

bench2png /tmp/autobench.tsv /tmp/results.jpg 1 2 3 4 5 6

OPTIONS

Note that all of the options below with the exception of --quiet may also be used with autobench_admin.

--file filename

Send output to filename instead of STDOUT

--high_rate hrate

The number of connections per second to open at the end of the test

--low_rate lrate

The number of connections per second to open at the start of the test

--rate_step step

autobench runs httperf numerous times against the target machines, starting at lrate connections per second, increasing the number of connections

per second requested by step until hrate is reached.

--host1 hostname

The hostname of the first server under test

--host2 hostname

The hostname of the second server under test (ignored if --single_host is specified)

--port1 port

The port number on which host1’s server is listening

--port2 port

The port number on which host2’s server is listening (ignored if --single_host is specified)

--num_conn nconn

nconn is the number total number of connections to open per test

--const_test_time length

Used instead of --num_conn, this causes autobench to calculate a value for nconn for each test to make the test last length seconds. It is

recommended that this be used instead of --num_conn. For each test, nconn is set to (current_rate * length). Note that no results will be

obtained if length is set to less than 10 seconds (since httperf samples only once every 10 seconds), and meaningful results (reproducible

results derived from a significant number of samples) will require each test to last at least 60 seconds. Use low values to gain a feel for the

performance of the servers under test and to find appropriate values for --low_rate and --high_rate, and much higher values (at least 300 seconds

for serious benchmarking) to obtain accurate results.

--num_call ncall

specifies the number of requests to send down each connection. (Total number of requests per second = current rate * ncall.)

--output_fmt tsv|csv

Set the output format to either CSV or TSV

--quiet

Don’t display httperf output on STDOUT. This option should always be used if --file is not specified, since the httperf output will otherwise

break up the results table.

--single_host

Only test a single server

--timeout time

time is the time in seconds for which httperf will wait for a response from the server - responses received after this time will be counted as

errors.

--uri1 uri

The URI to test on the first server (eg. /foo/bar/index.html)

--uri2 uri

The URI to test on the second server

--debug

Print additional debugging information on stderr

--version

Returns the current version

EXAMPLES

Notice that in each of the examples below, configuration options not specified on the command line will be taken from the configuration file

($HOME/.autobench.conf)

autobench --single_host --host1 testhost.foo.com --uri1 /index.html --quiet --file bench.tsv

Benchmark testhost.foo.com using the URI /index.html, don’t display httperf output on STDOUT, and save the results in ’bench.tsv’.

autobench --host1 test1.foo.com --host2 test2.foo.com --uri1 /10k.txt --uri2 /10k.txt --rate_step 50 --quiet

Conduct a comparative test of test1.foo.com and test2.foo.com, increasing the requested number of connections per second by 50 on each iteration.

Output will go to STDOUT.

ADDITIONAL HTTPERF OPTIONS

Additional options may be passed to httperf by including them in the configuration file $HOME/.autobench.conf prefixed with "httperf_", as in the

example below. Options that don’t take arguments may be specified by assigning them a value of NULL. The following lines add ’--add-header

"Authorization: Basic cm9iOjBjdGFuZQ==" --ssl --print-reply body --print-request header’ to the httperf command line, for example.

httperf_add-header = "Authorization: Basic cm9iOjBjdGFuZQ=="

httperf_ssl = NULL

httperf_print-reply = body

httperf_print-request = header

FILES

[/usr/local]/etc/autobench.conf

Default configuration file, copied into the user’s home directory when autobench or autobench_admin is first run. Defaults to

/etc/autobench.conf if autobench was installed from the Debian package, /usr/local/etc/autobench.conf otherwise

$HOME/.autobench.conf

The active autobench configuration file.

ERRORS

If zero replies are received for any reason, autobench will print the message: "Zero replies received, test invalid: rate <r>" to stderr where <r> will

be the rate at which the problem occurred. The output will also contain an error percentage of 101 for that rate.

SEE ALSO

autobench_admin(1), autobenchd(1), httperf(1), crfile(1), bench2graph(1)

The Linux HTTP Benchmarking HOWTO at
http://www.xenoclast.org/doc/benchmark/
has further examples of the use of autobench.

AUTHOR

Julian T. J. Midgley <jtjm@xenoclast.org>

NAME

autobenchd - distributed autobench daemon

SYNOPSIS

autobenchd [--port port] [--bindaddr bindaddr] [--verbose] [--debug]

DESCRIPTION

autobenchd listens on the port and IP address specified on the command line (defaulting to port 4600 and INADDR_ANY if the command line options are

omitted), and waits for commands from autobench_admin. When it receives these commands, it conducts a benchmark using httperf with the arguments speci-

fied by autobench_admin, parses the httperf results and returns a summary to autobench_admin. autobench_admin collates the results from several

instances of autobenchd running on different machines, and writes the collated results to a file for analysis.

OPTIONS

--port port

Listen on port port. Defaults to 4600 if omitted.

--bindaddr bindaddr

Bind to the address bindaddr, which may be given as either an IP address or hostname. INADDR_ANY may be specified as ‘0.0.0.0′. Defaults to

INADDR_ANY if omitted.

--verbose

Enable verbose output, which logs progress to stderr (perhaps --speak would be a better name, since autobenchd is completely silent in normal

operation).

--debug

Send additional debugging output to stderr, including the raw results returned by httperf.

EXAMPLE

autobenchd --port 1234 --bindaddr 123.123.123.213 --verbose

Starts autobenchd on port 1234, bound to 123.123.123.213, with progress reporting enabled.

SEE ALSO

autobench_admin(1), httperf(1)

AUTHOR

Julian T. J. Midgley <jtjm@xenoclast.org>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: