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