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