Skip to main content
Question

Historical MAC Addresses

  • April 7, 2017
  • 2 replies
  • 24 views

Forum|alt.badge.img+4

Hi All,

I made the following Extension Attribute to collect MAC addresses of devices now that we are living in Dongle Hell. This reports the last MAC address of both built-in and removable devices connected to the machines. To prevent the table from becoming massive, it overwrites the previous entry of any type of adapter. So if a client has 7 Thunderbolt Ethernet adapters, it will only show the last one used.

The table is designed to be human-readable by techs to better facilitate troubleshooting of network issues. I'd be curious to find out if folks found it as useful as we have. I have attached an example of its output.

https://github.com/primalcurve/macsupportpub/blob/master/extension_attributes/LastReportedMACAddress_Scrubbed.sh

2 replies

Forum|alt.badge.img+14
  • Contributor
  • April 7, 2017

Is there a reason you're writing to disk before posting the result?

Nevermind...the 'null' value of disconnected. Missed that you were reading the file. Duh!


Forum|alt.badge.img+4
  • Author
  • Contributor
  • April 7, 2017

Yeah. I want that old data. I don't want it overwritten just because the client is on a different interface. I will probably eventually set it up so that it only keeps the last X months, but for now it's manageable.