xref: /netbsd/usr.bin/rpcinfo/rpcinfo.8 (revision bf9ec67e)
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.12 2002/01/13 07:15:50 fair Exp $
5.Dd August 18, 1992
6.Dt RPCINFO 8
7.Sh NAME
8.Nm rpcinfo
9.Nd report RPC information
10.Sh SYNOPSIS
11.Nm ""
12.Op Fl m Li \&| Fl s
13.Op Ar host
14.Nm ""
15.Fl p Op Ar host
16.Nm ""
17.Fl T Ar transport
18.Ar host Ar prognum
19.Op Ar versnum
20.Nm ""
21.Fl l
22.Op Fl T Ar transport
23.Ar host Ar prognum
24.Op Ar versnum
25.Nm ""
26.Op Fl n Ar portnum
27.Fl u
28.Ar host Ar prognum
29.Op Ar versnum
30.Nm ""
31.Op Fl n Ar portnum
32.Op Fl t
33.Ar host Ar 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 Ar versnum
44.Nm ""
45.Fl d
46.Op Fl T Ar transport
47.Ar prognum Ar versnum
48.Sh DESCRIPTION
49.Nm
50makes an RPC call to an RPC
51server and reports what it finds.
52.Pp
53In the first synopsis,
54.Nm
55lists all the registered RPC services with
56.Nm rpcbind
57on
58.Ar host .
59If
60.Ar host
61is not specified, the local host is the default.
62If
63.Fl s
64is used, the information is displayed in a concise format.
65.Pp
66In the second synopsis,
67.Nm
68lists all the RPC services registered with
69.Nm rpcbind ,
70version 2.
71Also note that the format of the information
72is different in the first and the second synopsis.
73This is because the second synopsis is an older protocol used to
74collect the information displayed (version 2 of the
75.Nm rpcbind
76protocol).
77.Pp
78The third synopsis makes an RPC call to procedure 0
79of
80.Ar prognum
81and
82.Ar versnum
83on the specified
84.Ar host
85and reports whether a response was received.
86.Ar transport
87is the transport which has to be used for contacting the
88given service.
89The remote address of the service is obtained by
90making a call to the remote
91.Nm rpcbind .
92.Pp
93The
94.Ar prognum
95argument is a number that represents an RPC program number.
96If a
97.Ar versnum
98is specified,
99.Nm
100attempts to call that version of the specified
101.Ar prognum .
102Otherwise,
103.Nm
104attempts to find all the registered version
105numbers for the specified
106.Ar prognum
107by calling version 0,
108which is presumed not to exist;
109if it does exist,
110.Nm
111attempts to obtain this information by calling
112an extremely high version number instead,
113and attempts to call each registered version.
114Note:
115the version number is required for
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. This is useful for monitoring RPC activities on
217.Ar host .
218.Pp
219.It Fl n Ar portnum
220Use
221.Ar portnum
222as the port number for the
223.Fl t
224and
225.Fl u
226options instead of the port number given by
227.Nm rpcbind .
228Use of this option avoids a call to the remote
229.Nm rpcbind
230to find out the address of the service. This option is made
231obsolete by the
232.Fl a
233option.
234.Pp
235.It Fl p
236Probe
237.Nm rpcbind
238on
239.Ar host
240using version 2 of the
241.Nm rpcbind
242protocol,
243and display a list of all registered RPC programs.
244If
245.Ar host
246is not specified, it defaults to the local host.
247Note: Version 2 of the
248.Nm rpcbind
249protocol was previously known as the portmapper protocol.
250.Pp
251.It Fl s
252Display a concise list of all registered RPC programs on
253.Ar host .
254If
255.Ar host
256is not specified, it defaults to the local host.
257.Pp
258.It Fl t
259Make an RPC call to procedure 0 of
260.Ar prognum
261on the specified
262.Ar host
263using TCP,
264and report whether a response was received. This option is made
265obsolete by the
266.Fl T
267option as shown in the third synopsis.
268.Pp
269.It Fl u
270Make an RPC call to procedure 0 of
271.Ar prognum
272on the specified
273.Ar host
274using UDP,
275and report whether a response was received. This option is made
276obsolete by the
277.Fl T
278option as shown in the third synopsis.
279.El
280.Sh EXAMPLES
281To show all of the RPC services registered on the local machine use:
282.Pp
283.Bd -literal
284	example% rpcinfo
285.Ed
286.Pp
287To show all of the RPC
288services registered with
289.Nm rpcbind
290on the machine named
291.Nm klaxon
292use:
293.Pp
294.Bd -literal
295	example% rpcinfo klaxon
296.Ed
297.Pp
298The information displayed by the above commands can be quite lengthy.
299Use the
300.Fl s
301option to display a more concise list:
302.Pp
303.Bd -literal
304	example$ rpcinfo -s klaxon
305.Ed
306.Bl -column "program" "w,x,y,z" "local,tcp,udp,tcp6,udp6" "nlockmgr" "super-user"
307.It program Ta version(s) Ta netid(s) Ta service Ta owner
308.It 100000 Ta 2,3,4 Ta local,tcp,udp,tcp6,udp6 Ta rpcbind Ta super-user
309.It 100008 Ta 1 Ta udp,tcp,udp6,tcp6 Ta walld Ta super-user
310.It 100002 Ta 2,1 Ta udp,udp6 Ta rusersd Ta super-user
311.It 100001 Ta 2,3,4 Ta udp,udp6 Ta rstatd Ta super-user
312.It 100012 Ta 1 Ta udp,tcp Ta sprayd Ta super-user
313.It 100007 Ta 3 Ta udp,tcp Ta ypbind Ta super-user
314.El
315.Pp
316To show whether the RPC
317service with program number
318.Ar prognum
319and version
320.Ar versnum
321is registered on the machine named
322.Nm klaxon
323for the transport TCP
324use:
325.Pp
326.Bd -literal
327	example% rpcinfo -T tcp klaxon prognum versnum
328.Ed
329.Pp
330To show all RPC
331services registered with version 2 of the
332.Nm rpcbind
333protocol on the local machine use:
334.Bd -literal
335	example% rpcinfo -p
336.Ed
337.Pp
338To delete the registration for version
3391 of the
340.Nm walld
341(program number 100008 )
342service for all transports use:
343.Bd -literal
344	example# rpcinfo -d 100008 1
345.Ed
346.Pp
347or
348.Bd -literal
349	example# rpcinfo -d walld 1
350.Ed
351.Sh SEE ALSO
352.Xr rpc 3 ,
353.Xr netconfig 5 ,
354.Xr rpc 5 ,
355.Xr rpcbind 8
356