ADSLNet

QuasarMovilQuasarAppleQuasarPlayQuasarAppQuasarPcQuasarGPSQuasarWareQuasarGadgets
  • Inicio
  • Herramientas
    • Cobertura ADSL VDSL FTTH
    • Test de Velocidad ADSL, Cable
    • Test de Velocidad Móvil , iPhone, iPod, iPad
    • Datos de la Central
    • ADSLNet Navigation Tools
  • Mapas de Cobertura
    • Mapa ADSL
    • Mapa FTTH
    • Cobertura ADSL Rural
    • Cobertura Wifi
  • Comparar Ofertas
    • Ofertas ADSL y Cable
    • Ofertas Fijo y Móvil
    • Ofertas 3G Empresas
    • Comparador Tarifas General
  • Comunidad
    • Foros
    • Tests de velocidad de hoy
  • Documentación
    • Routers FTTH
    • Routers VDSL2
    • Estudios ADSL
    • Estadísticas ADSL

ADSLNet

MRTG en el Nokia M1122. Linux

Para todos los interesados, a continuación os proponemos un sistema para poder utilizar el sistema de estadísticas de consumo de ancho de banda, MRTG, en el router Nokia M1122.


Dado que el modem en si no soporte SNMP actualmente, se puede llegar a hacer funcionar a base de scripts.


Sigue leyendo …

MRTG en el Nokia M1122

The Nokia M1122 does not currently support SNMP, so getting it
working with MRTG is a little more difficult. Here’s how I did
it:

I use Debian GNU/Linux, so I
first installed the MRTG and expect packages. Expect is used to telnet
on to the router and gather the data needed for MRTG.

Next I coded up a simple expect script, this is the first time I
have used expect, so I just copied from an example.



#!/usr/bin/expect5.31 --

exp_version -exit 5.0

set timeout 60
spawn telnet 192.168.1.254
expect "login-id:"
send "user\r"
expect "password:"
send "user\r"
expect "M1122>"
send "sh atm\r"
expect "M1122>"
send "sh st\r"
expect "M1122>"
send "lo\r"
close

I saved this as /usr/local/bin/getm1122-raw, because
another script does some more massaging before sending it to MRTG.
Note that you may need to change the first line depending on your
version and location of expect.

When this run it should produce the following output:


spawn telnet 192.168.1.254
Trying 192.168.1.254...
Connected to 192.168.1.254.
Escape character is '^]'.

Nokia Inc. (C) 1999-2000
Nokia Mrouter

rel-Gx1x2210.R09 built on Oct  9 2000 @ 13:49:41 by krol

login-id: user
password: ****
M1122>sh atm
## vcc1 (up)             vpi    vci       type      encap
                           0    100   DATA_PVC     PPP-VC
                                pkt        oct        dis        err
stat-tx-payload              860139  224061349          0          0
stat-rx-payload              979243  892956118          0          0

## mngt (up)             vpi    vci       type      encap
                           0    101   MNGT_PVC     IP-LLC
                                pkt        oct        dis        err
stat-tx-payload                   0          0          0          0
stat-rx-payload                   0          0          0          0
M1122>sh st
product-id               T66280.01  C
serial-num               61004613761
cpu-type                 XPC850SR / B
flash-type               2 M
sdram-type               8 M
phys-address-lan         00:40:43:03:cc:9c
phys-address-wan         00:40:43:03:cc:9d
short-desc               M1122
long-desc                NOKIA M1122 ADSL Router
boot-version             Bx1x2008.R01
appl-version             Gx1x2210.R09
log-severity             HIGH
start-uptime             03/15:40:28
M1122>

Next I wrote a bit of awk to massage the output into the format
required by MRTG:



#!/bin/sh
/usr/local/bin/getm1122-raw |
awk '/payload/{print $3}/uptime/{print $2}/short-desc/{print $2}'|
awk -vRS="\n\n" '{printf("%s\n%s\n%s\n%s\n",$2,$1,$6,$5)}'

