hasen's tech life

Twitter: @hasen

コマンドabで"ab: invalid URL"というエラーが出たので対応.

# コマンドabで"ab: invalid URL"というエラーが出たので対応.

# error
$ ab -k -n 5000 -c 100 -g test.txt http://192.168.33.13
> ab: invalid URL
> Usage: ab [options] [http[s]://]hostname[:port]/path
> Options are:
> ... (略)

# success
# URLにパスが必要だったので,末尾にスラッシュを追加.
$ ab -k -n 5000 -c 100 -g test.txt http://192.168.33.13/
> This is ApacheBench, Version 2.3 <$Revision: 655654 $>
> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
> Licensed to The Apache Software Foundation, http://www.apache.org/
>
> Benchmarking 192.168.33.13 (be patient)
> ... (略)