今日、初めて気付いたんです!
$ ping -a xxx.xxx.xxx.xxx
こんな感じでpingコマンドで"-a"オプションを付けると、返答があった時に、なんと音が鳴ります。
これは地味に便利。(Linux限定、かも)
何が便利かって?ネットワークの疎通確認をする時に便利ですよね。
ついこの前も、データセンターでボンディングの試験とかスイッチのポート障害のときに、ラックの前で1人がpingの反応見つつ、ラックの後ろでは、LANケーブルの抜き差ししながら、「OK!」とか「NG!」とか言っているわけですよ。
これで、音鳴らしながらテストしたら1人で確認出来るやん。
おっと、これは良い発見。ひょっとして常識?
たまにmanでコマンドのオプションを眺めていると、こんな感じで面白い発見があるから好きなんですよね。
とか。
参考
PING(8) System Manager's Manual: iputils PING(8)
NAME
ping, ping6 - send ICMP ECHO_REQUEST to network hosts
SYNOPSIS
ping [ -LRUbdfnqrvVaAB] [ -c count] [ -i interval] [ -l
preload] [ -p pattern] [ -s packetsize] [ -t ttl] [ -w
deadline] [ -F flowlabel] [ -I interface] [ -M hint] [ -Q
tos] [ -S sndbuf] [ -T timestamp option] [ -W timeout] [
hop ...] destination
DESCRIPTION
ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram
to elicit an ICMP ECHO_RESPONSE from a host or gateway.
ECHO_REQUEST datagrams (''pings'') have an IP and ICMP
header, followed by a struct timeval and then an arbitrary
number of ''pad'' bytes used to fill out the packet.
OPTIONS
-a Audible ping.
-A Adaptive ping. Interpacket interval adapts to round-
trip time, so that effectively not more than one (or
more, if preload is set) unanswered probes present in
the network. Minimal interval is 200msec for not
super-user. On networks with low rtt this mode is
essentially equivalent to flood mode.
・・・・・以下、省略・・・・・

ネットワーク 現場の教科書 増補改訂版 (IDGムックシリーズ)
- 出版社/メーカー: アイ・ディ・ジー・ジャパン
- 発売日: 2008/07/16
- メディア: ムック
- 購入: 2人 クリック: 39回
- この商品を含むブログ (5件) を見る