Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Script to determine whether the cables are plugged into the correct ports in a EX2200

by RonW (Vicar)
on Sep 14, 2017 at 23:12 UTC ( #1199427=note: print w/replies, xml ) Need Help??


in reply to Script to determine whether the cables are plugged into the correct ports in a EX2200

Handy tool.

Reminds me of when, at my previous employer, years ago, we had just moved to a new office. The facilities people were complaining about the seating changes we were making. Since we had VOIP-base desk phones, I decided to team-up with one of the IT network techs for an afternoon to create a Perl program to auto-generate a "spreadsheet map" of which cubes people were in based on the location of their desk phones.

Unfortunately, I've lost the copy of the code I had and the company isn't going to give me a copy.

Anyway, it worked by querying the Ethernet switches for the IP and MAC addresses of devices connected to each port, looking for the MAC address prefix of the desk phones. This gave us a mapping of phones to ports. There was already a spreadsheet that had a mapping of port numbers to cube coordinates, giving us a mapping of phone IPs to cube locations. Then, our program queried the VOIP server to get the names assigned to each phone by IP. Finally, our program filled in spreadsheet cells with the names of the people. It also created a simple, 4 column CSV file with the rows alpha-sorted by name and listing the phone numbers and cube locations. We also diff'd the CSV against the previous version and auto-email'd the diff report to HR so they could update the corporate address book.

The code was a mess of (mostly) copy-paste-modify clippings, but worked. And got the facilities people to stop hassling us. Not bad for 4 hours.

(We also joked about using AVR Butterflys as end-of-row name displays that would cycle through the people in the row each Butterfly was located. Would have been fun, but we knew couldn't justify the purchase costs of everything we would need.)

  • Comment on Re: Script to determine whether the cables are plugged into the correct ports in a EX2200

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1199427]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2017-12-17 21:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (466 votes). Check out past polls.

    Notices?