xref: /freebsd/usr.bin/rpcinfo/rpcinfo.8 (revision 2008043f386721d58158e37e0d7e50df8095942d)
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
50The
51.Nm
52utility makes an RPC call to an RPC
53server and reports what it finds.
54.Pp
55In the first synopsis,
56.Nm
57lists all the registered RPC services with
58.Nm rpcbind
59on
60.Ar host .
61If
62.Ar host
63is not specified, the local host is the default.
64If
65.Fl s
66is used, the information is displayed in a concise format.
67.Pp
68In the second synopsis,
69.Nm
70lists all the RPC services registered with
71.Nm rpcbind ,
72version 2.
73Also note that the format of the information
74is different in the first and the second synopsis.
75This is because the second synopsis is an older protocol used to
76collect the information displayed (version 2 of the
77.Nm rpcbind
78protocol).
79.Pp
80The third synopsis makes an RPC call to procedure 0
81of
82.Ar prognum
83and
84.Ar versnum
85on the specified
86.Ar host
87and reports whether a response was received.
88.Ar transport
89is the transport which has to be used for contacting the
90given service.
91The remote address of the service is obtained by
92making a call to the remote
93.Nm rpcbind .
94.Pp
95The
96.Ar prognum
97argument is a number that represents an RPC program number
98If a
99.Ar versnum
100is specified,
101.Nm
102attempts to call that version of the specified
103.Ar prognum .
104Otherwise,
105.Nm
106attempts to find all the registered version
107numbers for the specified
108.Ar prognum
109by calling version 0,
110which is presumed not to exist;
111if it does exist,
112.Nm
113attempts to obtain this information by calling
114an extremely high version number instead,
115and attempts to call each registered version.
116Note:
117the version number is required for
118.Fl b
119and
120.Fl d
121options.
122.Sh OPTIONS
123.Bl -tag -width indent
124.It Fl T Ar transport
125Specify the transport on which the service is required.
126If this option is not specified,
127.Nm
128uses the transport specified in the
129.Ev NETPATH
130environment variable, or if that is unset or empty, the transport
131in the
132.Xr netconfig 5
133database is used.
134This is a generic option,
135and can be used in conjunction with other options as
136shown in the
137.Sx SYNOPSIS .
138.It Fl a Ar serv_address
139Use
140.Ar serv_address
141as the (universal) address for the service on
142.Ar transport
143to ping procedure 0
144of the specified
145.Ar prognum
146and report whether a response was received.
147The
148.Fl T
149option is required with the
150.Fl a
151option.
152.Pp
153If
154.Ar versnum
155is not specified,
156.Nm
157tries to ping all
158available version numbers for that program number.
159This option avoids calls to remote
160.Nm rpcbind
161to find the address of the service.
162The
163.Ar serv_address
164is specified in universal address format of the given transport.
165.It Fl b
166Make an RPC broadcast to procedure 0
167of the specified
168.Ar prognum
169and
170.Ar versnum
171and report all hosts that respond.
172If
173.Ar transport
174is specified, it broadcasts its request only on the
175specified transport.
176If broadcasting is not supported by any
177transport,
178an error message is printed.
179Use of broadcasting should be limited because of the potential for adverse
180effect on other systems.
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.It Fl l
195Display a list of entries with a given
196.Ar prognum
197and
198.Ar versnum
199on the specified
200.Ar host .
201Entries are returned for all transports
202in the same protocol family as that used to contact the remote
203.Nm rpcbind .
204.It Fl m
205Display a table of statistics of
206.Nm rpcbind
207operations on the given
208.Ar host .
209The table shows statistics for each version of
210.Nm rpcbind
211(versions 2, 3 and 4), giving the number of times each procedure was
212requested and successfully serviced, the number and type of remote call
213requests that were made, and information about RPC address lookups that were
214handled.
215This is useful for monitoring RPC activities on
216.Ar host .
217.It Fl n Ar portnum
218Use
219.Ar portnum
220as the port number for the
221.Fl t
222and
223.Fl u
224options instead of the port number given by
225.Nm rpcbind .
226Use of this option avoids a call to the remote
227.Nm rpcbind
228to find out the address of the service.
229This option is made
230obsolete by the
231.Fl a
232option.
233.It Fl p
234Probe
235.Nm rpcbind
236on
237.Ar host
238using version 2 of the
239.Nm rpcbind
240protocol,
241and display a list of all registered RPC programs.
242If
243.Ar host
244is not specified, it defaults to the local host.
245Note: Version 2 of the
246.Nm rpcbind
247protocol was previously known as the portmapper protocol.
248.It Fl s
249Display a concise list of all registered RPC programs on
250.Ar host .
251If
252.Ar host
253is not specified, it defaults to the local host.
254.It Fl t
255Make an RPC call to procedure 0 of
256.Ar prognum
257on the specified
258.Ar host
259using TCP,
260and report whether a response was received.
261This option is made
262obsolete by the
263.Fl T
264option as shown in the third synopsis.
265.It Fl u
266Make an RPC call to procedure 0 of
267.Ar prognum
268on the specified
269.Ar host
270using UDP,
271and report whether a response was received.
272This option is made
273obsolete by the
274.Fl T
275option as shown in the third synopsis.
276.El
277.Sh EXAMPLES
278To show all of the RPC services registered on the local machine use:
279.Pp
280.Dl "example% rpcinfo"
281.Pp
282To show all of the RPC
283services registered with
284.Nm rpcbind
285on the machine named
286.Dq klaxon
287use:
288.Pp
289.Dl "example% rpcinfo klaxon"
290.Pp
291The information displayed by the above commands can be quite lengthy.
292Use the
293.Fl s
294option 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
307To show whether the RPC
308service with program number
309.Ar prognum
310and version
311.Ar versnum
312is
313registered on the machine named
314.Dq klaxon
315for the transport TCP
316use:
317.Pp
318.Dl "example% rpcinfo -T tcp klaxon prognum versnum"
319.Pp
320To show all RPC
321services registered with version 2 of the
322.Nm rpcbind
323protocol on the local machine use:
324.Pp
325.Dl "example% rpcinfo -p"
326.Pp
327To delete the registration for version
3281 of the
329.Nm walld
330(program number 100008)
331service for all transports use:
332.Pp
333.Dl "example# rpcinfo -d 100008 1"
334or
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
341