cancel
Showing results for 
Search instead for 
Did you mean: 

Way to list APs by ethernet speed?

Greg_WiGuy
Contributor II
We're trying to figure out how many of our APs are connected with 100Mbps uplinks but can't seem to find a way to report on this easily.  So far the only method I know of is to check each AP individually from the monitoring page.

Is anyone aware of a report or even a command I could run to show all the AP ethernet connection speeds in one page?
5 REPLIES 5

albert_pierson
RUCKUS Team Member
Hi Greg,

The AP CLI command to check that is :get eth

Unfortunately with vSZ you cannot run AP CLI commands to all AP's (as in ZD with -A option) from the vSZ CLI.  The vSZ CLI command: remote ap-cli "get eth" can only be run to one MAC address at at time

The AP CLI GUI script tool only permits doing AP CLI set commands - it cannot be used for get commands, so this tool will not get you this information.

The only thing I can think of is to use some SSH scripting tool that takes a list of AP MAC addresses (this can be output from Monitor AP's using the CSV export feature) and having the script input the MAC into the remote ap-cli "get eth".

I do not have examples or experience with this type of scripting.


This would be a handy tool for getting data directly from AP's since query on the AP directly using CLI commands produces the most current and correct information.

I will keep digging around for another solution, maybe someone else on the Forum has a better idea!!!

Sorry for the less then perfect response.

Albert Pierson

Thanks for responding so quickly Albert.  I created a block of text with the command for all APs by exporting a CSV and copying the MACs into an advanced text editor.  Sample below:

remote ap-cli 0C:F4:D5:01:01:01 "get eth"
remote ap-cli 0C:F4:D5:01:01:02 "get eth"
remote ap-cli 0C:F4:D5:01:01:03 "get eth"
remote ap-cli 0C:F4:D5:01:01:04 "get eth"

Unfortunately it seems that the SZ console requires the output to be returned before the next command is input, and only returns info for the first AP.  This prevents me of pasting any block of these commands and makes this process super tedious.

Any other suggestions?

diego_garcia_de
Contributor III
You should be able to do it with the API. See below for an example in python:
import requests
import json

# define the APs you want to list here:
apList = ['34:8F:26:AA:BB:CC', '30:87:D8:00:11:22', '30:87:D9:33:44:55']

# define username / password / ip or url below
username="admin"
password="[password]"
baseUrl="https://[smartzoneurl-or-ip]:8443/wsg/api/scg

# the rest should not need any changes

loginData={
  "username": username,
  "password": password,
  "timeZoneUtcOffset": "+03:00"
}


headers = {"Content-Type": "application/json;charset=UTF-8"}
login=requests.post(baseUrl + "/session", headers=headers, data=json.dumps(loginData))
print login.text
print login.status_code

if (login.status_code == requests.codes.ok):
    cookieJar=login.cookies
    for myAp in apList:
        apStatusReq=requests.get( baseUrl + '/aps/' + myAp  ,cookies=cookieJar, headers=headers)
        if (apStatusReq.status_code != requests.codes.ok or not apStatusReq.json()['success']):
            print myAp, "Not Found!"
            continue
        for portInfo in apStatusReq.json()['data']['lanPortStatus']:
            print myAp,  portInfo['interfaceName'], portInfo['logicLink'], portInfo['phyLink']
    logoutRequest=requests.delete(baseUrl + '/session', headers=headers, cookies=cookieJar)
    print logoutRequest.status_code
This will print a list of all ports and status for each of the APs listed in the "apList"  array. The code could be modified to walk all the APs in the controller.. but it should be a good start.

you just need to have python installed somewhere (the example above is for python 2.x) with the "requests" package installed.


the output looks like this
34:8F:27:AA:BB:CC eth0 Up Up 1000Mbps full
34:8F:27:AA:BB:CC eth1 Down Down
30:87:D8:00:11:22 Not Found!
30:87:D9:33:44:55 eth1 Down Down
30:87:D9:33:44:55 eth2 Down Down
30:87:D9:33:44:55 eth3 Down Down
30:87:D9:33:44:55 eth4 Up Up 100Mbps full
30:87:D9:33:44:55 eth0 Up Up 1000Mbps full
Hope it helps!

Thank you for this!  I guess it's time for me to start learning python 🙂