[mrtg] AW: mrtg help

"Helmert, Jörg" Joerg.Helmert at EINSTEINet.de
Thu Jun 20 22:00:09 MEST 2002


Hi,

First Line of Perlscript:
=========================
since windows does not look into the first line of a script
to find the path where the interpreter lives,
the path is unimportant.

If you look at mrtg, the path is somewhat related to
tobi's workstation:
#! /usr/sepp/bin/perl

What activestate perl should do is:
look at the parameters for the interpreter like -w or whatever.

So you just could leave the path as is. Or just enter perl.
Maybe you can even leave it out, if you don't want to pass parameters to
perl.

OIDs used in your scripts:
==========================
By the way: You are asking for a Ascend MAX 6000.
The SNMP-Oids in the script you sent are for a livingston portmaster.

Ascend is: 
.1.3.6.1.4.1.529.
in words: .iso.org.dod.internet.private.enterprises.ascend

I guess .1.3.6.1.4.1.307 from you script is ...enterprises.livingston

Look at the EMail I sent you before.
There you'll find lots of OIDs for Ascends which you could use in your
script.
But I didn't find an OID for SerialUser on ascends before...

Editor for unix files:
======================
You just could use wordpad instead of notepad.
But remember to save as text only file.
I prefere to use Shareware/Freeware editors which can deal with Unix and
Windows files.
I liked ultraedit but now choose vim since it is the same on many OS
Plattforms

Errors while compiling/interpreting the script:
===============================================
Without the precise errors this is a difficult task.
Some general things:

Opening of OS dependend binaries is unlikely to work. Didn't find this in
your scripts.

Paths can be a problem.
Perl is C/C++ stilish or unix-like. So a "\" in a string has special
meenings.
According to Active State Perl Docu you could use "/" instead for paths.
There are nice examples like "c:\temp\nice-file" which is:
"c:[TAB]emp[NEWLINE]ice-file" for Perl.
This could be a problem in your line reading:
open(PM, "\mrtg-2.9.18\bin\PM_count $community\@$s |");

Maybe ist easier to help, if you tell us the lines where you get the
errors...

bye,

Joerg Helmert

-----Ursprüngliche Nachricht-----
Von: GUARENO at FORDHAM.EDU [mailto:GUARENO at FORDHAM.EDU]
Gesendet: Donnerstag, 20. Juni 2002 16:51
An: mrtg at list.ee.ethz.ch
Betreff: [mrtg] mrtg help


Hi all:
Does anybody know how to hack a perl script which was writen in a UNIX
platform?.  I have 3 scripts for an Ascend MAX 6000 that need to run on my
Win2k Proffesional machine.  When I try to compile them I get a bunch of
syntax errors (barework found where....,  Syntax error at line...., etc..).
How is the initial line suposed to look in a perl script for Win2k.  For
Unix it looks something like !/usr/bin/perl (or someting like that).
I'm a little confused.  Please help someone....  Here are the files if
anyone wants to lool at the (use notepad or the like...but you knew that I
bet)
Thanks in advance
(See attached file: mrtg.cfg_l)(See attached file: 56K_count)(See attached
file: PM_count)

-- Attached file removed by Listar and put at URL below --
-- Type: application/octet-stream
-- Size: 5 bytes
-- URL : http://www.ee.ethz.ch/~slist/pantomime/mrtg.cfg_l


-- Attached file removed by Listar and put at URL below --
-- Type: application/octet-stream
-- Size: 799 bytes
-- URL : http://www.ee.ethz.ch/~slist/pantomime/56K_count


-- Attached file removed by Listar and put at URL below --
-- Type: application/octet-stream
-- Size: 1k (1391 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/PM_count


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

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