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