Is it possible to test the performance of a WiFi via the terminal?

Basically, I want to check how good WiFi is in some spaces of my home to figure out where to place a access points.

Can the terminal help me with that in any way?

  • 1
    iperf3 is a way to test performance via the Terminal. It seems like you have some terms confused, and what you really want to know is something entirely different. Please describe what it is you're looking for - might it be that you're looking for signal strength, or the approximated bandwidth figure that the WiFi icon in the status bar can show? – jksoegaard May 22 '17 at 20:02
  • @Allan Okay. Great allegory! Thanks for explaining WiFi to a noob. ;). Let me rephrase my whole question. I'm trying to tidy up the comments here, in case you were wondering where all the conversation went... – Narusan May 22 '17 at 20:56

You can use the built in airport utility to measure SNR (Signal to Noise Ratio). It's found in


What I do is make a symlink to a directory in my path so I can call it without having to remember that long path:

ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport /usr/local/bin/airport

Assuming that you are connected to a WiFi network, issue the command:

airport -I

to print out information of your current connection.

$ airport -I
     agrCtlRSSI: -65
     agrExtRSSI: 0
    agrCtlNoise: -90
    agrExtNoise: 0
          state: running
        op mode: station
     lastTxRate: 243
        maxRate: 300
lastAssocStatus: 0
    802.11 auth: open
      link auth: wpa2-psk
          BSSID: 82:2a:a9:45:f3:25
           SSID: StackExchange WiFi Demo
            MCS: 14
        channel: 157,1

To calculate SNR, you take the RSSI value and subtract the Noise value. In this case, I have an RSSI of -65dB and a Noise value of -90dB. Calculated, that gives me 25dB. Which is a very good signal (just barely but I am behind a reinforced concrete wall away from my AP; not bad actually considering.

SNR Guidelines

  • 40dB+ SNR = Excellent signal
  • 25dB to 40dB SNR = Very good signal
  • 15dB to 25dB SNR = Low signal
  • 10dB to 15dB SNR = Very low signal
  • 5dB to 10dB SNR = No signal

That said..it's not all down to what your SNR is in a given location, you should also consider things like:

  • WiFi Saturation - excessive number of WiFi signals in the same area
  • Client Load - number of clients attached to a given AP
  • Bandwidth utilization - how much bandwidth is consumed by the clients.

If you have too many WiFi networks competing for the same bandwidth or a combination of too many users or too many bandwidth hogs (everyone watching Netflix 4K on their tablets), this will greatly affect performance beyond what your SNR can tell you.

What I prefer to do is to deploy multiple APs around the house and turn down the transmit power so they don't go very far outside the room I am trying to cover. I personally use these PoE Access Points from Ubiquiti to cover several areas of my home with great success.

  • Great! Thanks a lot. Is there an option to directly take the output of airport -l and calculate the SNR from the two values. That would be handy for people that can't calculate in their head... – Narusan May 22 '17 at 21:18
  • 2
    I'm sure a script could be written in bash...for instance, you can issue the command airport -I | grep agrCtlRSSI | cut -d ':' -f 2 to get the RSSI value. do the same for the Noise value then subtract. The script isn't too hard, and I encourage you to give it a go...there's nothing like having a small challenge to help you learn to use the Terminal. :-) – Allan May 22 '17 at 21:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .