I have moved to a new location, and my Mac Pro 2013 running Sierra 10.12.6 is currently using the Wi Fi. I would like to hardwire it.
Now, there is a wiring closest with a bunch of poorly labeled cables within it, ostensibly matching to the various outlets throughout the building.
Unfortunately, the Mac Pro is quite far from the wiring closet.
I'm curious if there is a simple command I could use (some kind of net status command, or whatever), perhaps combined with grep, or something of the like, that will let me know when the Mac sees one of its interfaces light up.
Much like having one person at the breaker box watching a light, while the other person across the building vainly flips breakers trying to locate the one that controls the light, my hope was that I could plug the Mac Pro in to the wall, start up this command or script, and have someone watching the screen as I started plugging candidate cables in to the switch, hoping to find the right one easily versus having to run back and forth.
I guess I could just put "ping stackoverflow.com" in to a repeating loop and have the person shout "Eureka!" when a ping gets through, but I was hoping for something a bit more base level that was detecting "net tone" for lack of better word, even before DHCP and the rest of the network plumbing got in place.
Can I simply loop ifconfig
in to an awk script to show me which, if any, of the en#: items become active? Currently, I have 8 (en1-8) listed (among other things). One of which is active (en2), which I assume is the Wi Fi.
Is it crass to assume that once I get a cable plugged in that either en1 or en2 will light up depending on which port is plugged in?
These ports don't have a light on them do they? Honestly, I never checked. That would be acceptable as well.