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.7 2001/04/04 09:42:49 wiz Exp $ 5.Dd August 18, 1992 6.Dt RPCINFO 8 7.Sh NAME 8.Nm rpcinfo 9.Nd report RPC information 10.Sh SYNOPSIS 11.Nm "" 12.Op Fl m Li \&| Fl s 13.Op Ar host 14.Nm "" 15.Op Ar host 16.Nm "" 17.Fl T Ar transport 18.Ar host Ar prognum 19.Op Ar versnum 20.Nm "" 21.Fl l 22.Op Fl T Ar transport 23.Ar host Ar prognum 24.Op Ar versnum 25.Nm "" 26.Op Fl n Ar portnum 27.Fl u 28.Ar host Ar prognum 29.Op Ar versnum 30.Nm "" 31.Op Fl n Ar portnum 32.Op Fl t 33.Ar host Ar 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 Ar versnum 44.Nm "" 45.Fl d 46.Op Fl T Ar transport 47.Ar prognum Ar versnum 48.Sh DESCRIPTION 49.Nm 50makes an RPC call to an RPC 51server and reports what it finds. 52.Pp 53In the first synopsis, 54.Nm 55lists all the registered RPC services with 56.Nm rpcbind 57on 58.Ar host . 59If 60.Ar host 61is not specified, the local host is the default. 62If 63.Fl s 64is used, the information is displayed in a concise format. 65.Pp 66In the second synopsis, 67.Nm 68lists all the RPC services registered with 69.Nm rpcbind , 70version 2. 71Also note that the format of the information 72is different in the first and the second synopsis. 73This is because the second synopsis is an older protocol used to 74collect the information displayed (version 2 of the 75.Nm rpcbind 76protocol). 77.Pp 78The third synopsis makes an RPC call to procedure 0 79of 80.Ar prognum 81and 82.Ar versnum 83on the specified 84.Ar host 85and reports whether a response was received. 86.Ar transport 87is the transport which has to be used for contacting the 88given service. 89The remote address of the service is obtained by 90making a call to the remote 91.Nm rpcbind . 92.Pp 93The 94.Ar prognum 95argument is a number that represents an RPC program number 96If a 97.Ar versnum 98is specified, 99.Nm 100attempts to call that version of the specified 101.Ar prognum . 102Otherwise, 103.Nm 104attempts to find all the registered version 105numbers for the specified 106.Ar prognum 107by calling version 0, 108which is presumed not to exist; 109if it does exist, 110.Nm 111attempts to obtain this information by calling 112an extremely high version number instead, 113and attempts to call each registered version. 114Note: 115the version number is required for 116.Fl b 117and 118.Fl d 119options. 120.Pp 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.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.Fl l 197Display a list of entries with a given 198.Ar prognum 199and 200.Ar versnum 201on the specified 202.IR 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.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" "w,x,y,z" "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 and version 320.Ar versnum is 321registered on the machine named 322.Nm klaxon 323for the transport TCP 324use: 325.Pp 326.Bd -literal 327 example% rpcinfo -T tcp klaxon prognum versnum 328.Ed 329.Pp 330To show all RPC 331services registered with version 2 of the 332.Nm rpcbind 333protocol on the local machine use: 334.Bd -literal 335 example% rpcinfo -p 336.Ed 337.Pp 338To delete the registration for version 3391 of the 340.Nm walld 341(program number 100008 ) 342service for all transports use: 343.Bd -literal 344 example# rpcinfo -d 100008 1 345.Ed 346.Pp 347or 348.Bd -literal 349 example# rpcinfo -d walld 1 350.Ed 351.Sh SEE ALSO 352.Xr rpc 3 , 353.Xr netconfig 5 , 354.Xr rpc 5 , 355.Xr rpcbind 8 356