Getting The Ip Using PING Command (Solaris)

Many times we need get the ip for remote, a very simple way is by using the ping command

/usr/sbin/ping

If you execute the command in the more simple option, like show below, you only get a pretty output telling if you remote host is alive.

cloud-4@:/wp/production/srvr/diag> /usr/sbin/ping cloud-2
cloud-4 is alive

Using the -s option you get more info, incluiding the ip;

cloud-4@:/wp/production/srvr/diag> /usr/sbin/ping -s cloud-2
PING cloud-2: 56 data bytes
64 bytes from cloud-2 (120.71.133.100): icmp_seq=0. time=0.098 ms
64 bytes from cloud-2 (120.71.133.100): icmp_seq=1. time=0.087 ms
64 bytes from cloud-2 (120.71.133.100): icmp_seq=2. time=0.067 ms
^C
----cloud-2 PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip (ms)  min/avg/max/stddev = 0.067/0.084/0.098/0.016

HTH – Antonio NAVARRO

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s