[rrd-users] Re: Pseudo Code

Arias, Sebastian Alejandro - (Ext Arg) Sebastian.Arias at attla.com
Tue Jul 3 15:43:15 MEST 2001


If your Sys Op is linux or any unix, yo can run this script to do this, of
course you will need to define some vars like $rrd, $community and $router.
I dont know it this run ok, I do it under notepad a i cant test this :) ... 
i hope that you will find this usefull.

Code beginning:

#!/usr/bin/perl


$router="your.router.ip";
$community="your.router.community.naturally.named.PUBLIC";
$loop=1;
$rrd="yourouter.rrd"

while ($loop)
	{
	$in=`/usr/bin/snmpget $router $community 2.2.1.10.4`;
	$out=`/usr/bin/snmpget $router $community 2.2.1.16.4`;
	$exec=`/usr/bin/rrdtool update $rrd N:$in:$out`;
	sleep 5;
	}

Sebastian Arias
Associate
Infraestructure & Technology Services
AT&T Latin America
Tel. 5288-0173 - Fax 5288-0408


-----Mensaje original-----
De: Sharpe, Michael [mailto:MSharpe at gemplex.com]
Enviado el: Martes, 03 de Julio de 2001 10:27 a.m.
Para: Rrd-Users (E-mail)
Asunto: [rrd-users] Pseudo Code



Can someone please explain to me what this pseudo code is?

while not the end of the universe
   do
      get result of
         snmpget router community 2.2.1.10.4
      into variable $in
      get result of
         snmpget router community 2.2.1.16.4
      into variable $out
      rrdtool update myrouter.rrd N:$in:$out
      wait for 5 minutes
   done

I am simply trying to get some OIDs in to a test database I created.
Thanks.

Mike 


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
Este mensaje es confidencial. El mismo contiene información reservada 
y que no puede ser difundida. Si usted ha recibido este e-mail 
por error, por favor avísenos inmediatamente vía e-mail y tenga la 
amabilidad de eliminarlo de su sistema; no deberá copiar el mensaje 
ni divulgar su contenido a ninguna persona. Muchas gracias.
 
This message is confidential. It contains information that is privileged and
legally exempt from disclosure. If you have received this e-mail by mistake,

please let us know immediately by e-mail and delete it from your system; 
you should also not copy the message nor disclose its contents to anyone. 
Thank You.


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list