Smarts SAM: How to list all interfaces and ports to detect underlap in Performance Instrumentation
search cancel

Smarts SAM: How to list all interfaces and ports to detect underlap in Performance Instrumentation

book

Article ID: 332214

calendar_today

Updated On:

Products

VMware Smart Assurance

Environment

VMware Smart Assurance - SMARTS

Resolution

To list interfaces and ports, the following sample ASL script can be used as a reference guide: 

START {
        .. eol

        GET_INTERFACES
}


GET_INTERFACES do {
        sep = " ; ";

        print("Interface;Name;Type;DeviceID;SystemModel;SystemName");

        foreach int (getInstances("Interface")) {
                Obj = object("Interface", int);

                cu = "UNKNOWN";
                cu = Obj->CurrentUtilization?IGNORE;

                print(Obj->CreationClassName.sep.
                        Obj->Name.sep.
                        Obj->Type.sep.
                        Obj->DeviceID.sep.
                        Obj->SystemModel.sep.
                        Obj->SystemName.sep.
                        cu.sep.
                        Obj->MaxSpeed);
                }
        }