17

OS X version of my MacBook Pro (2015) is El Capitan 10.11.4 (15E65).

I got a lot of logs file under /tmp/:

fenqideMacBook-Pro:tmp fenqi$ ls -lt wifi-*.log
-rw-r--r-- 1 root wheel 250759  4 12 11:50 wifi-VbB6ea.log
-rw-r--r-- 1 root wheel  41368  4 12 11:42 wifi-9K1EMd.log
-rw-r--r-- 1 root wheel 109397  4 12 11:41 wifi-DemQZe.log
-rw-r--r-- 1 root wheel 189145  4 12 11:38 wifi-DlzZ4Z.log

When I'm using the wifi of my company.
But as I use wifi at home, these files stop to generate any more.

The content of these files is:

Tue Apr 12 11:38:24.024 BTC: <airportd[89925]> BluetoothCoexSetProfile: <en0> profile for band 2.4GHz didn't change
Tue Apr 12 11:38:24.024 BTC: <airportd[89925]> BluetoothCoexSetProfile: <en0> profile for band 5GHz didn't change
Tue Apr 12 11:38:24.024 BTC: <airportd[89925]> BluetoothCoexHandle_ApplyPolicy: <en0> Bluetooth Coex: band = 0x2
Tue Apr 12 11:38:24.024 BTC: <airportd[89925]> BluetoothCoexHandle_ApplyPolicy: <en0> Bluetooth Coex: hosting AP = NO, assoc as STA = YES, assoced in 2.4GHz = NO
Tue Apr 12 11:38:24.024 BTC: <airportd[89925]> BluetoothCoexHandle_ReconfigureAntennas: <en0> Bluetooth Coex: band = 2
Tue Apr 12 11:38:24.024 BTC: <airportd[89925]> BluetoothCoexGetCurrentBssidPhyMode: <en0> Bluetooth Coex: Active PHY Mode 16. PHY Mode

I found this process with an airportd in its name:

fenqideMacBook-Pro:tmp fenqi$ ps -ef |grep airportd |grep -v grep
0 89925     1   0 11:07上午 ??         0:03.97 /usr/libexec/airportd

I tried to force kill it, but it seems there is a daemon which restarts it automatically.

fenqideMacBook-Pro:tmp fenqi$ sudo kill -9 89925
Password:
fenqideMacBook-Pro:tmp fenqi$ ps -ef |grep airportd |grep -v grep
0 91873     1   0 11:54上午 ??         0:00.14 /usr/libexec/airportd

I asked some of my friends and workmates who use Mac, it seems that this problem exists on MacBook Pro 2015, not previous version of MacBook Pro, neither MacBook Air.

My question is:
1. What's the different between the wifi in my company and home?
2. Is there anyway to stop airportd continue to generate files like /tmp/wifi-*.log?

Update:

@Rob helps to provide command 'sudo wdutil log -wifi'
It's very reasonable after 'man wdutil', I'm almost sure that's what I want.
However, after I tried it, the files continue to generate.

Update:

@MattLord get it right. On macOS Sierra (10.12), that can be achieved by

ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/local/bin/airport
airport debug -AllUserland -AllDriver -AllVendor
sel-fish
  • 293
  • 1
  • 2
  • 11

4 Answers4

27

At least on macOS Sierra (10.12):

  1. You can see what WIFI related components have debug logging enabled with:

    /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport debug
    
  2. You can disable all debug logging with:

    /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport debug -AllUserland -AllDriver -AllVendor
    

For whatever reason, the debug logging flag was enabled for 'DriverWPA' on my machine and that resulted in /tmp/wifi-{date}__{time}.log files getting generated when joining new WPA2 protected WIFI networks.

Giacomo1968
  • 58,727
Matt Lord
  • 386
  • 4
  • 5
2

man wdutil...

sudo wdutil log -wifi

should turn it off...

DavidPostill
  • 162,382
Rob
  • 21
  • 1
2

On macOS Mojave (10.14.1), hold onto Option and then click the Wi-Fi menu item and then select “Disable Wi-Fi Logging.” That did the trick for me.

Giacomo1968
  • 58,727
The DB
  • 21
0

Confirmed: OSX 10.12.6 High Sierra with a MacBook Pro (Retina, 15-inch, Late 2013) WILL create /tmp/wifi_yyMMDD* at one 4Mb file/sec while connected to any Wi-Fi. There is no way to stop it. A reboot clears /tmp, but the files will keep coming back. (At least Apple support could not stop it even when they reformatted my drive and reinstalled a clean 10.12.6 with NO user data.)

The airport debug is set for DriverWPA upon boot. The command:

sudo airport debug

Will show it, and

sudo airport debug -DriverWPA

Will disable the setting.

But it still continues to log, but only for OS X 10.12.6 and ONLY for this particular machine. I even checked with another user at the Genius bar who had the same machine but 13 inch. They were not seeing the problem.

Apple took a report to go back to the developers, including logs. So we will see if it ever gets fixed.

I the meantime, the ONLY solution I found was to install OS X 10.11 El Capitan in order to stop the constant logging filling 100 Gb of disk space over time and using up the flash storage lifetime. I cannot use 10.12.6.