http-pingは、ICMPの代わりにhttp/sを利用してコンピュータ名や
IPアドレスの変わりにURLを利用してレスポンスを返します。 (IPv6にも対応)

It is similar to the popular ping utility, but works over HTTP/S
instead of ICMP, and with a URL instead of a computer name/IP address.
http-ping supports IPv6 addresses.

Ping any URL or web site with our free command-line utility, http-ping

http-pingをダウンロードしたら,exeをそのままフォルダーに配置して
何もインストールしないでそのまま実行ファイルとして利用出来ます。

http-ping

For each request, http-ping displays:

The HTTP return code (and its brief textual description)
The number of bytes returned by the server (excluding headers)
The time taken to complete the request (i.e. round-trip time)

A summary of all the requests is presented upon completion.


C:\tools\http-ping>http-ping.exe /?

http-ping
=========

Synopsis: Pings a specified URL.

Usage: http-ping [-t] [-n count] [-i interval] [-f file-name] [-s] [-v]
[-q] [-c] [-r] [-w timeout] [-d] [-o data | -of file-name] URL

Where:
URL The URL you wish to check. For example http://www.kiva.org,
http://209.191.122.70, or http://www.yourhost:8080.
Be sure to surround an IPv6 address with square brackets,
for example, http://[2a00:1450:4007:800::1014].

Options:
-t Ping the specified URL until stopped.
To see statistics and continue - type Control-Break;
To stop - type Control-C.
-n count Send 'count' requests. Supercedes -t.
-i interval Wait 'interval' seconds between each request. There is a
1-second wait if this option is not specified.
-f file-name Save responses to file 'file-name'. Please specify the full
path, and use quotes if the file name contains spaces.
-s Silent. Print no output.
-v Verbose. Print detailed output. Supercedes -s.
-q Quick. Perform HTTP HEAD requests instead of GETs. This
will retrieve headers only, and bytes reported wil be 0.
-c Perform a full connection on each request; ignore
keep-alive.
-r Follow HTTP redirects.
-w timeout Wait 'timeout' seconds for a response before timing out.
Specify 0 to avoid timing out.
If not specified, the default timeout is 30 seconds.
-p Use the proxy defined in the Windows Internet settings.
-d Print the date and time of each ping attempt.
-o data Perform HTTP POSTs sending the given data. Please enclose
the data in quotes if it contains spaces.
-of file-name Perform HTTP POSTs sending the contents of file
'file-name'. Please specify the full path, and use quotes
if the file name contains spaces.

Exit code: The percentage of requests that succeed.

Version: 5.0.0.33 (Dec 24 2011)

Examples: > http-ping http://www.yahoo.com
- Pings the yahoo home page 4 times.
> http-ping -t http://localhost:8080
- Repeatedly pings the web server at port 8080 on your
local machine until stopped.

---------------------------------------------------------------------------
This free utility is Copyright 2011, Core Technologies Consulting, LLC.
Find out about this and our other products at our web site:
http://www.CoreTechnologies.com/
---------------------------------------------------------------------------

-rでリダイレクト先のレスポンスを確認。

C:\tools\http-ping>

バッチとの連携
http://www.coretechnologies.com/products/AlwaysUp/alwaysup-sanity-check-web-server.bat
———————————————-

@echo off
REM This batch file is for use with AlwaysUp (http://www.coretechnologies.com/products/AlwaysUp/) or Service Protector (http://www.coretechnologies.com/products/ServiceProtector/)
REM Copyright � 2001-2012 Core Technologies Consulting, LLC. All rights reserved.

REM Ping your web server
REM *** Please change the location of http-ping.exe if necessary and adjust the URL to point to your web server ***
"C:\Program Files\AlwaysUp\http-ping.exe" http://localhost:80

REM http-ping returns the percentage of pings that succeed. With 4 attempts, this can be 0, 25, 50, 75, or 100.
REM Any of the 4 pings succeeds consider it a success ==> return 0 so that AlwaysUp doesn't restart
IF ERRORLEVEL 25 GOTO success
IF ERRORLEVEL 50 GOTO success
IF ERRORLEVEL 75 GOTO success
IF ERRORLEVEL 100 GOTO success

REM Exit code of 0 ==> all failed ==> return 1 to have AlwaysUp restart the application
IF ERRORLEVEL 0 GOTO failure

REM http-ping returned a code < 0 ==> there was some other kind of failure. Don't restart, but have AlwaysUp log the failure ==> return 2
echo http-ping failed!
exit 2

:success
echo Succeeded!
exit 0

:failure
echo Failed!
exit 1

———————————————-

その他のツールも以下のサイトでダウンロード出来ます。
Core Technologies Consulting, LLC

Comments are closed.

Post Navigation