The correct answer is: A. rpcinfo
rpcinfo is a command-line utility for querying and controlling remote procedure call (RPC) services. It can be used to list the services that are available on a remote system, to determine the status of a service, and to control the execution of a service.
The following command can be used to see the services running in NFS server:
rpcinfo -p servername
Where servername is the name of the NFS server.
The output of the command will show the following information for each service:
- The service name
- The program number
- The version number
- The protocol version
- The port number
- The address of the server
For example, the following output shows the services running on an NFS server named “server1”:
program vers proto port service
100000 2 tcp 2049 nfs
100003 2 tcp 2049 nfs
100005 2 tcp 2049 nfs
100005 3 tcp 2049 nfs
100005 4 tcp 2049 nfs
The first column shows the service name. The second column shows the program number. The third column shows the protocol version. The fourth column shows the port number. The fifth column shows the service name.
The following options are available for the rpcinfo command:
- -p: This option specifies the name of the remote system to connect to.
- -s: This option specifies the service to query.
- -u: This option specifies the user name to use when connecting to the remote system.
- -w: This option specifies the password to use when connecting to the remote system.
- -l: This option lists all of the services that are available on the remote system.
- -a: This option lists all of the services that are available on the remote system, including those that are not running.
- -d: This option displays detailed information about a service.
- -v: This option displays version information about a service.
- -h: This option displays help information.
For more information about the rpcinfo command, see the man page for rpcinfo.