http://www.jwz.org/xscreensaver/xscreensaver-5.07.tar.gz
[xscreensaver] / hacks / sonar.man
1 .de EX          \"Begin example
2 .ne 5
3 .if n .sp 1
4 .if t .sp .5
5 .nf
6 .in +.5i
7 ..
8 .de EE
9 .fi
10 .in -.5i
11 .if n .sp 1
12 .if t .sp .5
13 ..
14 .TH Sonar 1 "3-Nov-98" "X Version 11"
15 .SH NAME
16 sonar - display a sonar scope
17 .SH SYNOPSIS
18 .B sonar
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]
26 [\-ttl \fIinteger\fP]
27 [\-font \fIfont\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]
33 [\-no\-dns] 
34 [\-no\-times] 
35 [\-debug] 
36 [\-fps]
37 .SH DESCRIPTION
38 The \fIsonar\fP program displays a sonar scope on the computer's screen.
39 This scope polls a sensor as the sweep goes around the scope and displays
40 what it finds as bogies on the screen.  The program is designed to support
41 different modes representing different types of sensors.  Currently the
42 only implemented sensors are a simulator, and a network ping function that
43 pings hosts and plots the results on the scope.
44 .SH OPTIONS
45 .I sonar
46 understands the following options:
47 .TP 8
48 .B \-background \fIColor\fP
49 The background Color of the screen not covered by the scope.
50 .TP 8
51 .B \-sweep\-color \fIColor\fP
52 The color of the brightest part of the sweep.
53 .TP 8
54 .B \-scope\-color \fIColor\fP
55 The color of the circular part of the scope.
56 .TP 8
57 .B \-grid\-color \fIColor\fP
58 The color to the grid lines overlaying the scope.
59 .TP 8
60 .B \-text\-color \fIColor\fP
61 The color of the text identifying bogies on the scope.
62 .TP 8
63 .B \-ttl \fIinteger\fP
64 "Time to live": visible time of a Bogie. Try values between 10 (very short)
65 and 100. 
66 .TP 8
67 .B \-font \fIfont\fP
68 The font used to display text on the scope.  Default "fixed".
69 .TP 8
70 .B \-ping\-timeout \fIint\fP
71 The amount of time in milliseconds the program will wait for an answer
72 to a ping.
73 .TP 8
74 .B \-ping \fIhosts-or-subnets\fP
75 The list of things to ping, separated by commas or spaces. 
76 Elements of this list may be:
77 .RS 8
78 .TP 12
79 .B simulation
80 to run in simulation mode, instead of pinging real hosts (this is the default
81 if the program is not installed setuid);
82 .TP 12
83 .I hostname
84 to ping the given host;
85 .TP 12
86 .I A.B.C.D
87 to ping the given IP address;
88 .TP 12
89 .B subnet
90 to ping the local class C subnet (the nearest 255 addresses);
91 .TP 12
92 .B subnet/\fINN\fP
93 to ping a different-sized local subnet: e.g., \fBsubnet/28\fP would ping
94 a 4-bit subnet (the nearest 15 addresses);
95 .TP 12
96 .I A.B.C.D/NN
97 to ping an arbitrary other subnet: the IP address specifies the base address,
98 and the part after the slash is how wide the subnet is.  Typical values
99 are /24 (for 255 addresses) and /28 (for 15 addresses.)
100 .TP 12
101 .I filename
102 to ping the hosts listed in the given file.  This file can be in the
103 format used by \fI/etc/hosts\fP, or it can be any file that has host
104 names as the first element on each line.  If you use ssh, try this:
105
106   sonar -ping $HOME/.ssh/known_hosts
107 .RE
108 .TP 8
109 .B \-no\-dns
110 Do not attempt to resolve IP addresses to hostnames.
111 .TP 8
112 .B \-no\-times
113 Do not display ping times beneath the host names.
114 .TP 8
115 .B \-team-a-name \fIstring\fP
116 In simulation mode, the name of team A.
117 .TP 8
118 .B \-team-b-name \fIstring\fP
119 In simulation mode, the name of team B.
120 .TP 8
121 .B \-team-a-count \fIint\fP
122 In simulation mode, the number of bogies on team A.
123 .TP 8
124 .B \-team-b-count \fIint\fP
125 In simulation mode, the number of bogies on team B.
126 .TP 8
127 .B \-fps
128 Display the current frame rate and CPU load.
129 .SH RESOURCES
130 Configuration of the targets to ping is best done by setting X Resources.
131 .PP
132 .TP 8
133 .B background \fI(Color)\fP
134 See option \-background, above; default value is \fIblack\fP.
135 .TP 8
136 .B sweepColor \fI(Color)\fP
137 See option \-sweep\-color, above; default value is \fI#00ff00\fP.
138 .TP 8
139 .B scopeColor \fI(Color)\fP
140 See option \-scope\-color, above; default value is \fI#003300\fP.
141 .TP 8
142 .B gridColor \fI(Color)\fP
143 See option \-grid\-color, above; default value is \fI#00aa00\fP.
144 .TP 8
145 .B textColor \fI(Color)\fP
146 See option \-text\-color, above; default value is \fI#ffff00\fP.
147 .TP 8
148 .B ttl \fI(integer)\fP
149 See option \-ttl, above; default value is \fI90\fP or one sweep.
150 .TP 8
151 .B ping \fI(string)\fP
152 See option \-ping, above.  If set to \fBdefault\fP, it will ping
153 the contents of /etc/hosts if possible, otherwise, will run in
154 simulation-mode.
155 .TP 8
156 .B font \fI(font)\fP
157 See option \-font, above; default value is \fIfixed\fP.
158 .TP 8
159 .B pingTimeout \fI(Integer)\fP
160 See option \-pingtimeout, above; default value is 3000.
161 .TP 8
162 .B teamAName \fIstring\fP
163 See option \-team\-a\-name, above.  Default value is \fBF18\fP.
164 .TP 8
165 .B teamBName \fIstring\fP
166 See option \-teamBName, above.  Default value is \fBMIG\fP.
167 .TP 8
168 .B teamACount \fIint\fP
169 See option \-teamACount, above.  Default value is 4.
170 .TP 8
171 .B teamBCount \fIint\fP
172 See option \-teamBCount, above.  Default value is 4.
173 .SH NOTES
174 In order to use the ping sensor on most systems, this program must be
175 installed as setuid root, so that it can create an ICMP RAW socket.
176 Root privileges are disavowed shortly after startup (just after
177 connecting to the X server and reading the resource database) so this
178 is \fIbelieved\fP to be a safe thing to do, but it is usually
179 recommended that you have as few setuid programs around as possible,
180 on general principles.
181 .EX
182 chown root:root sonar
183 chmod u+s sonar
184 .EE
185 It is not necessary to make it setuid on MacOS systems, because on
186 those systems, unprivileged programs can ping by using ICMP DGRAM
187 sockets instead of ICMP RAW.
188
189 In ping-mode, the display is a logarithmic scale, calibrated so that the
190 three rings represent ping times of approximately 2.5, 70 and 2,000
191 milliseconds respectively.  
192
193 This means that if any the hosts you are pinging take longer than 2
194 seconds to respond, they won't show up; and if you are pinging several
195 hosts with very fast response times, they will all appear close to the
196 center of the screen (making their names hard to read.)
197 .SH SEE ALSO
198 .BR X (1),
199 .BR xscreensaver (1),
200 .BR ping (8)
201 .SH COPYRIGHT
202 Copyright \(co 1998 by Stephen Martin. <smartin@canada.com>
203 Copyright \(co 2000-2004 by Jamie Zawinski <jwz@jwz.org>
204
205 Permission to use, copy, modify, distribute, and sell this software and its
206 documentation for any purpose is hereby granted without fee, provided that
207 the above copyright notice appear in all copies and that both that
208 copyright notice and this permission notice appear in supporting
209 documentation.  No representations are made about the suitability of this
210 software for any purpose.  It is provided "as is" without express or 
211 implied warranty.
212
213 .SH AUTHORS
214 Stephen Martin <smartin@canada.com>, 3-nov-98.
215
216 Thanks to Tom Kelly for suggesting a modular approach to the sensor
217 among other things.
218
219 Thomas Bahls <thommy@cs.tu-berlin.de> hacked the "ttl" option, 12-jul-98.
220
221 Better subnet support and command-line processing by Jamie Zawinski, 17-Jul-00.