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