http://ftp.ksu.edu.tw/FTP/FreeBSD/distfiles/xscreensaver-4.20.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 .SH DESCRIPTION
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.
43 .SH OPTIONS
44 .I sonar
45 understands the following options:
46 .TP 8
47 .B \-background \fIColor\fP
48 The background Color of the screen not covered by the scope.
49 .TP 8
50 .B \-sweep\-color \fIColor\fP
51 The color of the brightest part of the sweep.
52 .TP 8
53 .B \-scope\-color \fIColor\fP
54 The color of the circular part of the scope.
55 .TP 8
56 .B \-grid\-color \fIColor\fP
57 The color to the grid lines overlaying the scope.
58 .TP 8
59 .B \-text\-color \fIColor\fP
60 The color of the text identifying bogies on the scope.
61 .TP 8
62 .B \-ttl \fIinteger\fP
63 "Time to live": visible time of a Bogie. Try values between 10 (very short)
64 and 100. 
65 .TP 8
66 .B \-font \fIfont\fP
67 The font used to display text on the scope.  Default "fixed".
68 .TP 8
69 .B \-ping\-timeout \fIint\fP
70 The amount of time in milliseconds the program will wait for an answer
71 to a ping.
72 .TP 8
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:
76 .RS 8
77 .TP 12
78 .B simulation
79 to run in simulation mode, instead of pinging real hosts (this is the default
80 if the program is not installed setuid);
81 .TP 12
82 .I hostname
83 to ping the given host;
84 .TP 12
85 .I A.B.C.D
86 to ping the given IP address;
87 .TP 12
88 .B subnet
89 to ping the local class C subnet (the nearest 255 addresses);
90 .TP 12
91 .B subnet/\fINN\fP
92 to ping a different-sized local subnet: e.g., \fBsubnet/28\fP would ping
93 a 4-bit subnet (the nearest 15 addresses);
94 .TP 12
95 .I A.B.C.D/NN
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.)
99 .TP 12
100 .I filename
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:
104
105   sonar -ping $HOME/.ssh/known_hosts
106 .RE
107 .TP 8
108 .B \-no\-dns
109 Do not attempt to resolve IP addresses to hostnames.
110 .TP 8
111 .B \-no\-times
112 Do not display ping times beneath the host names.
113 .TP 8
114 .B \-team-a-name \fIstring\fP
115 In simulation mode, the name of team A.
116 .TP 8
117 .B \-team-b-name \fIstring\fP
118 In simulation mode, the name of team B.
119 .TP 8
120 .B \-team-a-count \fIint\fP
121 In simulation mode, the number of bogies on team A.
122 .TP 8
123 .B \-team-b-count \fIint\fP
124 In simulation mode, the number of bogies on team B.
125 .SH RESOURCES
126 Configuration of the targets to ping is best done by setting X Resources.
127 .PP
128 .TP 8
129 .B background \fI(Color)\fP
130 See option \-background, above; default value is \fIblack\fP.
131 .TP 8
132 .B sweepColor \fI(Color)\fP
133 See option \-sweep\-color, above; default value is \fI#00ff00\fP.
134 .TP 8
135 .B scopeColor \fI(Color)\fP
136 See option \-scope\-color, above; default value is \fI#003300\fP.
137 .TP 8
138 .B gridColor \fI(Color)\fP
139 See option \-grid\-color, above; default value is \fI#00aa00\fP.
140 .TP 8
141 .B textColor \fI(Color)\fP
142 See option \-text\-color, above; default value is \fI#ffff00\fP.
143 .TP 8
144 .B ttl \fI(integer)\fP
145 See option \-ttl, above; default value is \fI90\fP or one sweep.
146 .TP 8
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
150 simulation-mode.
151 .TP 8
152 .B font \fI(font)\fP
153 See option \-font, above; default value is \fIfixed\fP.
154 .TP 8
155 .B pingTimeout \fI(Integer)\fP
156 See option \-pingtimeout, above; default value is 3000.
157 .TP 8
158 .B teamAName \fIstring\fP
159 See option \-team\-a\-name, above.  Default value is \fBF18\fP.
160 .TP 8
161 .B teamBName \fIstring\fP
162 See option \-teamBName, above.  Default value is \fBMIG\fP.
163 .TP 8
164 .B teamACount \fIint\fP
165 See option \-teamACount, above.  Default value is 4.
166 .TP 8
167 .B teamBCount \fIint\fP
168 See option \-teamBCount, above.  Default value is 4.
169 .SH NOTES
170 In order to use the ping sensor, this program must be installed as 
171 setuid root, so that it can create an ICMP socket.  Root privileges
172 are disavowed shortly after startup (just after connecting to the
173 X server and reading the resource database) so this is \fIbelieved\fP
174 to be a safe thing to do, but it is usually recommended that you 
175 have as few setuid programs around as possible, on general principles.
176 .EX
177 chown root.root sonar
178 chmod u+s sonar
179 .EE
180 In ping-mode, the display is a logarithmic scale, calibrated so that the
181 three rings represent ping times of approximately 2.5, 70 and 2,000
182 milliseconds respectively.  
183
184 This means that if any the hosts you are pinging take longer than 2
185 seconds to respond, they won't show up; and if you are pinging several
186 hosts with very fast response times, they will all appear close to the
187 center of the screen (making their names hard to read.)
188 .SH SEE ALSO
189 .BR X (1),
190 .BR xscreensaver (1),
191 .BR ping (8)
192 .SH COPYRIGHT
193 Copyright \(co 1998 by Stephen Martin. <smartin@canada.com>
194 Copyright \(co 2000-2004 by Jamie Zawinski <jwz@jwz.org>
195
196 Permission to use, copy, modify, distribute, and sell this software and its
197 documentation for any purpose is hereby granted without fee, provided that
198 the above copyright notice appear in all copies and that both that
199 copyright notice and this permission notice appear in supporting
200 documentation.  No representations are made about the suitability of this
201 software for any purpose.  It is provided "as is" without express or 
202 implied warranty.
203
204 .SH AUTHORS
205 Stephen Martin <smartin@canada.com>, 3-nov-98.
206
207 Thanks to Tom Kelly for suggesting a modular approach to the sensor
208 amoung other things.
209
210 Thomas Bahls <thommy@cs.tu-berlin.de> hacked the "ttl" option, 12-jul-98.
211
212 Better subnet support and command-line processing by Jamie Zawinski, 17-Jul-00.