{"id":324,"date":"2020-06-28T16:18:24","date_gmt":"2020-06-28T07:18:24","guid":{"rendered":"http:\/\/192.168.20.1\/?p=324"},"modified":"2021-08-10T14:28:40","modified_gmt":"2021-08-10T05:28:40","slug":"httping","status":"publish","type":"post","link":"https:\/\/rlab.cavtime.net\/?p=324","title":{"rendered":"httping"},"content":{"rendered":"<h2>Overview<\/h2>\n<p>http Protocol \u901a\u4fe1\u3092\u8a66\u9a13\u3067\u304d\u308b httping \u3092\u8a66\u3057\u3066\u307f\u308b\u3002<\/p>\n<h2>Environment<\/h2>\n<pre>$ cat \/etc\/os-release\r\nNAME=\"Ubuntu\"\r\nVERSION=\"21.04 (Hirsute Hippo)\"\r\nID=ubuntu\r\nID_LIKE=debian\r\nPRETTY_NAME=\"Ubuntu 21.04\"\r\nVERSION_ID=\"21.04\"\r\nHOME_URL=\"https:\/\/www.ubuntu.com\/\"\r\nSUPPORT_URL=\"https:\/\/help.ubuntu.com\/\"\r\nBUG_REPORT_URL=\"https:\/\/bugs.launchpad.net\/ubuntu\/\"\r\nPRIVACY_POLICY_URL=\"https:\/\/www.ubuntu.com\/legal\/terms-and-policies\/privacy-policy\"\r\nVERSION_CODENAME=hirsute\r\nUBUNTU_CODENAME=hirsute\r\n$ \r\n<\/pre>\n<h2>Install<\/h2>\n<pre>sudo apt-get install httping<\/pre>\n<h2>Use<\/h2>\n<h3>Help<\/h3>\n<pre>$ httping --help\r\nHTTPing v2.5, (C) 2003-2016 folkert@vanheusden.com\r\n * SSL support included (-l)\r\n * ncurses interface with FFT included (-K)\r\n * TFO (TCP fast open) support included (-F)\r\n\r\n *** where to connect to ***\r\n-g x \/ --url             URL to ping (e.g. -g http:\/\/localhost\/)\r\n-h x \/ --hostname        hostname to ping (e.g. localhost) - use either -g or -h\r\n-p x \/ --port            portnumber (e.g. 80) - use with -h\r\n-6   \/ --ipv6            use IPv6 when resolving\/connecting\r\n-l   \/ --use-ssl         connect using SSL. pinging an https URL automatically enables this setting\r\n\r\n *** proxy settings ***\r\n-x x \/ --proxy           x should be \"host:port\" which are the network settings of the http\/https\r\n                         proxy server. ipv6 ip-address should be \"[ip:address]:port\"\r\n-E                       fetch proxy settings from environment variables\r\n--proxy-user x           username for authentication against proxy\r\n--proxy-password x       password for authentication against proxy\r\n--proxy-password-file x  read password for proxy authentication from file x\r\n-5                       proxy is a socks5 server\r\n--proxy-buster x         adds \"&amp;x=[random value]\" to the request URL\r\n\r\n *** timing settings ***\r\n-c x \/ --count           how many times to ping\r\n-i x \/ --interval        delay between each ping\r\n-t x \/ --timeout         timeout (default: 30s)\r\n--ai \/ --adaptive-interval execute pings at multiples of interval relative to start, automatically\r\n                         enabled in ncurses output mode\r\n-f   \/ --flood           flood connect (no delays)\r\n\r\n *** HTTP settings ***\r\n-Z   \/ --no-cache        ask any proxies on the way not to cache the requests\r\n--divert-connect         connect to a different host than in the URL given\r\n--keep-cookies           return the cookies given by the HTTP server in the following request(s)\r\n--no-host-header         do not add \"Host:\"-line to the request headers\r\n-Q   \/ --persistent-connections use a persistent connection, i.e. reuse the same TCP connection for\r\n                         multiple HTTP requests. usually possible when 'Connection: Keep-Alive' is\r\n                         sent by server. adds a 'C' to the output if httping had to reconnect\r\n-I x \/ --user-agent      use 'x' for the UserAgent header\r\n-R x \/ --referer         use 'x' for the Referer header\r\n--header                 adds an extra request-header\r\n\r\n *** networking settings ***\r\n--max-mtu                limit the MTU size\r\n--no-tcp-nodelay         do not disable Naggle\r\n--recv-buffer            receive buffer size\r\n--tx-buffer              transmit buffer size\r\n-r   \/ --resolve-once    resolve hostname only once (useful when pinging roundrobin DNS: also takes\r\n                         the first DNS lookup out of the loop so that the first measurement is also\r\n                         correct)\r\n-W                       do not abort the program if resolving failed: keep retrying\r\n-y x \/ --bind-to         bind to an ip-address (and thus interface) with an optional port\r\n-F   \/ --tcp-fast-open   \"TCP fast open\" (TFO), reduces the latency of TCP connects\r\n--priority               set priority of packets\r\n--tos                    set TOS (type of service)\r\n\r\n *** HTTP authentication ***\r\n-A   \/ --basic-auth      activate (\"basic\") authentication\r\n-U x \/ --username        username for authentication\r\n-P x \/ --password        password for authentication\r\n-T x                     read the password fom the file 'x' (replacement for -P)\r\n\r\n *** output settings ***\r\n-s   \/ --show-statuscodes show statuscodes\r\n-S   \/ --split-time      split measured time in its individual components (resolve, connect, send,\r\n                         etc.\r\n--threshold-red          from what ping value to show the value in red (must be bigger than yellow),\r\n                         only in color mode (-Y)\r\n--threshold-yellow       from what ping value to show the value in yellow\r\n--threshold-show         from what ping value to show the results\r\n--timestamp \/ --ts       put a timestamp before the measured values, use -v to include the date and\r\n                         -vv to show in microseconds\r\n--aggregate x[,y[,z]]    show an aggregate each x[\/y[\/z[\/etc]]] seconds\r\n-z   \/ --show-fingerprint show fingerprint (SSL)\r\n-v                       verbose mode\r\n\r\n *** \"GET\" (instead of HTTP \"HEAD\") settings ***\r\n-G   \/ --get-request     do a GET request instead of HEAD (read the contents of the page as well)\r\n-b   \/ --show-transfer-speed show transfer speed in KB\/s (use with -G)\r\n-B   \/ --show-xfer-speed-compressed like -b but use compression if available\r\n-L x \/ --data-limit      limit the amount of data transferred (for -b) to 'x' (in bytes)\r\n-X   \/ --show-kb         show the number of KB transferred (for -b)\r\n\r\n *** output mode settings ***\r\n-q   \/ --quiet           quiet, only returncode\r\n-m   \/ --parseable-output give machine parseable output (see also -o and -e)\r\n-M                       json output, cannot be combined with -m\r\n-o rc,rc,... \/ --ok-result-codes what http results codes indicate 'ok' comma separated WITHOUT\r\n                         spaces inbetween default is 200, use with -e\r\n-e x \/ --result-string   string to display when http result code doesn't match\r\n-n warn,crit \/ --nagios-mode-1 \/ --nagios-mode-2 Nagios-mode: return 1 when avg. response time &gt;=\r\n                         warn, 2 if &gt;= crit, otherwhise return 0\r\n-N x                     Nagios mode 2: return 0 when all fine, 'x' when anything failes\r\n-C cookie=value \/ --cookie add a cookie to the request\r\n-Y   \/ --colors          add colors\r\n-a   \/ --audible-ping    audible ping\r\n\r\n *** GUI\/ncurses mode settings ***\r\n-K   \/ --ncurses \/ --gui ncurses\/GUI mode\r\n--draw-phase             draw phase (fourier transform) in gui\r\n--slow-log               when the duration is x or more, show ping line in the slow log window (the\r\n                         middle window)\r\n--graph-limit x          do not scale to values above x\r\n-D   \/ --no-graph        do not show graphs (in ncurses\/GUI mode)\r\n\r\n-V   \/ --version         show the version\r\n\r\nExample:\r\n\thttping x201 -Y -s -Z\r\n\r\n$  \r\n<\/pre>\n<h2>Verify<\/h2>\n<pre>$ httping -c 5 -l rlab.travelersmedia.jp\r\nPING rlab.travelersmedia.jp:443 (\/):\r\nconnected to 192.168.10.1:443 (240 bytes), seq=0 time= 37.16 ms \r\nconnected to 192.168.10.1:443 (240 bytes), seq=1 time=125.12 ms \r\nconnected to 192.168.10.1:443 (240 bytes), seq=2 time=133.86 ms \r\nconnected to 192.168.10.1:443 (240 bytes), seq=3 time= 38.02 ms \r\nconnected to 192.168.10.1:443 (240 bytes), seq=4 time= 33.85 ms \r\n--- https:\/\/rlab.cavtime.net\/ ping statistics ---\r\n5 connects, 5 ok, 0.00% failed, time 5370ms\r\nround-trip min\/avg\/max = 33.9\/73.6\/133.9 ms\r\n$ \r\n<\/pre>\n<h2>Packet<\/h2>\n<pre>\r\n$ httping -c 1 -l rlab.travelersmedia.jp\r\nPING rlab.travelersmedia.jp:443 (\/):\r\nconnected to 192.168.10.1:443 (240 bytes), seq=0 time= 51.66 ms \r\n--- https:\/\/rlab.cavtime.net\/ ping statistics ---\r\n1 connects, 1 ok, 0.00% failed, time 1052ms\r\nround-trip min\/avg\/max = 51.7\/51.7\/51.7 ms\r\n$ \r\n<\/pre>\n<pre>No.     Time           Source                Destination           Protocol Length Info\r\n     34 2.357892997    192.168.1.59          192.168.10.1          TCP      74     53188 \u2192 443 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1 TSval=4055077589 TSecr=0 WS=128\r\n     35 2.368063931    192.168.10.1          192.168.1.59          TCP      74     443 \u2192 53188 [SYN, ACK] Seq=0 Ack=1 Win=65160 Len=0 MSS=1414 SACK_PERM=1 TSval=13198109 TSecr=4055077589 WS=128\r\n     36 2.368129613    192.168.1.59          192.168.10.1          TCP      66     53188 \u2192 443 [ACK] Seq=1 Ack=1 Win=64256 Len=0 TSval=4055077600 TSecr=13198109\r\n     37 2.368668850    192.168.1.59          192.168.10.1          TLSv1.3  349    Client Hello\r\n     38 2.371176703    192.168.10.1          192.168.1.59          TCP      66     443 \u2192 53188 [ACK] Seq=1 Ack=284 Win=64896 Len=0 TSval=13198117 TSecr=4055077600\r\n     39 2.374088730    192.168.10.1          192.168.1.59          TLSv1.3  1514   Server Hello, Change Cipher Spec, Application Data\r\n     40 2.374125319    192.168.1.59          192.168.10.1          TCP      66     53188 \u2192 443 [ACK] Seq=284 Ack=1449 Win=63104 Len=0 TSval=4055077605 TSecr=13198118\r\n     41 2.374156254    192.168.10.1          192.168.1.59          TCP      1514   443 \u2192 53188 [PSH, ACK] Seq=1449 Ack=284 Win=64896 Len=1448 TSval=13198118 TSecr=4055077600 [TCP segment of a reassembled PDU]\r\n     42 2.374179669    192.168.1.59          192.168.10.1          TCP      66     53188 \u2192 443 [ACK] Seq=284 Ack=2897 Win=61696 Len=0 TSval=4055077606 TSecr=13198118\r\n     43 2.374203890    192.168.10.1          192.168.1.59          TCP      1266   443 \u2192 53188 [PSH, ACK] Seq=2897 Ack=284 Win=64896 Len=1200 TSval=13198118 TSecr=4055077600 [TCP segment of a reassembled PDU]\r\n     44 2.374225645    192.168.1.59          192.168.10.1          TCP      66     53188 \u2192 443 [ACK] Seq=284 Ack=4097 Win=60544 Len=0 TSval=4055077606 TSecr=13198118\r\n     45 2.374245383    192.168.10.1          192.168.1.59          TLSv1.3  555    Application Data, Application Data, Application Data\r\n     46 2.374252501    192.168.1.59          192.168.10.1          TCP      66     53188 \u2192 443 [ACK] Seq=284 Ack=4586 Win=60160 Len=0 TSval=4055077606 TSecr=13198119\r\n     47 2.375442449    192.168.1.59          192.168.10.1          TLSv1.3  146    Change Cipher Spec, Application Data\r\n     48 2.375525044    192.168.1.59          192.168.10.1          TLSv1.3  163    Application Data\r\n     49 2.379064668    192.168.10.1          192.168.1.59          TCP      66     443 \u2192 53188 [ACK] Seq=4586 Ack=364 Win=64896 Len=0 TSval=13198123 TSecr=4055077607\r\n     50 2.379097016    192.168.10.1          192.168.1.59          TCP      66     443 \u2192 53188 [ACK] Seq=4586 Ack=461 Win=64896 Len=0 TSval=13198124 TSecr=4055077607\r\n     51 2.379117310    192.168.10.1          192.168.1.59          TLSv1.3  337    Application Data\r\n     52 2.379134701    192.168.1.59          192.168.10.1          TCP      66     53188 \u2192 443 [ACK] Seq=461 Ack=4857 Win=63872 Len=0 TSval=4055077611 TSecr=13198124\r\n     53 2.379156546    192.168.10.1          192.168.1.59          TLSv1.3  337    Application Data\r\n     54 2.379172289    192.168.1.59          192.168.10.1          TCP      66     53188 \u2192 443 [ACK] Seq=461 Ack=5128 Win=63616 Len=0 TSval=4055077611 TSecr=13198124\r\n     55 2.394568518    192.168.10.1          192.168.1.59          TLSv1.3  324    Application Data\r\n     56 2.394595859    192.168.1.59          192.168.10.1          TCP      66     53188 \u2192 443 [ACK] Seq=461 Ack=5386 Win=63360 Len=0 TSval=4055077626 TSecr=13198139\r\n     57 2.394630957    192.168.10.1          192.168.1.59          TLSv1.3  90     Application Data\r\n     58 2.394645559    192.168.1.59          192.168.10.1          TCP      66     53188 \u2192 443 [ACK] Seq=461 Ack=5410 Win=63360 Len=0 TSval=4055077626 TSecr=13198139\r\n     59 2.394663660    192.168.10.1          192.168.1.59          TCP      66     443 \u2192 53188 [FIN, ACK] Seq=5410 Ack=461 Win=64896 Len=0 TSval=13198139 TSecr=4055077611\r\n     60 2.394772554    192.168.1.59          192.168.10.1          TLSv1.3  90     Application Data\r\n     61 2.394875874    192.168.1.59          192.168.10.1          TCP      66     53188 \u2192 443 [FIN, ACK] Seq=485 Ack=5411 Win=64128 Len=0 TSval=4055077626 TSecr=13198139\r\n     62 2.399888911    192.168.10.1          192.168.1.59          TCP      66     443 \u2192 53188 [ACK] Seq=5411 Ack=485 Win=64896 Len=0 TSval=13198143 TSecr=4055077626\r\n     63 2.399913833    192.168.10.1          192.168.1.59          TCP      66     443 \u2192 53188 [ACK] Seq=5411 Ack=486 Win=64896 Len=0 TSval=13198143 TSecr=4055077626\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Overview http Protocol \u901a\u4fe1\u3092\u8a66\u9a13\u3067\u304d\u308b httping \u3092\u8a66\u3057\u3066\u307f\u308b\u3002 Environment $ cat \/etc\/os-release NAME=&#8221;Ubuntu&#8221; VERSION=&#8221;21.04 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[122],"tags":[],"class_list":["post-324","post","type-post","status-publish","format-standard","hentry","category-http"],"_links":{"self":[{"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=\/wp\/v2\/posts\/324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=324"}],"version-history":[{"count":6,"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=\/wp\/v2\/posts\/324\/revisions"}],"predecessor-version":[{"id":836,"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=\/wp\/v2\/posts\/324\/revisions\/836"}],"wp:attachment":[{"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}