rpcinfo.8 (1878217deb4bb913122cf9b7f3045d3f85253776) | rpcinfo.8 (e99a5be3952a324ef039e8fe70761aa29850d62e) |
---|---|
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 | 1.\" from: @(#)rpcinfo.8c 2.2 88/08/03 4.0 RPCSRC; from 1.24 88/02/25 SMI 2.\" $Id: rpcinfo.8,v 1.1 1993/09/13 23:22:41 jtc Exp $ 3.\" 4.Dd December 17, 1987 |
7.Dt RPCINFO 8 8.Os 9.Sh NAME 10.Nm rpcinfo 11.Nd report RPC information 12.Sh SYNOPSIS | 5.Dt RPCINFO 8 6.Os 7.Sh NAME 8.Nm rpcinfo 9.Nd report RPC information 10.Sh SYNOPSIS |
13.Nm 14.Op Fl m | s | 11.Nm rpcinfo 12.Fl p |
15.Op Ar host | 13.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 | 14.Nm rpcinfo |
28.Op Fl n Ar portnum | 15.Op Fl n Ar portnum |
29.Fl u 30.Ar host prognum 31.Op Ar versnum 32.Nm | 16.Fl u Ar host 17.Ar program 18.Op Ar version 19.Nm rpcinfo |
33.Op Fl n Ar portnum | 20.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 | 21.Fl t Ar host 22.Ar program 23.Op Ar version 24.Nm rpcinfo |
43.Fl b | 25.Fl b |
44.Op Fl T Ar transport 45.Ar prognum versnum 46.Nm | 26.Ar program version 27.Nm rpcinfo |
47.Fl d | 28.Fl d |
48.Op Fl T Ar transport 49.Ar prognum versnum | 29.Ar program version |
50.Sh DESCRIPTION | 30.Sh DESCRIPTION |
51The 52.Nm 53utility makes an RPC call to an RPC | 31.Nm rpcinfo 32makes an 33.Tn RPC 34call to an 35.Tn RPC |
54server and reports what it finds. | 36server 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 | 37.Sh OPTIONS 38.Bl -tag -width indent 39.It Fl p 40Probe the portmapper on 41.Ar host , 42and print a list of all registered 43.Tn RPC 44programs. If |
63.Ar host | 45.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 | 46is not specified, it defaults to the value returned by 47.Xr hostname 1 . 48.It Fl u 49Make an 50.Tn RPC 51call to procedure 0 of 52.Ar program |
86on the specified 87.Ar host | 53on the specified 54.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 . | 55using 56.Tn UDP , 57and report whether a response was received. 58.It Fl t 59Make an 60.Tn RPC 61call to procedure 0 of 62.Ar program 63on the specified 64.Ar host 65using 66.Tn TCP , 67and report whether a response was received. 68.It Fl n 69Use 70.Ar portnum 71as the port number for the 72.Fl t 73and 74.Fl u 75options instead of the port number given by the portmapper. 76.It Fl b 77Make an 78.Tn RPC 79broadcast to procedure 0 of the specified 80.Ar program 81and 82.Ar version 83using 84.Tn UDP 85and report all hosts that respond. 86.It Fl d 87Delete registration for the 88.Tn RPC 89service of the specified 90.Ar program 91and 92.Ar version . 93This option can be exercised only by the super-user. 94.El |
95.Pp 96The | 95.Pp 96The |
97.Ar prognum 98argument is a number that represents an RPC program number | 97.Ar program 98argument can be either a name or a number. 99.Pp |
99If a | 100If a |
100.Ar versnum | 101.Ar version |
101is specified, | 102is specified, |
102.Nm | 103.Nm rpcinfo |
103attempts to call that version of the specified | 104attempts to call that version of the specified |
104.Ar prognum . | 105.Ar program . |
105Otherwise, | 106Otherwise, |
106.Nm | 107.Nm rpcinfo |
107attempts to find all the registered version 108numbers for the specified | 108attempts to find all the registered version 109numbers for the specified |
109.Ar prognum 110by calling version 0, 111which is presumed not to exist; 112if it does exist, 113.Nm | 110.Ar program 111by calling version 0 (which is presumed not 112to exist; if it does exist, 113.Ar rpcinfo |
114attempts to obtain this information by calling | 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 | 115an extremely high version 116number instead) and attempts to call each registered version. 117Note: the version number is required for |
119.Fl b 120and 121.Fl d 122options. | 118.Fl b 119and 120.Fl d 121options. |
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 | 122.Sh EXAMPLES |
279To show all of the RPC services registered on the local machine use: | 123To show all of the 124.Tn RPC 125services registered on the local machine use: |
280.Pp | 126.Pp |
281.Dl "example% rpcinfo" | 127.Dl example% rpcinfo -p |
282.Pp | 128.Pp |
283To show all of the RPC 284services registered with 285.Nm rpcbind 286on the machine named 287.Dq klaxon | 129To show all of the 130.Tn RPC 131services registered on the machine named 132.Ar klaxon |
288use: 289.Pp | 133use: 134.Pp |
290.Dl "example% rpcinfo klaxon" | 135.Dl example% rpcinfo -p klaxon |
291.Pp | 136.Pp |
292The information displayed by the above commands can be quite lengthy. 293Use the 294.Fl s 295option to display a more concise list: | 137To show all machines on the local net that are running the Yellow Pages 138service use: |
296.Pp | 139.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 | 140.Dl example% rpcinfo -b ypserv 'version' | uniq |
307.Pp | 141.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: | 142where 'version' is the current Yellow Pages version obtained from the 143results of the 144.Fl p 145switch above. |
318.Pp | 146.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 | 147To delete the registration for version 1 of the |
330.Nm walld | 148.Nm walld |
331(program number 100008) 332service for all transports use: | 149service use: |
333.Pp | 150.Pp |
334.Dl "example# rpcinfo -d 100008 1" 335or 336.Dl "example# rpcinfo -d walld 1" | 151.Dl example% rpcinfo -d walld 1 |
337.Sh SEE ALSO | 152.Sh SEE ALSO |
338.Xr rpc 3 , 339.Xr netconfig 5 , | |
340.Xr rpc 5 , | 153.Xr rpc 5 , |
341.Xr rpcbind 8 | 154.Xr portmap 8 155.Rs 156.%T "RPC Programming Guide" 157.Re 158.Sh BUGS 159In releases prior to SunOS 3.0, the Network File System (NFS) did not 160register itself with the portmapper; 161.Nm rpcinfo 162cannot be used to make 163.Tn RPC 164calls to the 165.Tn NFS 166server on hosts running such releases. |