14 .TH Sonar 1 "3-Nov-98" "X Version 11"
16 sonar - display a sonar scope
19 [\-ping \fIhosts-or-subnets\fP]
20 [\-background \fIcolor\fP]
21 [\-sweep\-color \fIcolor\fP]
22 [\-low\-color \fIcolor\fP]
23 [\-scope\-color \fIcolor\fP]
24 [\-grid\-color \fIcolor\fP]
25 [\-text\-color \fIcolor\fP]
28 [\-ping\-timeout \fIint\fP]
29 [\-team-a-name \fIstring\fP]
30 [\-team-b-name \fIstring\fP]
31 [\-team-a-count \fIint\fP]
32 [\-team-b-count \fIint\fP]
37 The \fIsonar\fP program displays a sonar scope on the computer's screen.
38 This scope polls a sensor as the sweep goes around the scope and displays
39 what it finds as bogies on the screen. The program is designed to support
40 different modes representing different types of sensors. Currently the
41 only implemented sensors are a simulator, and a network ping function that
42 pings hosts and plots the results on the scope.
45 understands the following options:
47 .B \-background \fIColor\fP
48 The background Color of the screen not covered by the scope.
50 .B \-sweep\-color \fIColor\fP
51 The color of the brightest part of the sweep.
53 .B \-scope\-color \fIColor\fP
54 The color of the circular part of the scope.
56 .B \-grid\-color \fIColor\fP
57 The color to the grid lines overlaying the scope.
59 .B \-text\-color \fIColor\fP
60 The color of the text identifying bogies on the scope.
62 .B \-ttl \fIinteger\fP
63 "Time to live": visible time of a Bogie. Try values between 10 (very short)
67 The font used to display text on the scope. Default "fixed".
69 .B \-ping\-timeout \fIint\fP
70 The amount of time in milliseconds the program will wait for an answer
73 .B \-ping \fIhosts-or-subnets\fP
74 The list of things to ping, separated by commas or spaces.
75 Elements of this list may be:
79 to run in simulation mode, instead of pinging real hosts (this is the default
80 if the program is not installed setuid);
83 to ping the given host;
86 to ping the given IP address;
89 to ping the local class C subnet (the nearest 255 addresses);
92 to ping a different-sized local subnet: e.g., \fBsubnet/28\fP would ping
93 a 4-bit subnet (the nearest 15 addresses);
96 to ping an arbitrary other subnet: the IP address specifies the base address,
97 and the part after the slash is how wide the subnet is. Typical values
98 are /24 (for 255 addresses) and /28 (for 15 addresses.)
101 to ping the hosts listed in the given file. This file can be in the
102 format used by \fI/etc/hosts\fP, or it can be any file that has host
103 names as the first element on each line. If you use ssh, try this:
105 sonar -ping $HOME/.ssh/known_hosts
109 Do not attempt to resolve IP addresses to hostnames.
112 Do not display ping times beneath the host names.
114 .B \-team-a-name \fIstring\fP
115 In simulation mode, the name of team A.
117 .B \-team-b-name \fIstring\fP
118 In simulation mode, the name of team B.
120 .B \-team-a-count \fIint\fP
121 In simulation mode, the number of bogies on team A.
123 .B \-team-b-count \fIint\fP
124 In simulation mode, the number of bogies on team B.
126 Configuration of the targets to ping is best done by setting X Resources.
129 .B background \fI(Color)\fP
130 See option \-background, above; default value is \fIblack\fP.
132 .B sweepColor \fI(Color)\fP
133 See option \-sweep\-color, above; default value is \fI#00ff00\fP.
135 .B scopeColor \fI(Color)\fP
136 See option \-scope\-color, above; default value is \fI#003300\fP.
138 .B gridColor \fI(Color)\fP
139 See option \-grid\-color, above; default value is \fI#00aa00\fP.
141 .B textColor \fI(Color)\fP
142 See option \-text\-color, above; default value is \fI#ffff00\fP.
144 .B ttl \fI(integer)\fP
145 See option \-ttl, above; default value is \fI90\fP or one sweep.
147 .B ping \fI(string)\fP
148 See option \-ping, above. If set to \fBdefault\fP, it will ping
149 the contents of /etc/hosts if possible, otherwise, will run in
153 See option \-font, above; default value is \fIfixed\fP.
155 .B pingTimeout \fI(Integer)\fP
156 See option \-pingtimeout, above; default value is 3000.
158 .B teamAName \fIstring\fP
159 See option \-team\-a\-name, above. Default value is \fBF18\fP.
161 .B teamBName \fIstring\fP
162 See option \-teamBName, above. Default value is \fBMIG\fP.
164 .B teamACount \fIint\fP
165 See option \-teamACount, above. Default value is 4.
167 .B teamBCount \fIint\fP
168 See option \-teamBCount, above. Default value is 4.
170 In order to use the ping sensor on most systems, this program must be
171 installed as setuid root, so that it can create an ICMP RAW socket.
172 Root privileges are disavowed shortly after startup (just after
173 connecting to the X server and reading the resource database) so this
174 is \fIbelieved\fP to be a safe thing to do, but it is usually
175 recommended that you have as few setuid programs around as possible,
176 on general principles.
178 chown root:root sonar
181 It is not necessary to make it setuid on MacOS systems, because on
182 those systems, unprivileged programs can ping by using ICMP DGRAM
183 sockets instead of ICMP RAW.
185 In ping-mode, the display is a logarithmic scale, calibrated so that the
186 three rings represent ping times of approximately 2.5, 70 and 2,000
187 milliseconds respectively.
189 This means that if any the hosts you are pinging take longer than 2
190 seconds to respond, they won't show up; and if you are pinging several
191 hosts with very fast response times, they will all appear close to the
192 center of the screen (making their names hard to read.)
195 .BR xscreensaver (1),
198 Copyright \(co 1998 by Stephen Martin. <smartin@canada.com>
199 Copyright \(co 2000-2004 by Jamie Zawinski <jwz@jwz.org>
201 Permission to use, copy, modify, distribute, and sell this software and its
202 documentation for any purpose is hereby granted without fee, provided that
203 the above copyright notice appear in all copies and that both that
204 copyright notice and this permission notice appear in supporting
205 documentation. No representations are made about the suitability of this
206 software for any purpose. It is provided "as is" without express or
210 Stephen Martin <smartin@canada.com>, 3-nov-98.
212 Thanks to Tom Kelly for suggesting a modular approach to the sensor
215 Thomas Bahls <thommy@cs.tu-berlin.de> hacked the "ttl" option, 12-jul-98.
217 Better subnet support and command-line processing by Jamie Zawinski, 17-Jul-00.