1.\" Copyright 1989 AT&T 2.\" Copyright 1991 Sun Microsystems, Inc. 3.\" $NetBSD: rpcinfo.8,v 1.6 2000/06/02 23:19:38 fvdl Exp $ 4.Dd August 18, 1992 5.Dt RPCINFO 8 6.Os 7.Sh NAME 8.Nm rpcinfo 9.Nd report RPC information 10.Sh SYNOPSIS 11.Nm 12.Op Fl m | s 13.Op Ar host 14.Nm 15.Op Ar host 16.Nm 17.Fl T Ar transport 18.Ar host prognum 19.Op Ar versnum 20.Nm 21.Fl l 22.Op Fl T Ar transport 23.Ar host prognum 24.Op Ar versnum 25.Nm 26.Op Fl n Ar portnum 27.Fl u 28.Ar host prognum 29.Op Ar versnum 30.Nm 31.Op Fl n Ar portnum 32.Op Fl t 33.Ar host 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 versnum 44.Nm 45.Fl d 46.Op Fl T Ar transport 47.Ar prognum versnum 48.Sh DESCRIPTION 49The 50.Nm 51utility makes 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 empty, 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 136.Sx SYNOPSIS . 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.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.It Fl d 181Delete registration for the RPC service of the specified 182.Ar prognum 183and 184.Ar versnum . 185If 186.Ar transport 187is specified, 188unregister the service on only that transport, 189otherwise unregister the service on all 190the transports on which it was registered. 191Only the owner of a service can delete a registration, except the 192super-user who can delete any service. 193.It Fl l 194Display a list of entries with a given 195.Ar prognum 196and 197.Ar versnum 198on the specified 199.Ar host . 200Entries are returned for all transports 201in the same protocol family as that used to contact the remote 202.Nm rpcbind . 203.It Fl m 204Display a table of statistics of 205.Nm rpcbind 206operations on the given 207.Ar host . 208The table shows statistics for each version of 209.Nm rpcbind 210(versions 2, 3 and 4), giving the number of times each procedure was 211requested and successfully serviced, the number and type of remote call 212requests that were made, and information about RPC address lookups that were 213handled. 214This is useful for monitoring RPC activities on 215.Ar host . 216.It Fl n Ar portnum 217Use 218.Ar portnum 219as the port number for the 220.Fl t 221and 222.Fl u 223options instead of the port number given by 224.Nm rpcbind . 225Use of this option avoids a call to the remote 226.Nm rpcbind 227to find out the address of the service. 228This option is made 229obsolete by the 230.Fl a 231option. 232.It Fl p 233Probe 234.Nm rpcbind 235on 236.Ar host 237using version 2 of the 238.Nm rpcbind 239protocol, 240and display a list of all registered RPC programs. 241If 242.Ar host 243is not specified, it defaults to the local host. 244Note: Version 2 of the 245.Nm rpcbind 246protocol was previously known as the portmapper protocol. 247.It Fl s 248Display a concise list of all registered RPC programs on 249.Ar host . 250If 251.Ar host 252is not specified, it defaults to the local host. 253.It Fl t 254Make an RPC call to procedure 0 of 255.Ar prognum 256on the specified 257.Ar host 258using TCP, 259and report whether a response was received. 260This option is made 261obsolete by the 262.Fl T 263option as shown in the third synopsis. 264.It Fl u 265Make an RPC call to procedure 0 of 266.Ar prognum 267on the specified 268.Ar host 269using UDP, 270and report whether a response was received. 271This option is made 272obsolete by the 273.Fl T 274option as shown in the third synopsis. 275.El 276.Sh EXAMPLES 277To show all of the RPC services registered on the local machine use: 278.Pp 279.Dl "example% rpcinfo" 280.Pp 281To show all of the RPC 282services registered with 283.Nm rpcbind 284on the machine named 285.Dq klaxon 286use: 287.Pp 288.Dl "example% rpcinfo klaxon" 289.Pp 290The information displayed by the above commands can be quite lengthy. 291Use the 292.Fl s 293option to display a more concise list: 294.Pp 295.Dl "example$ rpcinfo -s klaxon" 296.Bl -column "program" "version(s)" "unix,tcp,udp,tcp6,udp6" "nlockmgr" "super-user" 297.It "program version(s) netid(s) service owner" 298.It "100000 2,3,4 unix,tcp,udp,tcp6,udp6 rpcbind super-user" 299.It "100008 1 udp,tcp,udp6,tcp6 walld super-user" 300.It "100002 2,1 udp,udp6 rusersd super-user" 301.It "100001 2,3,4 udp,udp6 rstatd super-user" 302.It "100012 1 udp,tcp sprayd super-user" 303.It "100007 3 udp,tcp ypbind super-user" 304.El 305.Pp 306To show whether the RPC 307service with program number 308.Ar prognum 309and version 310.Ar versnum 311is 312registered on the machine named 313.Dq klaxon 314for the transport TCP 315use: 316.Pp 317.Dl "example% rpcinfo -T tcp klaxon prognum versnum" 318.Pp 319To show all RPC 320services registered with version 2 of the 321.Nm rpcbind 322protocol on the local machine use: 323.Pp 324.Dl "example% rpcinfo -p" 325.Pp 326To delete the registration for version 3271 of the 328.Nm walld 329(program number 100008) 330service for all transports use: 331.Pp 332.Dl "example# rpcinfo -d 100008 1" 333or 334.Dl "example# rpcinfo -d walld 1" 335.Sh SEE ALSO 336.Xr rpc 3 , 337.Xr netconfig 5 , 338.Xr rpc 5 , 339.Xr rpcbind 8 340