I noticed my iMac, since the 10.13.2 update, was waking from sleep way too frequently. Looking at the logs it can sleep for a minute then wake up. Then it might sleep for ten or twenty minutes and wake.
In tracking it down the iMac is receiving network connections from other Apple devices. In my case my iPad Pro and iPhone SE (both on iOS 11) were connecting. I didn't see any other non Apple devices connecting. My iPhone 5C (on iOS 10 of course) and Apple TV (Gen 3) (using my Apple ID) don't connect. Nor does my wife's iPhone 5S (still on iOS 10) connect.
The process they are connecting to is '/usr/libexec/rapportd'. It seems like this is a new buggy process introduced into 10.13.2. This happens even when I'm sleeping and not using any device. I call this buggy because I don't want my iMac waking up every twenty minutes when it never needed to before. I am not expecting anyone knows how to fix this but am just posting so others might know why their iMac is waking too much.
To diagnose I ran this command to show the wake reasons:
You'll find messages like:
Wake reason: Enet.Service - Connection attempt with TCP from XX:XX:XX:XX:XX:XX 192.168.1.100.52443 to 192.168.1.80.49181
This is saying device with IP .100 is connecting to .80 (my iMac) on port 49181 (yours may be different)
You can then run this command to show what process is listening on port 49181
Look for this:
TCP *:49181 (LISTEN)
If the very first part of the line is 'rapportd' then this should be the '/usr/libexec/rapportd' process.
In tracking it down the iMac is receiving network connections from other Apple devices. In my case my iPad Pro and iPhone SE (both on iOS 11) were connecting. I didn't see any other non Apple devices connecting. My iPhone 5C (on iOS 10 of course) and Apple TV (Gen 3) (using my Apple ID) don't connect. Nor does my wife's iPhone 5S (still on iOS 10) connect.
The process they are connecting to is '/usr/libexec/rapportd'. It seems like this is a new buggy process introduced into 10.13.2. This happens even when I'm sleeping and not using any device. I call this buggy because I don't want my iMac waking up every twenty minutes when it never needed to before. I am not expecting anyone knows how to fix this but am just posting so others might know why their iMac is waking too much.
To diagnose I ran this command to show the wake reasons:
Code:
log show --style syslog | fgrep "Wake reason"
You'll find messages like:
Wake reason: Enet.Service - Connection attempt with TCP from XX:XX:XX:XX:XX:XX 192.168.1.100.52443 to 192.168.1.80.49181
This is saying device with IP .100 is connecting to .80 (my iMac) on port 49181 (yours may be different)
You can then run this command to show what process is listening on port 49181
Code:
lsof -i TCP
Look for this:
TCP *:49181 (LISTEN)
If the very first part of the line is 'rapportd' then this should be the '/usr/libexec/rapportd' process.