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


TOPコマンドでパフォーマンスを確認する事で問題ないのですが、
少しだけビジュアライズされてキーボードやマウスで簡単に操作出来るように
なっているHTOPでパフォーマンス確認をより身近にする事で気付ける事も
あるかもしれません。

ダウンロード

[root@colinux htop]# wget http://citylan.dl.sourceforge.net/project/htop/htop/0.8.3/htop-0.8.3.tar.gz
–2012-06-15 09:58:08– http://citylan.dl.sourceforge.net/project/htop/htop/0.8.3/htop-0.8.3.tar.gz
citylan.dl.sourceforge.net をDNSに問いあわせています… 212.118.44.106, 2a03:1800:1:7::2
citylan.dl.sourceforge.net|212.118.44.106|:80 に接続しています… 接続しました。
HTTP による接続要求を送信しました、応答を待っています… 200 OK
長さ: 428061 (418K) [application/x-gzip]
`htop-0.8.3.tar.gz’ に保存中

100%[====================================================================================>] 428,061 71.5K/s 時間 5.9s

2012-06-15 09:58:15 (71.5 KB/s) – `htop-0.8.3.tar.gz’ へ保存完了 [428061/428061]

[root@colinux htop]#

展開

[root@colinux htop]# tar xzvf htop-0.8.3.tar.gz
htop-0.8.3/
htop-0.8.3/Makefile.am
htop-0.8.3/ClockMeter.h
htop-0.8.3/depcomp
htop-0.8.3/Meter.c
htop-0.8.3/htop.1.in
htop-0.8.3/SignalItem.c
htop-0.8.3/plpa-1.1/
htop-0.8.3/plpa-1.1/Makefile.am
htop-0.8.3/plpa-1.1/src/
htop-0.8.3/plpa-1.1/src/Makefile.am
htop-0.8.3/plpa-1.1/src/plpa.h.in
htop-0.8.3/plpa-1.1/src/plpa_dispatch.c
[…省略]
htop-0.8.3/acinclude.m4
htop-0.8.3/Object.c
htop-0.8.3/htop.c
htop-0.8.3/autogen.sh
htop-0.8.3/AvailableMetersPanel.c
[root@colinux htop]#

インストール [configure -> make -> make install]

[root@colinux htop-0.8.3]# ./configure
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… /bin/mkdir -p
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
[…省略]
checking for unistd.h… (cached) yes
checking curses.h usability… no
checking curses.h presence… no
checking for curses.h… no
configure: error: missing headers: curses.h
[root@colinux htop-0.8.3]#

configureでエラーになったので必要なパッケージをインストール
エラー内容:configure: error: missing headers: curses.h

[root@colinux htop-0.8.3]# yum install ncurses-devel
fedora 100% |=========================| 2.1 kB 00:00
updates 100% |=========================| 2.3 kB 00:00
Setting up Install Process
Parsing package install arguments

今回は無事にconfigureが完了したので、
makeとmake installしてインストールを完了。

configure: creating ./config.status
config.status: creating plpa-1.1/Makefile
config.status: creating plpa-1.1/src/Makefile
config.status: creating Makefile
config.status: creating htop.1
config.status: creating config.h
config.status: config.h is unchanged
config.status: creating plpa-1.1/src/plpa_config.h
config.status: creating plpa-1.1/src/plpa.h
config.status: executing depfiles commands
[root@colinux htop-0.8.3]#
[root@colinux htop-0.8.3]# make
[…省略]
[root@colinux htop-0.8.3]# make install
[…省略]

htopを起動してみる。
パスを指定しなければ以下のパスにインストールされている。

[root@colinux htop-0.8.3]# whereis htop
htop: /usr/local/bin/htop
[root@colinux htop-0.8.3]#
[root@colinux htop-0.8.3]# htop

起動後はF1~F10キーでNICEやTREEなども操作出来る。

通常起動後

htop

htop


–safe-updatesオプションを指定してDBに接続すると、プライマリーキーを
指定しないとUPDATEやDELETEなどの更新クエリーを実行出来ないように
するオプションです。WHERE句を忘れてデータすべて変更してしまったなど
と焦らないようにする為に良いかもしれません。

[root@colinux mysql5130]# mysql -u root -p --prompt="\u@\h-DB:\d>" --safe-updates
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.1.30 MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

root@localhost-DB:(none)>use test
Database changed
root@localhost-DB:test>show tables;
+----------------+
| Tables_in_test |
+----------------+
| T1             |
+----------------+
1 row in set (0.00 sec)

root@localhost-DB:test>select * from T1;
+----+------------+-------------+
| id | name       | comment     |
+----+------------+-------------+
|  1 | SHOW WARIN | 1111111     |
|  2 | SHOW WARIN | 22222222222 |
+----+------------+-------------+
2 rows in set (0.00 sec)

root@localhost-DB:test>

root@localhost-DB:test>update T1 set comment="test update";
ERROR 1175 (HY000): You are using safe update mode and you tried to update a tab
le without a WHERE that uses a KEY column
root@localhost-DB:test>update T1 set comment="test update" where id = 1;
Query OK, 1 row affected (0.02 sec)
Rows matched: 1  Changed: 1  Warnings: 0

root@localhost-DB:test>select * from T1;
+----+------------+-------------+
| id | name       | comment     |
+----+------------+-------------+
|  1 | SHOW WARIN | test update |
|  2 | SHOW WARIN | 22222222222 |
+----+------------+-------------+
2 rows in set (0.00 sec)

root@localhost-DB:test>

※primaryキーを指定しないと更新出来ないので、ある程度まとまったデータ
を更新する場合は、BEGIN TRAN ~ COMMIT TRAN/ROLLBACK TRAN
などで処理を戻せるようにする事で対応する事も可能ですね。