2013/03/29

pingの実行結果に時刻表示

ネットワーク監視で手軽に実現できたらと思い調べてみました。

ん~後は、時間と「Reply from」の行だけ同じ行に表示され、
結果とかが非表示になればベストですかね。

コマンドプロンプトだけでは難しいかな。

▽参考▽
コマンドプロンプトを使用して「ping結果+時刻」を表示したい
http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q1122666816
http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q1323320688
第8回 forコマンド(その2)
http://www.atmarkit.co.jp/fwin2k/operation/command008/command02.html
nslookupを5分おきに実行するバッチファイルの作成
http://okwave.jp/qa/q2097864.html
DOSコマンドでの単純なループ処理
http://okwave.jp/qa/q1090194.html

【例:実行結果】

C:¥>FOR /L %i IN (0,0,1) Do ehco [!TIME!] & ping -n 1 8.8.8.8


C:\Documents and Settings\OP>echo [!TIME!]  & ping -n 1 8.8.8.8
[10:34:05.91]

Pinging 8.8.8.8 with 32 bytes of data:

Reply from 8.8.8.8: bytes=32 time=32ms TTL=53

Ping statistics for 8.8.8.8:
    Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 32ms, Maximum = 32ms, Average = 32ms
・・・以下、繰り返し・・・

0 件のコメント:

コメントを投稿