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

Re^2: Reading IP from a file and SNMP

by theroninwins (Friar)
on Aug 27, 2004 at 07:33 UTC ( #386274=note: print w/replies, xml ) Need Help??


in reply to Re: Reading IP from a file and SNMP
in thread Reading IP from a file and SNMP

WOW thanks fpr all your comments. They really helped. I got the thing more or less because it has to do a lot more (redirect the output and filter it then rerun the prog with the new knot and so on because i need the Name of the Devive e.g Power Device and the coresponding serial no.) but i guess i figure that out myself. but here is the bigger problem: I can get all the results i want correctly as long as they are numeric, but if the answer is e.g SNI05638854 or 1300 watt supply AC i get this:

Argument "SNI05638854" isn't numeric in numeric le (<=) at C:/Perl/lib/Net/SNMP/Message.pm line 998, <IPFILE> line 1 (#1) (W numeric) The indicated string was fed as an argument to an operator that expected a numeric value instead. If you're fortunate the message will identify which operator was so unfortunate.

the IP file has only an IP in it. I based my prog on the one by gellyfish. (Tanks for that one). Any idea why this message comes?? I really must say i start to like perl but as i said before i am very new to it :-)

Replies are listed 'Best First'.
Re^3: Reading IP from a file and SNMP
by gellyfish (Monsignor) on Aug 27, 2004 at 08:04 UTC

    I think your problem is either that you are misinterpreting your MIB and trying to use one of your returned values as part of an OID or your MIB is really strange - it would probably be useful for you to look at the output of 'snmpwalk' for the top level OID you are looking at (I'm not sure what the tools for this on windows are like however) - there is not much we can do from here because you are using a proprietary MIB.

    /J\

      Ok i got it now I noticed that the MIB does not have an Indexfile, so I took another Entry that does more or less the same and got what I needed. Still one more little thing and i hope i will not annoy you all with my beginners questions..... the stuff that comes out on screen: I know how to redirect that to a file but how do i format it? I need 3 colums all seperated with ';'. I figured out that maybe something like print '1',';','2',';','3',';' might work ?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://386274]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2022-05-29 05:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (101 votes). Check out past polls.

    Notices?