clnt_perrno - Linux


clnt_perrno() translates a numeric error code into a text string.


int clnt_perrno(int err);


  • err: The numeric error code to translate.


# Print the error string for the error code 17
printf("Error: %s\n", clnt_perrno(17));

# Check if the error code is EACCES (permission denied)
if (clnt_perrno(err) == EACCES) {
  printf("Permission denied\n");

Common Issues

  • Incorrect error code: Ensure that the provided error code is a valid NFS error code. Invalid codes will result in unspecified behavior.


clnt_perrno() can be used with other NFS-related functions, such as clnt_perror(), to provide more detailed error handling.

Related Commands

  • rpcinfo: Provides information about NFS clients and servers.
  • nfsstat: Monitors NFS performance and statistics.