[mrtg] AW: AW: Still need some more help... Please

"Helmert, Jörg" Joerg.Helmert at EINSTEINet.de
Wed Jun 26 17:47:09 MEST 2002


Hi,

it's not that easy. Just using a library.

You have to check if the functions of that library are called the same
way as before.
I'm not sure if snmpwalk within snmputil has the same options like
snmpwalk on Unix.

I guess you have to learn perl somehow... ;-)

the code:
die <<USAGE  unless $community && $router;

USAGE: pmfinger 'community'\@'portmaster.foo.edu'

USAGE

says: if you forgot to provide a community or a router on the commandline,
just die (or end program to say it more nice...) and print the text between
USAGE: and USAGE to give the user a little hint.

So I guess you changed the USAGE: line to "your" community and "your"
router.
So now the script prints "your" help.

Instead of changing that help message, you just should add the necessary
parameters
on the commandline.

But keep in mind: Just taking a library instead of a binary in most cases is
NOT
enough.

Depending on what you want to achieve at the end, I recommend to take the
time to
learn perl basics.

I'm mostly on windows too, I write little perl scripts approximately once a
year.
But I prefere perl, not visual basic scripts.
My opinion is, that it will be hard for you, to achieve your goal,
just by playing around with scripts, which had another goal.

Maybe you get close enough.

Good Luck ;-)


bye,

Joerg Helmert
 

-----Ursprüngliche Nachricht-----
Von: GUARENO at FORDHAM.EDU [mailto:GUARENO at FORDHAM.EDU]
Gesendet: Mittwoch, 26. Juni 2002 17:06
An: Helmert, Jörg
Cc: mrtg at list.ee.ethz.ch
Betreff: Re: [mrtg] AW: Still need some more help... Please



Hi..
The script (now called finger2,pl) does not give me any errors but what I
get on the screen when I type "perl finger2.pl" is:
USAGE: pmfinger 'community'@'150.108.x..x'
Does this mean that is working.
I added this  line:  use SNMP_util "0.92"
and commented out the sub at the botom dealing with: open(SNMP,
"c:/perl/bin/snmpwalk $Router $Community $OID :") since I was getting an
error:
     "Prototype mismatch: sub main::snmpwalk ($@) vs none at finger2.pl
line 131"  (the only error )
I have no clue what this means, do you?

Should I just create a .cfg file and call the script at theTarget[xxx]:
line.
How would the html look like.  ( I promise I will stop bothering you soon
after this :)  )
Thanks in advance.

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list