rpcinfo makes an RPC call to an rpcbind daemon (portmapper) and reports the result.
If the rpcinfo command is specified with the option -p, all the RPC services are listed which are registered with the rpcbind daemon.
If the rpcinfo command is specified with the option -T, rpcinfo makes an RPC call to the procedure 0 of program and version on the specified host and reports whether a response was received. transport is the transport route which has to be used for contacting the given service. The remote address of the service is obtained by making a call to the remote rpcbind daemon.
Path: /usr/bin
Syntax
rpcinfo[ host] |
rpcinfo -p[ host] |
rpcinfo -T transport host program version |
rpcinfo[ -n portnum] -u host program version |
rpcinfo[ -n portnum] -t host program version |
rpcinfo -a serv_address -T transport program[ version] |
|
Name of a remote computer. The default host is the local host. If you specify the rpcinfo command with host, the RPC services registered with rpcbind on host are listed. |
Specifies the transport route on which the service is required. If this option is not specified, rpcinfo |
This uses serv_address as the (universal) address for the service on transport in order to perform a status check with the ping command on procedure 0 of the specified program and to report whether a response was received. The -a option can only be used with the -T option. If the version number is not specified, rpcinfo attempts with the ping command to find out all the available version numbers for this program number. This option avoids calls to rpcbind on remote computers to locate the address of the service. The serv_address has the format of the universal address of the given transport route. |
Deletes the registration for the RPC service of the specified program and the specified version. If transport is specified, the service is unregistered only on that transport path. Otherwise, the RPC service is unregistered on all transport routes on which it was registered. This option can only be used by a privileged user. |
Uses portnum as the port number for the options -t and -u instead of the port number given by the rpcbind. Use of this option avoids a call to the remote rpcbind to find out the address of the service. |
Probes the rpcbind on host and outputs a list of all registered RPC programs. If host is not specified, the local host is the default host. |
Makes an RPC call to procedure 0 of program on the specified host using TCP and reports whether a response was received. |
Makes an RPC call to procedure 0 of program on the specified host using UDP and reports whether a response was received. |
Program number, given as a number. Program name or alias name according to the configuration file /etc/rpc. |
If a version is specified, rpcinfo attempts to call that version of the specified program. Otherwise, rpcinfo attempts to find all registered version numbers for the specified program by calling version 0, which is presumed not to exist; if it does exist, rpcinfo attempts to obtain this information by calling an extremely high version number instead, and attempts to call each registered version. Note that the version number is required for the option -d. |
Examples
Example 1:
Show all of the RPC services registered on the local computer:
$ rpcinfo program version netid address service owner 100000 3 udp 0.0.0.0.0.111 portmapper superuser 100000 2 udp 0.0.0.0.0.111 portmapper superuser 100000 3 tcp 0.0.0.0.0.111 portmapper superuser 100000 2 tcp 0.0.0.0.0.111 portmapper superuser ... 100003 2 udp 0.0.0.0.8.1 nfs superuser 100003 3 udp 0.0.0.0.8.1 nfs superuser ... 100005 1 udp 0.0.0.0.20.177 mountd superuser 100005 1 tcp 0.0.0.0.20.178 mountd superuser 100005 3 udp 0.0.0.0.20.177 mountd superuser 100005 3 tcp 0.0.0.0.20.178 mountd superuser ...
Example 2:
Show all of the RPC services registered with rpcbind on the computer klaxon:
$ rpcinfo klaxon ...
Example 3:
Show whether the RPC service with program number 200007 and version 3 is registered on the computer klaxon for the transport route tcp:
$ rpcinfo -T tcp klaxon 200007 3 program 200007 version 3 ready and waiting
Example 4:
Show all of the RPC services registered with the rpcbind on the local computer:
$ rpcinfo -p program vers proto port 100000 3 udp 111 portmapper 100000 2 udp 111 portmapper 100000 3 tcp 111 portmapper 100000 2 tcp 111 portmapper 100003 2 udp 2049 nfs 100003 3 udp 2049 nfs 100005 1 udp 5297 mountd 100005 1 tcp 5298 mountd 100005 3 udp 5297 mountd 100005 3 tcp 5298 mountd 150001 1 udp 603 pcnfsd 100024 1 tcp 5301 status 100024 1 udp 5302 status 100021 1 tcp 5304 async-nlockmgr 100021 1 udp 5305 async-nlockmgr 100021 2 tcp 5304 async-nlockmgr 100021 2 udp 5305 async-nlockmgr 100021 3 tcp 5304 async-nlockmgr 100021 3 udp 5305 async-nlockmgr 100021 4 tcp 5304 async-nlockmgr 100021 4 udp 5305 async-nlockmgr
Example 5:
Check the status of nfs (program number 100003) on the host bs2host1:
$ egrep '^nfs' /etc/rpc nfs 100003 nfsprog $ rpcinfo -T udp bs2host1 nfs program 100003 version 2 ready and waiting program 100003 version 3 ready and waiting
Example 6:
Delete the registration for version 1 of the walld service (program number 100008) for all transport routes:
$ rpcinfo -d 100008 1