LinuxCommandLibrary

rpcinfo

Report RPC information

TLDR

Show full table of all RPC services registered on localhost

$ rpcinfo
copy

Show concise table of all RPC services registered on localhost
$ rpcinfo -s [localhost]
copy

Display table of statistics of rpcbind operations on localhost
$ rpcinfo -m
copy

Display list of entries of given service name (mountd) and version number (2) on a remote nfs share
$ rpcinfo -l [remote_nfs_server_ip] [mountd] [2]
copy

Delete the registration for version 1 of the mountd service for all transports
$ rpcinfo -d [mountd] [1]
copy

SYNOPSIS

rpcinfo [-p] [-t ] [-u ] [-s ] [host] [program] [version]

PARAMETERS

-p
    Probe the RPC portmapper on the specified host (or localhost if no host specified), and print a list of all registered RPC programs. This is the default action.

-t
    Make an RPC call to the specified program and version on the specified host using TCP. can be udp or tcp.

-u
    Make an RPC call to the specified program and version on the specified host using UDP. can be udp or tcp.

-s
    Display a concise list of all registered RPC programs on the specified host.

host
    The host to query. If not specified, defaults to localhost.

program
    The RPC program number to query.

version
    The RPC program version number to query.

DESCRIPTION

The `rpcinfo` command is a utility used to make Remote Procedure Call (RPC) calls to an RPC server and report the results. It is primarily used to query RPC services on a host, displaying registered RPC programs, versions, and transport protocols. It helps in troubleshooting RPC-based applications by providing information about available services. You can use it to verify that a particular RPC service is running and accessible. The command is a core tool for system administrators and developers working with Network File System (NFS), Network Information Service (NIS), and other RPC-based applications. `rpcinfo` can query a specific host or broadcast the request to all hosts on a network. It displays the program number, version, protocol, and port of the RPC service if it is found. It's a valuable tool for understanding and debugging distributed systems. `rpcinfo` supports various transports, including UDP and TCP.

CAVEATS

RPC services must be running and configured correctly for `rpcinfo` to function properly. Firewall rules or network configurations might prevent `rpcinfo` from reaching the target host or service.

EXIT STATUS

The `rpcinfo` command returns an exit status of 0 on success, and a non-zero value on failure. Failures can be due to network errors, the RPC service not being available, or incorrect parameters.

EXAMPLES

List registered RPC programs on localhost:
rpcinfo -p

Check if NFS version 3 is running on a host:
rpcinfo -t 100003 3
or
rpcinfo -u 100003 3

HISTORY

The `rpcinfo` command has been a part of Unix-like operating systems for a long time, since the early days of RPC and NFS. It was designed to provide a simple way to discover and verify RPC services. Over time, its functionality has remained relatively consistent, serving as a crucial tool for network administrators. It allows to monitor services in a distributed system.

SEE ALSO

portmap(8), nfs(5)

Copied to clipboard