Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Comment on

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

Hi,

I am Storage Administrator on a lookout for finding ways to automate certain tasks. Recently we encountered an issue where a few server HBAs would suddenly log out of a SAN storage array. The problem was random but was happening with storage array from a specific vendor. The storage and the server vendors' analyses of various parameters could not point out to the underlying issue.

Unfortunately, the Storage Array alerting system is not capable of capturing the log outs and many times we were caught unaware.

So, we were on a lookout for a solution that would report this issue. That's where Perl came in. :). Using DWIM Perl, a script was written that would log in to each storage array (Net::SSH2 Module) picking up the IPs from a text file, write the output to a text file, then using regular expressions, only the hosts that had one or more HBAs logged out would be e-mailed to our DL (MIME::Lite). The username/password information, the mail server information, the location of the text files, and the command that would capture the information, was saved in a seperate file and as & when required, the fields were called into the script (Config::Tiny Module).

Another issue was noted with our NAS Arrays where in the Data Movers would reboot/panic and the alert indicating the same would many times not be fired for some reason. Also, the data movers would not reflect that they were a few hours or even days behind each other.

Once again, Perl helped automate the alerting. Using similar methods as above, it would generate e-mails and that ways, avoid issues.

I used to read about how Perl shines at slicing and dicing text files, how the modules make the work easy and such stuff. But only when I started writing the scripts, the power was visible. Perl is truly a great language.

Apart from writing some basic, small C programs, I had never done any programming at all, and the last time I wrote a C Program was about 12 years ago....Not that learning Perl happened in a matter of few days. It did take me quite a while to get some basic comfort level with the language and the eternal learning will continue, but what is amazing is the quickness with which Perl allows one to get a script up and running. The fact that your script is running in your production environment, doing some really useful stuff gives a real different high. What I have written is not rocket science or something that is mind boggling complicated stuff, yet, the satisfaction is immense.

Another advantage, is that Perl rekindled my interest in Linux. Yeah, DWIM Perl on Windowsis amazing and comes pre installed with almost all the modules that one would need, yet, learning Perl on Linux was a quite different experience. And just to get Perl on my system, I installed Linux on my personal laptop. I tried CentOS, Fedora, Ubuntu and started toying around with the OS, with the System Perl that came pre installed in them and such stuff. It helped me get comfortable with Linux, which got me interested in some system admin related stuff, which in turn helped me become a better storage administrator.

To the Perl Community, the creators of DWIM Perl, and ofcourse..PerlMonks, Thank You. Thank You Very Much. It feels good.

Perlpetually Indebted To PerlMonks

use Learning::Perl; use Beginning::Perl::Ovid; print "Awesome Books";
http://dwimperl.com/windows.html is a boon for Windows.


In reply to Perl comes to rescue once again. by perl514

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!
  • 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
  • Outside of code tags, you may need to use entities for some characters:
            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 the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (7)
    As of 2014-11-27 19:46 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My preferred Perl binaries come from:














      Results (187 votes), past polls