Tuesday 30 May 2017

What are those AIX fcstat error numbers all about?

What are those AIX fcstat error numbers all about?


When troubleshooting Fibre Channel adapter issues on AIX (or VIOS), I often use the fcstat command to assist me in the process. The command may display error numbers similar to the following:

$ fcstat fcs0

Error opening device: /dev/fscsi0
errno: 00000045

The error number (errno) displayed can (in some cases) be used to identify the root cause of a problem. In the example above, the error number is 45. This number is in hex. If we convert this to decimal, the number is 69. Now, if we look for 69 in the /usr/include/errno.h file (on AIX), we discover that this error number relates to a "Network is down" event.

# fcstat fcs0
Error opening device: /dev/fscsi0
errno: 00000045

# echo "ibase=16; 45"|bc
69

# grep 69 /usr/include/errno.h
#define ENETDOWN        69      /* Network is down */

The AIX error report (errpt or errlog on VIOS) also tells me that there's some type of link error. This helps me focus my investigation toward the most likely problem area. In this case, I suspect either a physical link or cable problem between my FC adapter and the SAN switch.

IDENTIFIER TIMESTAMP  T C RESOURCE_NAME  DESCRIPTION
7BFEEA1F   1116121816 T H fcs0           LINK ERROR

# errpt -aN fcs0 | grep -p Desc
...
Description
LINK ERROR

We can use the same process for other errors displayed by the fcstat command. For example:

# fcstat fcs0
Error opening device: /dev/fscsi0
errno: 00000046

# echo "ibase=16; 46"|bc
70

# grep 70 /usr/include/errno.h
#define ENETUNREACH     70      /* Network is unreachable */

This particular error may direct us to the solution outlined in the following tech note:

Fibre channel workspace takes over 2 minutes to load but returns no data


fcstat Command (AIX 6.1)

fcstat Command (AIX 7.1)

fcstat Command (AIX 7.2)

No comments:

Post a Comment