Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

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.)


In reply to Re: Script to determine whether the cables are plugged into the correct ports in a EX2200 by RonW
in thread Script to determine whether the cables are plugged into the correct ports in a EX2200 by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and all is quiet...

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




















      Results (466 votes). Check out past polls.

      Notices?