machine that goes ping

The default mode of ping(1M) on Solaris is to send one packet, then report "foo is alive" after getting a response. But many people, especially those more used to the various BSD flavors of Unix, prefer the "statistics" mode of ping (i.e., "ping -s"), where a packet is sent once per second, and the round-trip-time statistics are presented, until the user hits control-c. So in build 33 of Solaris 11 I added a check: if the variable MACHINE_THAT_GOES_PING is set in the environment to a non-null value, then ping will go into "statistics" mode as if the -s flag had been provided. I neglected to update the man page for some reason, however; perhaps Easter was on my mind.
Comments:

MACHINE_THAT_GOES_PING ???

Awesome!

(You might want to disable that behavior if there is no TTY, since I can picture people setting an environment variable in a profile somewhere, and seeing applications mysteriously hanging up because the "ping" command does not return.)

Posted by David on March 22, 2011 at 01:48 AM PDT #

Sorry, I cannot see the point of this change. What if a user simply defines (even at the system level) an alias for the ping command to auto-enable the statistic mode? It seems to me much more simpler that setting an environment variable to just ping an host....

Posted by Luca Ferrari on March 22, 2011 at 10:38 PM PDT #

Post a Comment:
Comments are closed for this entry.
About

jbeck

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today