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.14 2009/04/08 13:28:16 joerg 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: 116the version number is required for 117.Fl b 118and 119.Fl d 120options. 121.Sh OPTIONS 122.Bl -tag -width indent 123.It Fl T Ar transport 124Specify the transport on which the service is required. 125If this option is not specified, 126.Nm 127uses the transport specified in the 128.Ev NETPATH 129environment variable, or if that is unset or null, the transport 130in the 131.Xr netconfig 5 132database is used. 133This is a generic option, 134and can be used in conjunction with other options as 135shown in the SYNOPSIS. 136.Pp 137.It Fl a Ar serv_address 138Use 139.Ar serv_address 140as the (universal) address for the service on 141.Ar transport 142to ping procedure 0 143of the specified 144.Ar prognum 145and report whether a response was received. 146The 147.Fl T 148option is required with the 149.Fl a 150option. 151.Pp 152If 153.Ar versnum 154is not specified, 155.Nm 156tries to ping all 157available version numbers for that program number. 158This option avoids calls to remote 159.Nm rpcbind 160to find the address of the service. 161The 162.Ar serv_address 163is specified in universal address format of the given transport. 164.Pp 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.Pp 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.Pp 196.It Fl l 197Display a list of entries with a given 198.Ar prognum 199and 200.Ar versnum 201on the specified 202.Ar host . 203Entries are returned for all transports 204in the same protocol family as that used to contact the remote 205.Nm rpcbind . 206.Pp 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. This 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. This option is made 232obsolete 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. This option is made 266obsolete 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. This option is made 277obsolete 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