16

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
  • 1
    But is the behavior you’re seeing actually a problem? Because the files seem small-ish to me. – Daniel B Apr 12 '16 at 6:32
  • @DanielB not really a serious problem, but annoying – sel-fish Apr 12 '16 at 6:58
  • This is not a problem, but an annoyance. Technically speaking all systems everywhere spit out logs that seem excessive but are part of normal operations. Unless the logs grow to some insane size, any attempts to “hack” a solution to a supposed “problem” might actually cause you more harm than good. Meaning: There are better things to lose sleep over. – JakeGould Apr 15 '16 at 1:45
  • 2
    @JakeGould, you are right, this is not a real problem. I'm just curious about why these files exist and if there are solutions. Thanks for your explanation. – sel-fish Apr 25 '16 at 0:21
26

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.

  • I had to use: sudo /usr/libexec/airportd command ..... simple running airport replied "command not found". It is macOS Sierra (public version) on MacBook-Pro. – ndasusers Oct 14 '16 at 15:23
  • Ah, you're right. Sorry about that. At some point I had setup an alias in ~/.bashrc (must have been quite some time ago): alias airport=/System/Library/PrivateFrameworks/Apple80211.framewo‌​rk/Versions/Current/‌​Resources/airport It looks like /usr/libexec/airportd is at least roughly equivalent too. – Matt Lord Oct 14 '16 at 19:33
  • I am seeing these log files as well. Does it impact wifi performance? Any idea how it gets into this debug state to begin with? I am using El Capitan – afitnerd Nov 10 '16 at 0:33
  • It could be a result of running the Wireless Diagnostics tool at some point in the past. I found these files and didn't remember explicitly turning on any logging, but I had run some wireless diagnostics after repeatedly having issues. See support.apple.com/en-us/HT202663 (which warns against leaving it enabled). I think this is automatically offered when your Mac cannot obtain an IP address as well. – Sam Brightman Nov 29 '16 at 9:30
  • Thanks to Sam's comment I am now dimly remembering a time when I force quit the diagnostics. And now thanks to this answer the wifi dumps are gone. All kinds of events were being logged. – holdenweb Sep 1 '17 at 14:39
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.

1

man wdutil...

sudo wdutil log -wifi

should turn it off...

  • It seems very reasonable, but after I did this 'sudo wdutil log -wifi', the log continue to generate. Thanks for looking into it, @Rob . – sel-fish Apr 28 '16 at 2:18
-2

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 wifi. 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 according to: sudo airport debug 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.