본문 바로가기

리눅스/명령어

Siege 명령어

728x90
반응형

Siege 명령어

Siege 현재 설정 확인

siege -C
$ siege -C
CURRENT  SIEGE  CONFIGURATION
Mozilla/5.0 (redhat-x86_64-linux-gnu) Siege/4.1.1
Edit the resource file to change the settings.
----------------------------------------------
version:                        4.1.1
verbose:                        true
color:                          true
quiet:                          false
debug:                          false
protocol:                       HTTP/1.1
HTML parser:                    enabled
get method:                     HEAD
connection:                     close
concurrent users:               25
time to run:                    n/a
repetitions:                    n/a
socket timeout:                 30
cache enabled:                  false
accept-encoding:                gzip, deflate
delay:                          0.000 sec
internet simulation:            false
benchmark mode:                 false
failures until abort:           1024
named URL:                      none
URLs file:                      /etc/siege/urls.txt
thread limit:                   2048
logging:                        false
log file:                       /root/siege.log
resource file:                  /root/.siege/siege.conf
timestamped output:             false
comma separated output:         false
allow redirects:                true
allow zero byte data:           true
allow chunked encoding:         true
upload unique files:            true
json output:                    false
no-follow:
 - ad.doubleclick.net
 - pagead2.googlesyndication.com
 - ads.pubsqrd.com
 - ib.adnxs.com
proxy auth:                     
www auth:

Siege 옵션 및 사용 방법 확인

Usage: siege [options]
       siege [options] URL

Options:
  -V, --version             VERSION, prints the version number.
  -h, --help                HELP, prints this section.
  -C, --config              CONFIGURATION, show the current config.
  -v, --verbose             VERBOSE, prints notification to screen.
  -q, --quiet               QUIET turns verbose off and suppresses output.
  -g, --get                 GET, pull down HTTP headers and display the transaction.
  -p, --print               PRINT, like GET only it prints the entire page.
  -c, --concurrent=NUM      CONCURRENT users, default is 10
  -i, --internet            INTERNET user simulation, hits URLs randomly.
  -b, --benchmark           BENCHMARK: no delays between requests.
  -t, --time=NUMm           TIMED testing where "m" is modifier S, M, or H
                            ex: --time=1H, one hour test.
  -r, --reps=NUM            REPS, number of times to run the test.
  -f, --file=FILENAME       FILE, select a specific URLS FILE.
  -R, --rc=FILE             RC, specify an siegerc file
  -l, --log[=FILE]          LOG to FILE. If FILE is not specified, the default is used:
                            ~/.siege/siege.log
  -m, --mark="text"         MARK, mark the log file with a string.
                            between .001 and NUM. (NOT COUNTED IN STATS)
  -H, --header="text"       Add a header to request (can be many)
  -A, --user-agent="agent"  Sets User-Agent in request
  -T, --content-type="text" Sets Content-Type in request
  -d, --data="text"         HTTP POST data
  -j, --json="text"         HTTP POST json
  -g, --get                 GET, pull down HTTP headers and display the transaction.
  -D, --delay=NUM           Time DELAY, random delay before each requst between 0 and
                            NUM. (NOT COUNTED IN STATS)
  -n, --retries=NUM         Retries with connection failure or timeout error code.
  -N, --no-parser           NO PARSER, turn off the HTML page parser.
  -R, --reload              RELOAD, retrive every URL. Time delay (--delay) is still honored.
  -s, --internet            INTERNET user simulation, hits URLs randomly.
  -u, --user="USER:PASS"    Basic authentication, supply USER:PASSword encoded in base64.
  -x, --proxy-host=HOST     HTTP Proxy host (overrides system)
  -y, --proxy-port=PORT     HTTP Proxy port (overrides system)
  -z, --proxy-user=USER     Proxy user and password, separated by a colon ':'
  -V, --version             VERSION, prints the version number.
  -h, --help                HELP, prints this section.

Example:
    siege -c 10 -t30S http://localhost:8080/

 

siege -c 1 -r 1 https://google.com -j
$ siege -c 1 -r 1 https://google.com -j  

{
        "transactions":                            1,
        "availability":                       100.00,
        "elapsed_time":                         0.02,
        "data_transferred":                     0.00,
        "response_time":                        0.02,
        "transaction_rate":                    50.00,
        "throughput":                           0.00,
        "concurrency":                          1.00,
        "successful_transactions":                 1,
        "failed_transactions":                     0,
        "longest_transaction":                  0.02,
        "shortest_transaction":                 0.02
}

 

siege -c 50 -r 1 https://google.com -j
$ siege -c 50 -r 1 https://google.com -j  

{
        "transactions":                           50,
        "availability":                       100.00,
        "elapsed_time":                         0.10,
        "data_transferred":                     0.00,
        "response_time":                        0.08,
        "transaction_rate":                   500.00,
        "throughput":                           0.00,
        "concurrency":                         39.00,
        "successful_transactions":                50,
        "failed_transactions":                     0,
        "longest_transaction":                  0.09,
        "shortest_transaction":                 0.07
}
728x90
반응형