you can also do this via SNMP, using the aruba-rs mib, i.e.
snmpwalk -v2c -c public -O0X -mALL -M. 1.2.3.4 wlsxRemoteWiredPortTable
or
snmptable -v2c -c public -O0X -mALL -M. 1.2.3.4 wlsxRemoteWiredPortTable
Those two commands are to executed from within a directory that contains the aruba mibs and standard mibs. Secret above is public, controller is 1.2.3.4
There is a caveat - the MIB will report the ports whether they are up or down, but a down port does not have a valid speed, so don't be misled. Some APs report the down port with auto duplex, others with half etc. In summary, you can only trust the status of a port that is "Up", i.e. in the example below only 6c:f3:7f:c2:0d:74][1] is valid (i.e. first port on the AP with MAC ending c2:0d:74)
WLSX-RS-MIB::remotePortSpeed[STRING: 18:64:72:c1:36:7e][1] = INTEGER: speedAuto(4)
WLSX-RS-MIB::remotePortSpeed[STRING: 6c:f3:7f:c2:0d:74][1] = INTEGER: speed1000Mbps(3)
WLSX-RS-MIB::remotePortSpeed[STRING: 6c:f3:7f:c5:64:a6][1] = INTEGER: speed10Mbps(1)
WLSX-RS-MIB::remotePortSpeed[STRING: 6c:f3:7f:c5:64:a6][2] = INTEGER: speed10Mbps(1)
WLSX-RS-MIB::remotePortOperState[STRING: 18:64:72:c1:36:7e][1] = INTEGER: down(2)
WLSX-RS-MIB::remotePortOperState[STRING: 6c:f3:7f:c2:0d:74][1] = INTEGER: up(1)
WLSX-RS-MIB::remotePortOperState[STRING: 6c:f3:7f:c5:64:a6][1] = INTEGER: down(2)
WLSX-RS-MIB::remotePortOperState[STRING: 6c:f3:7f:c5:64:a6][2] = INTEGER: down(2)
WLSX-RS-MIB::remotePortDuplex[STRING: 18:64:72:c1:36:7e][1] = INTEGER: auto(3)
WLSX-RS-MIB::remotePortDuplex[STRING: 6c:f3:7f:c2:0d:74][1] = INTEGER: full(2)
WLSX-RS-MIB::remotePortDuplex[STRING: 6c:f3:7f:c5:64:a6][1] = INTEGER: half(1)
WLSX-RS-MIB::remotePortDuplex[STRING: 6c:f3:7f:c5:64:a6][2] = INTEGER: half(1)
Hence, if you use snmpwalk you have to parse it twice (dump to file, filter on MAC with up status, reparse filtering on those macs). There is an easier and more recommended way, that is to use snmptable and grep out only the rows with up (and the header row to make it easy to read)
example:
root@bt:/mibs/6.4.2.8# snmptable -v2c -c public -O0X -mALL -M. 1.2.3.4 wlsxRemoteWiredPortTable | egrep -e "remote|up"
remotePortMAC remotePortMode remotePortSlotNumber remotePortPortNumber remotePortType remotePortAdminState remotePortOperState remotePortSpeed remotePortDuplex remotePortTxPackets remotePortTxBytes remotePortRxPackets remotePortRxBytes remotePortDot3azStatus remotePortName remotePortPoEState remotePortSTPState
6c:f3:7f:c2:0d:74 notApplicable 0 0 gigabitethernet enabled up speed1000Mbps full 3060961 424853848 16061618 356301460 "00 " bond0 notAvailable notAvailable
ac:a3:1e:c5:1e:f4 notApplicable 0 0 gigabitethernet enabled up speed1000Mbps full 23884269 246536473 35136225 1943497863 "00 " bond0 notAvailable notAvailable
root@bt:/mibs/6.4.2.8#
now we just have two rows, AP c2:0d:74 and c5:1e:f4, and if we scroll right we see both have an ethernet port that is up on 1G full
note snmpwalk and snmptable are part of the Net-SNMP suite (www.net-snmp.org) they should be available by default on most full featured Linux distros, binaries also exist for windows etc.
regards
-jeff