Initial import of binutils 2.22 on the new vendor branch
[dragonfly.git] / usr.bin / rpcinfo / rpcinfo.8
1 .\" @(#)rpcinfo.1m 1.23 93/03/29 SMI; from SVr4
2 .\" Copyright 1989 AT&T
3 .\" Copyright 1991 Sun Microsystems, Inc.
4 .\" $NetBSD: rpcinfo.8,v 1.6 2000/06/02 23:19:38 fvdl Exp $
5 .\" $FreeBSD: src/usr.bin/rpcinfo/rpcinfo.8,v 1.9 2002/10/16 15:38:28 charnier Exp $
6 .\" $DragonFly: src/usr.bin/rpcinfo/rpcinfo.8,v 1.3 2005/08/01 01:49:18 swildner Exp $
7 .\"
8 .Dd August 18, 1992
9 .Dt RPCINFO 8
10 .Os
11 .Sh NAME
12 .Nm rpcinfo
13 .Nd report RPC information
14 .Sh SYNOPSIS
15 .Nm
16 .Op Fl m | s
17 .Op Ar host
18 .Nm
19 .Op Ar host
20 .Nm
21 .Fl T Ar transport
22 .Ar host prognum
23 .Op Ar versnum
24 .Nm
25 .Fl l
26 .Op Fl T Ar transport
27 .Ar host prognum
28 .Op Ar versnum
29 .Nm
30 .Op Fl n Ar portnum
31 .Fl u
32 .Ar host prognum
33 .Op Ar versnum
34 .Nm
35 .Op Fl n Ar portnum
36 .Op Fl t
37 .Ar host prognum
38 .Op Ar versnum
39 .Nm
40 .Fl a Ar serv_address
41 .Fl T Ar transport
42 .Ar prognum
43 .Op Ar versnum
44 .Nm
45 .Fl b
46 .Op Fl T Ar transport
47 .Ar prognum versnum
48 .Nm
49 .Fl d
50 .Op Fl T Ar transport
51 .Ar prognum versnum
52 .Sh DESCRIPTION
53 The
54 .Nm
55 utility makes an RPC call to an RPC
56 server and reports what it finds.
57 .Pp
58 In the first synopsis,
59 .Nm
60 lists all the registered RPC services with
61 .Nm rpcbind
62 on
63 .Ar host .
64 If
65 .Ar host
66 is not specified, the local host is the default.
67 If
68 .Fl s
69 is used, the information is displayed in a concise format.
70 .Pp
71 In the second synopsis,
72 .Nm
73 lists all the RPC services registered with
74 .Nm rpcbind ,
75 version 2.
76 Also note that the format of the information
77 is different in the first and the second synopsis.
78 This is because the second synopsis is an older protocol used to
79 collect the information displayed (version 2 of the
80 .Nm rpcbind
81 protocol).
82 .Pp
83 The third synopsis makes an RPC call to procedure 0
84 of
85 .Ar prognum
86 and
87 .Ar versnum
88 on the specified
89 .Ar host
90 and reports whether a response was received.
91 .Ar transport
92 is the transport which has to be used for contacting the
93 given service.
94 The remote address of the service is obtained by
95 making a call to the remote
96 .Nm rpcbind .
97 .Pp
98 The
99 .Ar prognum
100 argument is a number that represents an RPC program number
101 If a
102 .Ar versnum
103 is specified,
104 .Nm
105 attempts to call that version of the specified
106 .Ar prognum .
107 Otherwise,
108 .Nm
109 attempts to find all the registered version
110 numbers for the specified
111 .Ar prognum
112 by calling version 0,
113 which is presumed not to exist;
114 if it does exist,
115 .Nm
116 attempts to obtain this information by calling
117 an extremely high version number instead,
118 and attempts to call each registered version.
119 Note:
120 the version number is required for
121 .Fl b
122 and
123 .Fl d
124 options.
125 .Sh OPTIONS
126 .Bl -tag -width indent
127 .It Fl T Ar transport
128 Specify the transport on which the service is required.
129 If this option is not specified,
130 .Nm
131 uses the transport specified in the
132 .Ev NETPATH
133 environment variable, or if that is unset or empty, the transport
134 in the
135 .Xr netconfig 5
136 database is used.
137 This is a generic option,
138 and can be used in conjunction with other options as
139 shown in the
140 .Sx SYNOPSIS .
141 .It Fl a Ar serv_address
142 Use
143 .Ar serv_address
144 as the (universal) address for the service on
145 .Ar transport
146 to ping procedure 0
147 of the specified
148 .Ar prognum
149 and report whether a response was received.
150 The
151 .Fl T
152 option is required with the
153 .Fl a
154 option.
155 .Pp
156 If
157 .Ar versnum
158 is not specified,
159 .Nm
160 tries to ping all
161 available version numbers for that program number.
162 This option avoids calls to remote
163 .Nm rpcbind
164 to find the address of the service.
165 The
166 .Ar serv_address
167 is specified in universal address format of the given transport.
168 .It Fl b
169 Make an RPC broadcast to procedure 0
170 of the specified
171 .Ar prognum
172 and
173 .Ar versnum
174 and report all hosts that respond.
175 If
176 .Ar transport
177 is specified, it broadcasts its request only on the
178 specified transport.
179 If broadcasting is not supported by any
180 transport,
181 an error message is printed.
182 Use of broadcasting should be limited because of the potential for adverse
183 effect on other systems.
184 .It Fl d
185 Delete registration for the RPC service of the specified
186 .Ar prognum
187 and
188 .Ar versnum .
189 If
190 .Ar transport
191 is specified,
192 unregister the service on only that transport,
193 otherwise unregister the service on all
194 the transports on which it was registered.
195 Only the owner of a service can delete a registration, except the
196 super-user who can delete any service.
197 .It Fl l
198 Display a list of entries with a given
199 .Ar prognum
200 and
201 .Ar versnum
202 on the specified
203 .Ar host .
204 Entries are returned for all transports
205 in the same protocol family as that used to contact the remote
206 .Nm rpcbind .
207 .It Fl m
208 Display a table of statistics of
209 .Nm rpcbind
210 operations on the given
211 .Ar host .
212 The table shows statistics for each version of
213 .Nm rpcbind
214 (versions 2, 3 and 4), giving the number of times each procedure was
215 requested and successfully serviced, the number and type of remote call
216 requests that were made, and information about RPC address lookups that were
217 handled.
218 This is useful for monitoring RPC activities on
219 .Ar host .
220 .It Fl n Ar portnum
221 Use
222 .Ar portnum
223 as the port number for the
224 .Fl t
225 and
226 .Fl u
227 options instead of the port number given by
228 .Nm rpcbind .
229 Use of this option avoids a call to the remote
230 .Nm rpcbind
231 to find out the address of the service.
232 This option is made
233 obsolete by the
234 .Fl a
235 option.
236 .It Fl p
237 Probe
238 .Nm rpcbind
239 on
240 .Ar host
241 using version 2 of the
242 .Nm rpcbind
243 protocol,
244 and display a list of all registered RPC programs.
245 If
246 .Ar host
247 is not specified, it defaults to the local host.
248 Note: Version 2 of the
249 .Nm rpcbind
250 protocol was previously known as the portmapper protocol.
251 .It Fl s
252 Display a concise list of all registered RPC programs on
253 .Ar host .
254 If
255 .Ar host
256 is not specified, it defaults to the local host.
257 .It Fl t
258 Make an RPC call to procedure 0 of
259 .Ar prognum
260 on the specified
261 .Ar host
262 using TCP,
263 and report whether a response was received.
264 This option is made
265 obsolete by the
266 .Fl T
267 option as shown in the third synopsis.
268 .It Fl u
269 Make an RPC call to procedure 0 of
270 .Ar prognum
271 on the specified
272 .Ar host
273 using UDP,
274 and report whether a response was received.
275 This option is made
276 obsolete by the
277 .Fl T
278 option as shown in the third synopsis.
279 .El
280 .Sh EXAMPLES
281 To show all of the RPC services registered on the local machine use:
282 .Pp
283 .Dl "example% rpcinfo"
284 .Pp
285 To show all of the RPC
286 services registered with
287 .Nm rpcbind
288 on the machine named
289 .Dq klaxon
290 use:
291 .Pp
292 .Dl "example% rpcinfo klaxon"
293 .Pp
294 The information displayed by the above commands can be quite lengthy.
295 Use the
296 .Fl s
297 option to display a more concise list:
298 .Pp
299 .Dl "example$ rpcinfo -s klaxon"
300 .Bl -column "program" "version(s)" "unix,tcp,udp,tcp6,udp6" "nlockmgr" "super-user"
301 .It "program    version(s)      netid(s)        service owner"
302 .It "100000     2,3,4   unix,tcp,udp,tcp6,udp6  rpcbind super-user"
303 .It "100008     1       udp,tcp,udp6,tcp6       walld   super-user"
304 .It "100002     2,1     udp,udp6        rusersd super-user"
305 .It "100001     2,3,4   udp,udp6        rstatd  super-user"
306 .It "100012     1       udp,tcp sprayd  super-user"
307 .It "100007     3       udp,tcp ypbind  super-user"
308 .El
309 .Pp
310 To show whether the RPC
311 service with program number
312 .Ar prognum
313 and version
314 .Ar versnum
315 is
316 registered on the machine named
317 .Dq klaxon
318 for the transport TCP
319 use:
320 .Pp
321 .Dl "example% rpcinfo -T tcp klaxon prognum versnum"
322 .Pp
323 To show all RPC
324 services registered with version 2 of the
325 .Nm rpcbind
326 protocol on the local machine use:
327 .Pp
328 .Dl "example% rpcinfo -p"
329 .Pp
330 To delete the registration for version
331 1 of the
332 .Nm walld
333 (program number 100008)
334 service for all transports use:
335 .Pp
336 .Dl "example# rpcinfo -d 100008 1"
337 or
338 .Dl "example# rpcinfo -d walld 1"
339 .Sh SEE ALSO
340 .Xr rpc 3 ,
341 .Xr netconfig 5 ,
342 .Xr rpc 5 ,
343 .Xr rpcbind 8