× NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Reply

Re: Generating "Wireless Stations" output via ssh

bmomjian
Guide

Generating "Wireless Stations" output via ssh

I would like to generate the output of this WAC730 webpage via ssh:

 

    https://wap.home/admin.cgi?action=wireless_stations

 

I see the 'wl' command, but I don't see how to create that output.

Model: WAC730|3x3 Wireless-AC Access Points
Message 1 of 14

Accepted Solutions
bmomjian
Guide

Re: Generating "Wireless Stations" output via ssh

Sorry, I meant just the data rate.  My later post (that keeps getting deleted) has tx/rx rates from "wl -i wlan0 sta_info".  In my script I loop over the "wl -i wlan0 assoclist" MAC addresses and call "sta_info" for each MAC address, and that does have tx/rx rates.  I would post that script but am afraid the post will get deleted again like the last two tries.

View solution in original post

Model: WAC730|3x3 Wireless-AC Access Points
Message 8 of 14

All Replies
schumaku
Guru

Re: Generating "Wireless Stations" output via ssh

Most information (plus some more) is available by SNMP in the stationListTable .1.3.6.1.4.1.4526.100.7.19.8.1. Much easier to handle but SSH and text.

Message 2 of 14
RaghuHR
NETGEAR Expert

Re: Generating "Wireless Stations" output via ssh

 
 
 

Hi @bmomjian   you can use the following command to list the Wireless Stations via SSH

1) login to the AP via SSH with admin credentials

2) Then give following command

     get association detail

 

Thanks,

Raghu

Message 3 of 14
bmomjian
Guide

Re: Generating "Wireless Stations" output via ssh

I am displaying it as text so ssh seemed fine.  See my post below in how I am using it.

Model: WAC730|3x3 Wireless-AC Access Points
Message 4 of 14
bmomjian
Guide

Re: Generating "Wireless Stations" output via ssh

Uh, I have posted my script twice in this thread and each time the post appears in the thread, but when I back to review it, it is gone.  Do scripts have to be approved or something?

 

Message 5 of 14
bmomjian
Guide

Re: Generating "Wireless Stations" output via ssh

Yes, that works, but is that doesn't show the tx/rx rate, which does show on the "Wireless Stations" web page.  Is there any way to get that information?

Model: WAC730|3x3 Wireless-AC Access Points
Message 6 of 14
schumaku
Guru

Re: Generating "Wireless Stations" output via ssh

Curious on where you see Tx _and_ Rx data rates ... Web UI here does only show the (Tx) Rate. SNMP queries does not unveil Rx Rate (at least of the clients we have currently connected, it returns "Not Support" on .1.3.6.1.4.1.4526.100.7.19.8.1.1.14 aka. rxDataRate.

Message 7 of 14
bmomjian
Guide

Re: Generating "Wireless Stations" output via ssh

Sorry, I meant just the data rate.  My later post (that keeps getting deleted) has tx/rx rates from "wl -i wlan0 sta_info".  In my script I loop over the "wl -i wlan0 assoclist" MAC addresses and call "sta_info" for each MAC address, and that does have tx/rx rates.  I would post that script but am afraid the post will get deleted again like the last two tries.

Model: WAC730|3x3 Wireless-AC Access Points
Message 8 of 14
RaghuHR
NETGEAR Expert

Re: Generating "Wireless Stations" output via ssh

@bmomjian you can send me your script via PM. We will check and update you.

 

Thanks,

Raghu

Message 9 of 14
bmomjian
Guide

Re: Generating "Wireless Stations" output via ssh

I am going to try and repost my script without any display of MAC addresses, which might have caused my blocking previously.  The script I used was:

wl -i wlan0 assoclist |
cut -d' ' -f2 |
while read MAC
do  wl -i wlan0 sta_info "$MAC" |
      egrep 'data bytes:|rate of last' |
      tr -d '\n' |
      (echo -n "$MAC"; cat; echo)
done | awk '{print $1, $5, $9, $15, $22}'

and I use an awk script to store the previous counter values and compute the differences every five seconds to display:

Name                TX bytes   RX bytes    TX rate    RX rate       Load
jack.home               4387       1368          1          6       4615
bill.home               2873          0          1          6       2873
sally.home              3081       5222         72         24        260
fred.home            1789935      10917         72          6      26603
jill.home               3729        815         19         24        225

I don't think there is anything on the web interface that shows continual traffic changes.

Model: WAC730|3x3 Wireless-AC Access Points
Message 10 of 14
RaghuHR
NETGEAR Expert

Re: Generating "Wireless Stations" output via ssh

@bmomjian can you check the following command ? This will give tx rate but not rx.

 

get association station tx-rate

Message 11 of 14
bmomjian
Guide

Re: Generating "Wireless Stations" output via ssh

Yes, that does work, but I would also need to run that for rx-rate, and that fails for me:

# /splashbin/get association station rx-rate
Property "rx-rate" not found.

also run 'get association detail', and join those together on mac address.  It might be faster than just probing each mac address via 'wl sta_info', but without rx, I don't see the point. I compute a 'Load' based on  bytes / rate for tx and rx.

 

Model: WAC730|3x3 Wireless-AC Access Points
Message 12 of 14
RaghuHR
NETGEAR Expert

Re: Generating "Wireless Stations" output via ssh

Do we know the reason for your whole exercise? What is your objective by running this script?

Unfortunately we do not have any method to get rx-rate.

 

Thanks,

Raghu

Message 13 of 14
bmomjian
Guide

Re: Generating "Wireless Stations" output via ssh

I think we can mark this thread as solved.  Getting the station list and probing each MAC to get the tx and rx byte and rates is probably the best method for generating the output I need for my monitoring tool.  Thanks.

Model: WAC730|3x3 Wireless-AC Access Points
Message 14 of 14
Discussion stats
  • 13 replies
  • 4601 views
  • 0 kudos
  • 3 in conversation
Announcements