[mrtg] Re: AW: Re: Problem please Help

Jelle Beusen beusen25 at zonnet.nl
Tue Oct 10 14:59:38 MEST 2000


In what sence ??

The script I actually didn' t write myself I just got it out of the readme
of the module and added what I needed it to do to it and changed some of the
values.

Now all this is based on unix systems..........

the one thing needed is net::telnet wich can be optained from cpan.org...

It basicly is an inline telnet client for perl....

The one problem with getting values from scripts is that you will need to
get 4 values it doesn't matter if the last 3 ones are 0...

So what I did is have a script on the target doing a :

netstat -i |  grep eth0 (this will display all info on interface 1...
then I do an echo of 2 sting values and 2 times I echo 0 wich looks
something like this...

2345 (bytes in)
54321 (bytes out)
0
0

no mrtg will take these values as it expects them and put them in the log
file and will generate the graph from it....

ANd on the four values as you look at your log files you will see 5 rows
with one incrementing the first ... and one 4 changing with the input
data...the top one of the list is the one the graph is based on and is a
calculation of the disference the otheronce down are  the differences
between the old one and the new one....(that is probably the easiest way of
seeing it, if I am wrong on that one someone please correct me there)

Hope this clears it up a little ?

----- Original Message -----
From: "Schoepf Hans Peter" <pety at dnet.it>
To: "'Jelle Beusen'" <beusen25 at zonnet.nl>; "'Schoepf Hans Peter'"
<pety at dnet.it>; <mrtg at list.ee.ethz.ch>
Sent: Tuesday, October 10, 2000 12:16 PM
Subject: [mrtg] AW: Re: Problem please Help


>
> Say sorry i dont understand 4. i have do use 4 values / it is not possible
> with one value?/say perl script i can use but i didnt understand yours
very
> good /
>
> thank you for your help peter
>
> -----Ursprüngliche Nachricht-----
> Von: mrtg-bounce at list.ee.ethz.ch [mailto:mrtg-bounce at list.ee.ethz.ch]Im
> Auftrag von Jelle Beusen
> Gesendet: Dienstag, 10. Oktober 2000 12:02
> An: Schoepf Hans Peter; mrtg at list.ee.ethz.ch
> Betreff: [mrtg] Re: Problem please Help
>
>
>
> if you run the script from mrtg then the value should go into mrtg !!! but
> don't forget you need 4 not 1 !!!!!
>
> I do basicly the same but I use perl do execute the command and then I get
> and echo back from the command and I just use 4 of the values !!
>
> Do you have the possibility to run perl scripts ?
>
> Straight out of the manual :)
>
> #!/usr/bin/perl
> $username = yourname
> $passwd = yourpassword
> use Net::Telnet ();
>         $t = new Net::Telnet (Timeout => 10,
>                               Prompt => 'yourprompt $/');
>         $t->open("ipadress");
>         $t->login($username, $passwd);
>         @lines = $t->cmd("yourcommand");
>         print @lines;
>
> ----- Original Message -----
> From: "Schoepf Hans Peter" <pety at dnet.it>
> To: <mrtg at list.ee.ethz.ch>
> Sent: Tuesday, October 10, 2000 11:57 AM
> Subject: [mrtg] Problem please Help
>
>
> >
> > Hello!
> >
> > When i execute a telnet script in mrtg than mrtg can read the value.
> > Normale when i make a telnet on the macchine i becoume this value:
> > Trying 0.0.0.0...
> > Connected to mymacchine.hallo.com.
> > Escape character is '^]'.
> >       64
> > Connection closed by foreign host.
> >
> > How can i but this value 64 in the mrtg?
> >
> > Thank you very much
> > Peter
> >
> >
> > --
> > 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
>
>
> --
> 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