I saved this as /usr/local/bin/getm1122, and the output looks like:

567705125
32870330
03/15:46:18
M1122

Now I filled in a section in the mtrg.cfg file as follows:



Title[m1122]: JetStream DSL
PageTop[m1122]: <h1>Jetstream DSL via Nokia M1122</h1>
Target[m1122]: `/usr/local/bin/getm1122`
MaxBytes[m1122]: 1000000
Tagged 192_168_1_254, ancho_de_banda, atm, debian_gnu, dis, encap, expect_script, krol, mrouter, mrtg, nokia_m1122, payload, pkt, router_nokia, snmp, spawn, stat, usr_bin, vpi_vci
Tweet
  1. 25 julio, 2007

    Anónimo

    Donde dice $6,$5 debe decir $4,$3.

    Nosfe Dixit!

    Responder  

Escribe tu comentario

Clic para cancelar respuesta.

Imagen CAPTCHA
Refrescar imagen
*

Últimas noticias

  • Los operadores de cable pronto alcanzarán 1 Gbps
  • Cataluña decidirá qué televisiones y radios pueden emitir por internet
  • Vodafone ampliará su oferta de ADSL y lanzará VDSL de 30 megas
  • Bruselas amenaza a Google con una multa millonaria si no cambia sus prácticas abusivas
  • La Unión Europea impulsará el desarrollo de la fibra óptica en toda Europa

Últimos comentarios

  • Junard en Contratar ADSL o Contratar VDSL
  • Andry en Condenados a prisión por revelación de secretos director y jefe de informativos de la SER, que recurrirá la sentencia
  • Sol en Castilla-La Mancha pone en marcha el programa ESTARTER para ayudar a emprendedores a “subirse” a la red social
  • Alexandrina en El gasto medio mensual de un hogar en televisión de pago es de 28,5 euros, según el ONTSI
  • Hasham en CASTILLA LA MANCHA.-Innova.- Castilla-La Mancha, por debajo de la media nacional en acceso rápido conexiones móviles

Últimos temas en el foro

  • 90 EUROS POR DARTE EL ALTA EN ADSL JAZZTEL CON EL PLAN AMIGO.
  • para el Moderador/webmaster
  • Plan amigo jazztel, ofrezco asesoramiento informatico, contacto ver pag web
  • Plan amigo de jazztel, ofrezco asesoramiento informatico gratuito, contacto en mi pag web
  • plan amigo jazztel mayo/junio 2012

Routers ADSL VDSL2. Documentación y Manuales de Configuración



ADSL ADSL2+ ADSL Rural VDSL2 FTTH

ADSL   ADSL2+   ADSL Rural   VDSL2   FTTH

Accede a ADSLNet

Entrar

Últimas entradas en la red QuasarBlogs

  • China da vía libre a la adquisición de Motorola por parte de Google
  • Con TiVo Stream podrás enviar el contenido que más te gusta a cualquier dispositivo móvil
  • Siri, ¿se entiende o no? ¿se usa o no?
  • Slide, un nuevo juego para iPhone al que ya sabemos cómo se juega
  • PS Vita la potencia de Sony para competir con Nintendo a la venta esta noche
  • Fútbol en la calle con Fifa Street
  • Angry Birds, la auténtica gallina de los huevos de oro
  • Viber lanza versiones beta para Windows Phone 7 y BlackBerry

Blogs Tecnología

Software, Linux, Windows, Mac
Apps para Móviles, Tablets y Mac
Mundo Apple
Videojuegos y Consolas

Blogs de Gadgets

Teléfonos y Tablets
Gadgets y Dispositivos
Internet y Comunicaciones
Servidores, Portátiles y PC
Dispositivos GPS

HTML y CSS3

Buscas algo?

Comparte con tus amigos

  • Inicio
  • Aviso Legal
  • Portfolio
  • Contacto

Copyright © 2012 - Quasarblogs - Creative Commons. Términos y Política de Privacidad

Sign in to your account

Account Login
Forgot your password?