OK I need to do this:
I have 3 drives on my system. I am doing an SNMP walk. Now I get the values back for all 3 drives in this setup. What I need to do is say:
Drive C - Used Space OID = 1.2.3.4.5.1
Drive C - Size OID = 1.2.3.4.6.1
Drive C - Max Size = 200000
Drive C - Alocation Units = 4096
Drive E - Used Space OID = 1.2.3.4.5.3
Drive E - Size OID = 1.2.3.4.6.3
Drive E - Max Size = 230000
Drive E - Alocation Units = 4096
Drive F - Used Space OID = 1.2.3.4.5.4
Drive F - Size OID = 1.2.3.4.6.4
Drive F - Max Size = 230000
Drive F - Alocation Units = 4096
Virtual Mem - Used Space OID = 1.2.3.4.5.5
Virtual Mem - Size OID = 1.2.3.4.6.5
Virtual Mem - Max Size = 2000
Virtual Mem - Alocation Units = 1024
If you notice you will see that the OID's differance's are the last number referring to the Unit. So 1 is Drive C, 2 is Drive D, 3 is Drive E and so forth. Now I need to be able to get that info and then recall it to make a config file for MRTG. Any suggestions on how to dumb the data to an array or something and then recall it depending on which drive i am looking at??/
-----------------------
Billy S.
Slinar Hardtail - Hand of Dane
Datal Ephialtes - Guildless
RallosZek.Net Admin/WebMaster
perl -e '$cat = "cat"; if ($cat =~ /\143\x61\x74/) { print "Its a cat!
+\n"; } else { print "Thats a dog\n"; } print "\n";'
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, details, 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, summary, 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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.