1HTTPING(1) General Commands Manual HTTPING(1)
2
3
4
6 httping - measure the latency and throughput of a webserver
7
9 httping [options]
10
11 options: [-g url] [-h hostname] [-p portnumber] [-x proxyhost:port] [-c
12 count] [-i interval] [-t timeout] [-s] [-G] [-b] [-L xferlimit] [-X]
13 [-l] [-z] [-f] [-m] [-o rc,...] [-e string] [-I useragent string] [-R
14 referer string] [-r] [-n warn,crit] [-N mode] [-q] [-V]
15
17 The program httping lets you measure the latency of a webserver. Since
18 version 1.0.6 also the throughput can be measured.
19
21 -5 The proxy server selected is a SOCKS5 server.
22
23 -6 Enable IPv6 mode. Default is IPv4.
24
25 -a Audible ping
26
27 -b Use this switch together with '-G'. When this option is used,
28 the transferspeed (in KB/s) is shown.
29
30 -B Use this switch together with '-G'. Ask the HTTP server to com‐
31 press the returned data: this will reduce the influence of the
32 bandwidth of your connection while increasing the influence of
33 the processorpower of the HTTP server.
34
35 -c count
36 How many probes to send before exiting.
37
38 -D Do not draw graphs in ncurses mode (-K).
39
40 -e str When the status-code differs from the ones selected with '-o',
41 the given string is displayed.
42
43 -E Retrieve proxy settings from environment variables ('http_proxy'
44 and 'https_proxy').
45
46 -F Attempt TCP Fast Open while trying to connect to a server (for
47 Linux, version 3.7 onwards of the kernel)
48
49 -f Flood ping: do not sit idle between each ping but ping as fast
50 as the computer and network allow you to.
51
52 -G Do a GET request instead of a HEAD request: this means that also
53 the complete page/file must be transferred. Note that in this
54 case you're no longer measuring the latency!
55
56 -g url This selects the url to probe. E.g.: http://localhost/
57
58 -h hostname
59 Instead of '-g' one can also set a hostname to probe with -h: -h
60 localhost
61
62 -I str UserAgent-string to send to the webserver (instead of 'HTTPing
63 <version>').
64
65 -i interval
66 How many seconds to sleep between every probe sent.
67
68 -K Enable ncurses user interface.
69
70 -L x Use this switch together with '-G'. Limit the amount of data
71 transferred to 'x'. Note that this only affects the content of
72 the page/file and not the headerdata.
73
74 -l Connect using SSL: for this to work you need to give a
75 'https'-url or a 443 portnumber.
76
77 -m Show machine readable output (also check '-o' and '-e').
78
79 -N x Switches HTTPing to Nagios-plugin mode 2: return 0 when every‐
80 thing is fine, 'x' when anything fails. E.g.: 1 => Nagios warn‐
81 ing state, 2 => Nagios critical state.
82
83 -n warn,crit
84 Switches HTTPing to Nagios-plugin mode 1: return exitcode '1'
85 when the average response time is bigger then 'warn', return ex‐
86 itcode '2' when the the average response time is bigger then
87 'crit'. In all other cases return exitcode '0'.
88
89 -o x,x,...
90 This selects the HTTP status-codes which are regarded as an OK-
91 state (only with '-m').
92
93 -p portnumber
94 -p can be used together with -h. -p selects the portnumber to
95 probe.
96
97 -q Be quiet, only return an exit-code.
98
99 -R str Referer-string to send to the webserver.
100
101 -Q Use a persistent connection, i.e. reuse the same TCP connection
102 for multiple HTTP requests. Usually possible when 'Connection:
103 Keep-Alive' is sent by server. Adds a 'C' to the output if
104 httping had to reconnect.
105
106 -r Only resolve the hostname once: this takes the resolving out of
107 the loop so that the latency of the DNS is not measured. Also
108 useful when you want to measure only 1 webserver while the DNS
109 returns a different ip-address for each resolve ('roundrobin').
110
111 -S Split measured latency in time to connect and time to exchange a
112 request with the HTTP server. Split are returned in the follow‐
113 ing order: Resolve, Connect, Send, Receive, Disconnect.
114
115 -s When a successfull transaction was done, show the HTTP status‐
116 code (200, 404, etc.).
117
118 -T x Read the password for website authentication from file 'x' (in‐
119 stead of entering it on the command line).
120
121 -t timeout
122 How long to wait for answer from the other side.
123
124 -U Enable authentication against website. Set username with -U, set
125 password with -P (or -T to read the password from a file).
126
127 -v Increase verbosity mode. To show standard deviation and dates in
128 output.
129
130 -W Do not abort program if resolving fails.
131
132 -X Use this switch together with '-G'. For each "ping" show the
133 amount of data transferred (excluding the headers).
134
135 -x proxyhost[:port]
136 Probe using a proxyserver. Note that you're also measuring the
137 latency of the proxyserver!
138
139 -Y Enable colors
140
141 -z When connecting using SSL, display the fingerprint of the X509
142 certificate(s) of the peer.
143
144 --abbreviate
145 Abbreviate values bigger than thousand, million, billion, etc.
146
147 --adaptive-interval or --ai
148 (Try to) ping on the same interval. E.g. if interval is set to
149 1.0 seconds and ping a ping t[n] occurs at 500s with duration
150 250ms, then the next ping (t[n+1]) will happen at 501 seconds
151 and not at 501.25 seconds. Of course when the ping duration is >
152 bigger than the interval, a ping will be "skipped" (not liter‐
153 ally: the sequence number will continue) and t[n+1] will then be
154 e.g. 502s instead of the expected 501s. This is useful for exam‐
155 ple in the ncurses output mode where an fft is calculated over
156 the ping times.
157
158 --aggregates x[,y[,z[,etc.]]]
159 Show aggregates every x[/y[/z[/etc]]] seconds.
160
161 --divert-connect x
162 Ignore the hostname in the URL and connect to 'x' instead. The
163 given URL will be requested at 'x'.
164
165 --draw-phase
166 Not only draw the magnitude of the fourier transform, draw the
167 phase as well.
168
169 --graph-limit x
170 If values measured are bigger than x, then they're limitted to
171 x.
172
173 --header x
174 Add an additional request-header 'x'.
175
176 --keep-cookies
177 When the server sends a cookie, it will be returned in the next
178 request.
179
180 --max-mtu x
181 Maximum MTU to use. Cannot be larger than network interface MTU.
182
183 --no-host-header
184 Do not put a "Host:"-header in the request header.
185
186 --no-tcp-nodelay
187 Do not disable "tcp delay" (Naggle).
188
189 --priority x
190 Set priority of packets.
191
192 --tos x
193 Set type of service.
194
195 --proxy-user x
196 Use username 'x' to authenticate against proxy (http/socks5)
197 server (optional).
198
199 --proxy-password x
200 Use password 'x' to authenticate against proxy (http/socks5)
201 server (optional).
202
203 --proxy-password-file x
204 Read password from file 'x' to authenticate against proxy
205 (http/socks5) server (optional).
206
207 --recv-buffer x
208 Set the size of the receive buffer (in bytes).
209
210 --slow-log x
211 When the duration is x or more, show ping line in the slow log
212 window (the middle window).
213
214 --threshold-red x
215 If the measured threshold is higher than x (and -Y is given),
216 then the shown value is colored red. If you also use --thresh‐
217 old-yellow, then this value must be bigger.
218
219 --threshold-yellow x
220 If the measured threshold is higher than x (and -Y is given),
221 then the shown value is colored yellow.
222
223 --threshold-show x
224 If the measured threshold is higher than x, then the result is
225 shown (default is show always). The value x is in ms.
226
227 --timestamp or --ts
228 Put a timestamp before the result-lines. Use -v to also show a
229 date.
230
231 --tx-buffer x
232 Set the size of the transmit buffer (in bytes).
233
234 -V Show the version and exit.
235
236
238 In split mode (-S) something like
239 "time=0.08+24.09+23.17+15.64+0.02=62.98 ms" is shown. The first value
240 is the time it took to resolve the hostname (or 'n/a' if it did not re‐
241 solve in this iteration, e.g. in "resolve once" (-r) mode), then the
242 time it took to connect (or -1 for example in persistent connection
243 (-Q, HTTP v1.1), after that the time it took to put the request on the
244 wire, then the time it took for the HTTP server to process the request
245 and send it back and lastly the time it took to close the connection.
246
247
249 The graph in the ncurses uses colors to encode a meaning. Green: value
250 is less than 1 block. Red: the value did not fit in the graph. Blue:
251 the value was limitted by --graph-limit. Cyan: no measurement for that
252 point in time.
253
254
256 Press <CTRL> + <c> to exit the program. It will display a summary of
257 what was measured. In the ncurses gui, press <CTRL> + <l> to forcibly
258 redraw the screen. Press 'H' to halt the graphs (and again to con‐
259 tinue). Press 'q' to stop the program (<CTRL> + <c> will work too).
260
261
263 httping -g http://localhost/
264 Ping the webserver on host 'localhost'.
265
266 httping -h localhost -p 1000
267 Ping the webserver on host 'localhost' and portnumber 1000.
268
269 httping -l -g https://localhost/
270 Ping the webserver on host 'localhost' using an SSL connection.
271
272 httping -g http://localhost/ -U username -P password
273 Ping the webserver on host 'localhost' using the Basic HTTP Au‐
274 thentication.
275
277 None. This program is totally bug-free.
278
279
281 http://www.vanheusden.com/httping/
282
283
285 This page describes httping as found in the httping-2.3 package; other
286 versions may differ slightly. Please mail corrections and additions to
287 mail@vanheusden.com. Report bugs in the program to mail@vanheus‐
288 den.com. Please consider sending bitcoins to 1N5Sn4jny4xVwTwSYLnf7Wn‐
289 FQEGoVRmTQF
290
291
292
293httping 2016-09 HTTPING(1)