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