What I can't figure out(or search out) is what the arguments "5 2 2>&1" are doing??
I thought it was setting 2 '5 byte messages' with a time to live of 2...something.
But I can not find any data to support that or otherwise explain what's going on here.
Check man ping on that system (I'm guessing it is Solaris) to get explanation of 5 2 . 2>&1 is a redirection technique, allowing to "merge" standard error messages into standard output stream.
The ping command on AIX uses those two parameters.
From the man page:
5
PacketSize
Specifies the number of data bytes to be sent. The default is 56, which translates into 64 ICMP data bytes when combined with the 8 bytes of ICMP header data. This parameter is included for compatibility with previous versions of the ping command.
2
Count
Specifies the number of echo requests to be sent (and received). This parameter is included for compatibility with previous versions of the ping command.
Example: ping server 5 2
PING server (xxx.xxx.xxx.xxx): 5 data bytes
13 bytes from xxx.xxx.xxx.xxx: icmp_seq=0 ttl=64
13 bytes from xxx.xxx.xxx.xxx: icmp_seq=1 ttl=64
--- server ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss