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]
35 The \fIsonar\fP program displays a sonar scope on the computer's screen.
36 This scope polls a sensor as the sweep goes around the scope and displays
37 what it finds as bogies on the screen. The program is designed to support
38 different modes representing different types of sensors. Currently the
39 only implemented sensors are a simulator, and a network ping function that
40 pings hosts and plots the results on the scope.
43 understands the following options:
45 .B \-background \fIColor\fP
46 The background Color of the screen not covered by the scope.
48 .B \-sweep\-color \fIColor\fP
49 The color of the brightest part of the sweep.
51 .B \-scope\-color \fIColor\fP
52 The color of the circular part of the scope.
54 .B \-grid\-color \fIColor\fP
55 The color to the grid lines overlaying the scope.
57 .B \-text\-color \fIColor\fP
58 The color of the text identifying bogies on the scope.
60 .B \-ttl \fIinteger\fP
61 "Time to live": visible time of a Bogie. Try values between 10 (very short)
65 The font used to display text on the scope. Default "fixed".
67 .B \-ping\-timeout \fIint\fP
68 The amount of time in milliseconds the program will wait for an answer
71 .B \-ping \fIhosts-or-subnets\fP
72 The list of things to ping, separated by commas or spaces.
73 Elements of this list may be:
77 to run in simulation mode, instead of pinging real hosts (this is the default
78 if the program is not installed setuid);
81 to ping the given host;
84 to ping the given IP address;
87 to ping the local class C subnet (the nearest 255 addresses);
90 to ping a different-sized local subnet: e.g., \fBsubnet/28\fP would ping
91 a 4-bit subnet (the nearest 15 addresses);
94 to ping an arbitrary other subnet: the IP address specifies the base address,
95 and the part after the slash is how wide the subnet is. Typical values
96 are /24 (for 255 addresses) and /28 (for 15 addresses.)
99 to ping the hosts listed in the given file. This file can be in the
100 format used by \fI/etc/hosts\fP, or it can be any file that has host
101 names as the first element on each line. If you use ssh, try this:
103 sonar -ping $HOME/.ssh/known_hosts
106 .B \-team-a-name \fIstring\fP
107 In simulation mode, the name of team A.
109 .B \-team-b-name \fIstring\fP
110 In simulation mode, the name of team B.
112 .B \-team-a-count \fIint\fP
113 In simulation mode, the number of bogies on team A.
115 .B \-team-b-count \fIint\fP
116 In simulation mode, the number of bogies on team B.
118 Configuration of the targets to ping is best done by setting X Resources.
121 .B background \fI(Color)\fP
122 See option \-background, above; default value is \fIblack\fP.
124 .B sweepColor \fI(Color)\fP
125 See option \-sweep\-color, above; default value is \fI#00ff00\fP.
127 .B scopeColor \fI(Color)\fP
128 See option \-scope\-color, above; default value is \fI#003300\fP.
130 .B gridColor \fI(Color)\fP
131 See option \-grid\-color, above; default value is \fI#00aa00\fP.
133 .B textColor \fI(Color)\fP
134 See option \-text\-color, above; default value is \fI#ffff00\fP.
136 .B ttl \fI(integer)\fP
137 See option \-ttl, above; default value is \fI90\fP or one sweep.
139 .B ping \fI(string)\fP
140 See option \-ping, above. If set to \fBdefault\fP, it will ping
141 the contents of /etc/hosts if possible, otherwise, will run in
145 See option \-font, above; default value is \fIfixed\fP.
147 .B pingTimeout \fI(Integer)\fP
148 See option \-pingtimeout, above; default value is 3000.
150 .B teamAName \fIstring\fP
151 See option \-team\-a\-name, above. Default value is \fBF18\fP.
153 .B teamBName \fIstring\fP
154 See option \-teamBName, above. Default value is \fBMIG\fP.
156 .B teamACount \fIint\fP
157 See option \-teamACount, above. Default value is 4.
159 .B teamBCount \fIint\fP
160 See option \-teamBCount, above. Default value is 4.
162 In order to use the ping sensor, this program must be installed as
163 setuid root, so that it can create an ICMP socket. Root privileges
164 are disavowed shortly after startup (just after connecting to the
165 X server and reading the resource database) so this is \fIbelieved\fP
166 to be a safe thing to do, but it is usually recommended that you
167 have as few setuid programs around as possible, on general principles.
169 chown root.root sonar
174 .BR xscreensaver (1),
177 Copyright \(co 1998 by Stephen Martin. (smartin@canada.com)
179 Permission to use, copy, modify, distribute, and sell this software and its
180 documentation for any purpose is hereby granted without fee, provided that
181 the above copyright notice appear in all copies and that both that
182 copyright notice and this permission notice appear in supporting
183 documentation. No representations are made about the suitability of this
184 software for any purpose. It is provided "as is" without express or
188 Stephen Martin <smartin@canada.com>, 3-nov-98.
190 Thanks to Tom Kelly for suggesting a modular approach to the sensor
193 Thomas Bahls <thommy@cs.tu-berlin.de> hacked the "ttl" option, 12-jul-98.
195 Better subnet support and command-line processing by Jamie Zawinski, 17-Jul-00.