0

I'm using siege to locate some problem pages on our new sitemap and am having trouble getting it to stop after it runs through the urls.txt file. I have tried using reps=once in the command line, as well as in the .siegerc config file. I find that I have to use the config file, as I want the output written verbosely to a log file so that I can see page load times, 302 and 404 errors, etc. and import them into excel. However, no matter what I try I cannot get siege to stop when it completes the url.txt file- it just reruns it over again. I have configured for 40 concurrent users, the time and reps variable is commented out in config, the url.txt file is in config. The syntax I run at cmd line is... sudo siege --reps=once -v > outputfile.csv

I have tried setting the reps in config, no luck. Any ideas where I'm going wrong?

  • can you please show us your effort? – Enamul Hassan Jan 22 '16 at 17:49
  • Well, I set the .siegerc file to reps = 1, that didn't work. I set it to reps = once, that didnt work either. I had the time value commented out on both. I tired specifying one rep both ways via the command line- that didn't work. My urls.txt file consists of a sitemap, 9070 urls and siege is indeed hitting all of them, but once it reaches the end it seems to just start over because my log file just keeps growing until I break the operation. – SickoPsycho Jan 23 '16 at 19:44

1 Answers1

2

I ran into similar problems and trying multiple options I got it to work with:

# siege -c 10 -b -r 10 -f urls.txt

where urls.txt is a simple list of URLs like

http://ip-address/url1.html
http://ip-address/url2.html
....
....

The logs were written into a file specified in the siegerc file. ${HOME}/var/siege.log

2016-08-05 17:52:59,    100,       0.88,           4,       0.09,      113.64,        4.55,        9.67,     100,       0
2016-08-05 17:53:00,    100,       0.91,           4,       0.09,      109.89,        4.40,        9.76,     100,       0
2016-08-05 17:53:01,    100,       0.90,           4,       0.09,      111.11,        4.44,        9.78,     100,       0
2016-08-05 17:53:02,    100,       0.89,           4,       0.09,      112.36,        4.49,        9.64,     100,       0
2016-08-05 17:53:03,    100,       0.86,           4,       0.08,      116.28,        4.65,        9.84,     100,       0
2016-08-05 17:53:04,    100,       0.89,           4,       0.09,      112.36,        4.49,        9.80,     100,       0
2016-08-05 17:53:05,    100,       0.88,           4,       0.09,      113.64,        4.55,        9.83,     100,       0
2016-08-05 17:53:06,    100,       0.88,           4,       0.09,      113.64,        4.55,        9.89,     100,       0
2016-08-05 17:53:07,    100,       0.87,           4,       0.09,      114.94,        4.60,        9.79,     100,       0
2016-08-05 17:53:07,    100,       0.88,           4,       0.09,      113.64,        4.55,        9.85,     100,       0

}

I also observed that the logfile option is either buggy or very strict. '-l filename.log' does not work.

$ siege -c 10 -b -r 10 -f urls.txt -l ./siege.log
** SIEGE 2.70
** Preparing 10 concurrent users for battle.
The server is now under siege...
done.
Transactions:                      0 hits
Availability:                   0.00 %
Elapsed time:                   0.08 secs
Data transferred:               0.00 MB
Response time:                  0.00 secs
Transaction rate:               0.00 trans/sec
Throughput:                     0.00 MB/sec
Concurrency:                    0.00
Successful transactions:           0
Failed transactions:             100
Longest transaction:            0.00
Shortest transaction:           0.00

FILE: /home/xxxx/var/siege.log
You can disable this annoying message by editing
the .siegerc file in your home directory; change
the directive 'show-logfile' to false.

But --log=filename.log works. e.g.

# siege -c 10 -b -r 10 -f urls.txt --log=./siege.log
$ siege -c 10 -b -r 10 -f urls.txt --log=./siege.log
** SIEGE 2.70
** Preparing 10 concurrent users for battle.
The server is now under siege...
HTTP/1.1 200   0.08 secs:   45807 bytes ==> /8af6cacb-50ed-40b6-995f-49480f9f74fa.html
HTTP/1.1 200   0.08 secs:   45807 bytes ==> /8af6cacb-50ed-40b6-995f-49480f9f74fa.html
HTTP/1.1 200   0.09 secs:   45807 bytes ==> /8af6cacb-50ed-40b6-995f-49480f9f74fa.html
HTTP/1.1 200   0.09 secs:   45807 bytes ==> /8af6cacb-50ed-40b6-995f-49480f9f74fa.html
HTTP/1.1 200   0.10 secs:   45807 bytes ==> /8af6cacb-50ed-40b6-995f-49480f9f74fa.html
HTTP/1.1 200   0.10 secs:   45807 bytes ==> /8af6cacb-50ed-40b6-995f-49480f9f74fa.html
HTTP/1.1 200   0.10 secs:   45807 bytes ==> /8af6cacb-50ed-40b6-995f-49480f9f74fa.html
HTTP/1.1 200   0.10 secs:   45807 bytes ==> /8af6cacb-50ed-40b6-995f-49480f9f74fa.html
HTTP/1.1 200   0.10 secs:   45807 bytes ==> /8af6cacb-50ed-40b6-995f-49480f9f74fa.html
HTTP/1.1 200   0.10 secs:   45807 bytes ==> /8af6cacb-50ed-40b6-995f-49480f9f74fa.html
HTTP/1.1 200   0.10 secs:   55917 bytes ==> /create_and_delete_networks.html
HTTP/1.1 200   0.10 secs:   55917 bytes ==> /create_and_delete_networks.html
HTTP/1.1 200   0.10 secs:   55917 bytes ==> /create_and_delete_networks.html
HTTP/1.1 200   0.10 secs:   55917 bytes ==> /create_and_delete_networks.html
HTTP/1.1 200   0.09 secs:   55917 bytes ==> /create_and_delete_networks.html

done.
Transactions:                    100 hits
Availability:                 100.00 %
Elapsed time:                   0.89 secs
Data transferred:               4.60 MB
Response time:                  0.09 secs
Transaction rate:             112.36 trans/sec
Throughput:                     5.16 MB/sec
Concurrency:                    9.74
Successful transactions:         100
Failed transactions:               0
Longest transaction:            0.15
Shortest transaction:           0.05

FILE: ./siege.log
You can disable this annoying message by editing
the .siegerc file in your home directory; change

Hope this helps.

Perennial
  • 438
  • 3
  • 8