IBM i (as400) CIM and ethernet interfaces

179 views Asked by At

I'm trying to check Ethernet cards status on a remote IBM i (as400) machine with the wbemcli command :

wbemcli -nl ei ".../root/cimv2:IBMOS400_EthernetPort"

Tons of fields seem to describe the card's status, most of them empty :

(...)
-OperationalStatus=2
-StatusDescriptions="THE LINE IS IN USE."
-Status=
-HealthState=
-CommunicationStatus=
-DetailedStatus=
-OperatingStatus=
-PrimaryStatus=
-EnabledState=2
-OtherEnabledState=
-RequestedState=5
-EnabledDefault=6
-TimeOfLastStateChange=
-AvailableRequestedStates=
-TransitioningToState=12
(...)
-Availability=3
-StatusInfo=
(...)

The only non-empty fields just contain integers, I really don't know what to do with that. Has anyone a clue? I'm writing a script with the assumption that OperationalStatus=2 means "UP" and otherwise "DOWN", but well that's not reliable.

Thanks,

1

There are 1 answers

0
Buck Calabro On

Using the search term AS400 is likely to be fruitless; the operating system is called IBM i for many years, and that's where the current documentation is found. Anyway, what version of IBM i is the server running? If it's really old, you probably don't have good CIM support yet. Here's the manual for 7.1: (Starting at the Knowledge Center) IBM i 7.1 > Systems management > Common Information Model > Reference information for CIM > Hardware inventory and network management providers > IBM_EthernetPort Unfortunately, IBM's implementation of CIM is documented about as well as CIM's schema. Here's a link to Schema 2.40 CIM-Device which shows OperationalStatus, but simply defines it as uint16[]

There may be another gotcha - newer versions of IBM i can be virtualised and you may not be able to look at the physical hardware via CIM. I don't know that for a fact; it's something you'd need to research.

EDIT: How to test using PASE: It turns out that IBM i 7.1 (with appropriate PTFs) and 7.2 (my release) have CIM command line commands available, so I took a moment and tried some out. They run in PASE (call qp2term):

cimcli ni IBM_EthernetPort
IBM_EthernetPort.CreationClassName="IBM_EthernetPort",DeviceID="ETHLINE",SystemCreationClassName="IBMOS400_ComputerSystem",SystemName="my.system.com"
IBM_EthernetPort.CreationClassName="IBM_EthernetPort",DeviceID="ETHLINEPUB",SystemCreationClassName="IBMOS400_ComputerSystem",SystemName="my.system.com"
IBM_EthernetPort.CreationClassName="IBM_EthernetPort",DeviceID="ETHLINEPVT",SystemCreationClassName="IBMOS400_ComputerSystem",SystemName="my.system.com"

cimcli ei IBM_EthernetPort                          
path= IBM_EthernetPort.CreationClassName="IBM_EthernetPort",DeviceID="ETHLINE",SystemCreationClassName="IBMOS400_ComputerSystem",SystemName="my.system.com"

//Instance of IBM_EthernetPort
instance of IBM_EthernetPort  
{                             
InstanceID = NULL;            
Caption = "Ethernet port ETHLINE";                     
Description = "Ethernet port information for ETHLINE.";
ElementName = "ETHLINE";                               
InstallDate = NULL;                                    
Name = "ETHLINE";                                      
OperationalStatus = {2};                               
StatusDescriptions = {"The line is in use."};          
Status = NULL;                                         
HealthState = NULL;                                    
CommunicationStatus = NULL;                            
DetailedStatus = NULL;                                 
OperatingStatus = NULL;                                
PrimaryStatus = NULL;                                  
EnabledState = 2;                                      
OtherEnabledState = NULL;                              
RequestedState = 5;                                    
EnabledDefault = 6;                                    
...