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