Accounting-List über Telnet => Liste-Leer

Forum zu aktuellen Geräten der LANCOM Router/Gateway Serie

Moderator: Lancom-Systems Moderatoren

Antworten
Benutzeravatar
Hardy
Beiträge: 58
Registriert: 26 Jun 2008, 09:07

Accounting-List über Telnet => Liste-Leer

Beitrag von Hardy »

Hallo,

mit meinem LC-1811 habe ich folgendes Problem:

- Ich logge mich per Putty auf meinen Linux Rechner ein.
- Dann rufe ich ein "Expect-Skript" auf.
- Dieses Skript baut eine Telnet-Verbindung mit dem Lancom auf und ruft unter /Status/Accounting/Accounting-List die Accounting-Liste ab
- Die Skript-Ausgabe wird in eine Datei geleitet und weiterverarbeitet.

Soweit so gut..

Wenn ich allerdings nicht von Hand (Mithilfe von Putty) dieses "Expect-Skript" aufrufe, sondern dies der Linux Rechner selbst per cron macht, ist die Accounting-Liste leer.
Früher mit einer älteren Firmware und auf einem LC-1821 hat das immer geklappt. Jetzt auf dem LC-1811 mit Firmware > 7.54 gehts nicht mehr

Hier die Skript-Ausgabe. Ich habe hier den ls -a Befehl zum Aufrufen der Liste benutzt. Man sieht damit das auf den ls-Befehl reagiert wird, aber keine Liste erscheint. Außerdem wird immer wieder "MORE [Q(uit)]" angezeigt was bedeutet das die Liste noch nicht vollständig ausgegeben wurde. Allerdings ist die Liste nicht lang.

Code: Alles auswählen

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


#
| LANCOM 1811 Wireless DSL
| Ver. 8.00.0162Rel / 16.06.2010
| SN.  011920600272
| Copyright (c) LANCOM Systems

LC_1811@Greim, Connection No.: 002 (WLAN)

Password: [SSL not available]


root@LC_1811@Greim:/
> cd Setup

root@LC_1811@Greim:/Setup
> cd Accounting

root@LC_1811@Greim:/Setup/Accounting
> cd Accounting-List

root@LC_1811@Greim:/Setup/Accounting/Accounting-List
> ls -a

[1.3.6.1.4.1.2356.500.3.1811][2.18.5]

MORE [Q(uit)]>

[1.3.6.1.4.1.2356.500.3.1811][2.18.5]

MORE [Q(uit)]>

[1.3.6.1.4.1.2356.500.3.1811][2.18.5]

MORE [Q(uit)]>

[1.3.6.1.4.1.2356.500.3.1811][2.18.5]

MORE [Q(uit)]>

[1.3.6.1.4.1.2356.500.3.1811][2.18.5]

MORE [Q(uit)]>

[1.3.6.1.4.1.2356.500.3.1811][2.18.5]

MORE [Q(uit)]>
Wenns funktioniert (Aufruf über Putty) siehts so aus:

Code: Alles auswählen

spawn telnet xx.xx.xx.xx
Trying xx.xx.xx.xx...
Connected to xx.xx.xx.xx.
Escape character is '^]'.
[SSL not available]


#
| LANCOM 1811 Wireless DSL
| Ver. 8.00.0162Rel / 16.06.2010
| SN.  011920600272
| Copyright (c) LANCOM Systems

LC_1811@Greim, Connection No.: 003 (WLAN)

Password: 

]0;root@LC_1811@Greim:/root@LC_1811@Greim:/
> cd Setup

]0;root@LC_1811@Greim:/Setuproot@LC_1811@Greim:/Setup
> cd Accounting

]0;root@LC_1811@Greim:/Setup/Accountingroot@LC_1811@Greim:/Setup/Accounting
> cd Accounting-List

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> ls -a

[1.3.6.1.4.1.2356.500.3.1811][2.18.5]
Username                      Peer                             Conn.-Type  Rx-KBytes   Tx-KBytes   Total-Time             Connections 
[1]                           [3]                              [4]         [5]         [6]         [8]                    [9]           
--------------------------------------------------------------------------------------------------------------------------------------
LynnT                         RHTEC                            DSL-line    6131059     1060540     4D 14:16:47            1           
KappesR                       RHTEC                            DSL-line    6910283     1481316     3D 10:11:45            1           
MuijssonS                     RHTEC                            DSL-line    4739700     207356      2D 5:57:18             0           
FeitM                         RHTEC                            DSL-line    1159178     245363      1D 20:36:50            0           
CopeH                         RHTEC                            DSL-line    4527401     227845      1D 15:36:06            0           
FeitH                         RHTEC                            DSL-line    3038787     227403      1D 15:21:46            0           
MichelsM                      RHTEC                            DSL-line    1382832     136297      1D 11:02:03            0           
RoethelB                      RHTEC                            DSL-line    2844737     137213      1D 2:35:15             0           
WeberM                        RHTEC                            DSL-line    5612192     149797      21:52:25               0           
TombersF                      RHTEC                            DSL-line    1447206     98416       20:59:00               0           
HardM                         RHTEC                            DSL-line    789039      148291      19:28:51               0           
VanPuttenH                    RHTEC                            DSL-line    371815      171179      18:51:56               1           
HolmsteadK                    RHTEC                            DSL-line    2256872     100313      17:26:38               0           
WeinsU                        RHTEC                            DSL-line    3809179     79723       15:54:58               0           
ThielU                        RHTEC                            DSL-line    1625325     122364      15:37:47               0           
AksoyB                        RHTEC                            DSL-line    1188488     59353       14:49:11               0           
KlaasH                        RHTEC                            DSL-line    286767      17656       12:22:18               0           
HeuslerW                      RHTEC                            DSL-line    456879      71795       10:47:18               0           
SchiffelsS                    RHTEC                            DSL-line    1265303     71742       10:38:08               0           
WeberT                        RHTEC                            DSL-line    1773584     60653       10:31:40               0           

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-ListMORE [Q(uit)]>

[1.3.6.1.4.1.2356.500.3.1811][2.18.5]
Username                      Peer                             Conn.-Type  Rx-KBytes   Tx-KBytes   Total-Time             Connections 
[1]                           [3]                              [4]         [5]         [6]         [8]                    [9]           
--------------------------------------------------------------------------------------------------------------------------------------
SchmitzK                      RHTEC                            DSL-line    962246      69414       9:33:51                0           
DodtM                         RHTEC                            DSL-line    2751047     65738       9:12:36                0           
AhnenS                        RHTEC                            DSL-line    499056      74896       9:00:53                0           
EschM                         RHTEC                            DSL-line    106814      24749       8:58:24                0           
GoerresR                      RHTEC                            DSL-line    1066429     42999       8:18:13                0           
SteffesH                      RHTEC                            DSL-line    488117      34758       8:04:49                0           
HaringsJ                      RHTEC                            DSL-line    375074      36403       7:53:42                0           
RohlesO                       RHTEC                            DSL-line    373953      20917       7:14:44                0           
PeschD                        RHTEC                            DSL-line    310732      21047       6:33:19                0           
SchmitzJ                      RHTEC                            DSL-line    950689      30138       5:52:50                0           
HellerM                       RHTEC                            DSL-line    203258      21172       5:31:33                0           
EwenO                         RHTEC                            DSL-line    867902      30634       5:04:17                0           
MinorD                        RHTEC                            DSL-line    23532       6202        4:50:25                0           
WelterM                       RHTEC                            DSL-line    1246714     41328       4:24:22                0                     
GoerresR                      RHTEC                            DSL-line    17531       17777       4:15:07                0           
RohlesO                       RHTEC                            DSL-line    421857      14694       4:13:14                0           

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-ListMORE [Q(uit)]>

[1.3.6.1.4.1.2356.500.3.1811][2.18.5]
Username                      Peer                             Conn.-Type  Rx-KBytes   Tx-KBytes   Total-Time             Connections 
[1]                           [3]                              [4]         [5]         [6]         [8]                    [9]           
--------------------------------------------------------------------------------------------------------------------------------------
KleinB                        RHTEC                            DSL-line    842357      27174       3:59:19                0           
EwaldJ                        RHTEC                            DSL-line    97783       10181       3:00:43                0           
LoenardM                      RHTEC                            DSL-line    93638       8841        2:52:15                0           
PeschJ                        RHTEC                            DSL-line    101020      6363        2:41:30                0           
TombersJ                      RHTEC                            DSL-line    579081      14297       2:10:18                0           
WartnerD                      RHTEC                            DSL-line    56537       8215        2:04:20                0           
RoepkeR                       RHTEC                            DSL-line    76358       12737       1:56:41                0           
SchmitzR                      RHTEC                            DSL-line    115803      6834        1:38:51                0           
log-server                    RHTEC                            DSL-line    1572        8184        1:30:36                0           
SchmidtM                      RHTEC                            DSL-line    23220       1566        1:17:35                0           
PeschB                        RHTEC                            DSL-line    18910       829         1:11:38                0           
OttenJ                        RHTEC                            DSL-line    12802       1274        1:10:14                0           
SchlimpenM                    RHTEC                            DSL-line    10064       636         1:10:04                0           
KenersonF                     RHTEC                            DSL-line    143         3           1:04:16                0           
FeWoMetzen                    RHTEC                            DSL-line    134         1           1:01:12                0           
SwaniganS                     RHTEC                            DSL-line    128         1           0:58:16                0           
HerbelB                       RHTEC                            DSL-line    121         0           0:56:39                0           

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-ListMORE [Q(uit)]>

[1.3.6.1.4.1.2356.500.3.1811][2.18.5]
Username                      Peer                             Conn.-Type  Rx-KBytes   Tx-KBytes   Total-Time             Connections 
[1]                           [3]                              [4]         [5]         [6]         [8]                    [9]           
--------------------------------------------------------------------------------------------------------------------------------------
MerkelK                       RHTEC                            DSL-line    49520       2518        0:47:42                0           
SchwerdtM                     RHTEC                            DSL-line    32387       3599        0:45:36                0           
BayerM                        RHTEC                            DSL-line    44560       4187        0:27:49                0           

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 

]0;root@LC_1811@Greim:/Setup/Accounting/Accounting-Listroot@LC_1811@Greim:/Setup/Accounting/Accounting-List
> 
Was könnte das Problem sein?

Gruß Hardy
Benutzeravatar
Hardy
Beiträge: 58
Registriert: 26 Jun 2008, 09:07

Beitrag von Hardy »

Hallo,

ich kann das Problem jetzt weiter einschränken.

Wenn ich mich z.B. mit Putty per telnet auf dem LC-1811 einlogge, dann nach /Status/Accounting/Accounting-List navigiere und mit ls die Daten abrufen, dann klappts.

Wenn ich nun allerdings das Putty Fenster verkleinere, daß es nur vier oder weniger Zeilen anzeigen kann, dann erscheint lediglich immer wieder die "MORE [Q(uit)]>" Aufforderung jedoch ohne auch nur eine einzige Tabellenzeile auszugeben.

Wenn ich den Befehl ls -a benutze, gibt er zumindest immer den SNMP OID aus, aber keine Tabellenzeile.

Dem Hilfe-Aufruf ('?') ist die Putty-Fenstergröße auch egal, dort wird immer der komplette Text rausgeschrieben.

In meinem Fall also öffnet mein "Expect-Skript" quasi eine Shell mit geringer Höhe. Deshalb funktioniert es wohl nicht.
Hat jemand eine Idee wie ich das umgehen kann?

Gruß Hardy
backslash
Moderator
Moderator
Beiträge: 7132
Registriert: 08 Nov 2004, 21:26
Wohnort: Aachen

Beitrag von backslash »

Hi Hardy

du hast offenbar die Einstellung für die Zeilenzahl (/setup/config/srceen-height bzw. /setup/config/bildschirmhoehe) auf 0, d.h automatisch, gestellt. Stell den Wert auf 9999 und die MORE-Zeile taucht nicht mehr auf.

Am Besten baust du das in dein Script ein: Am Anfang den Wert auf 9999 stellen, dann die gewünschten Tabellen auslesen und am Ende wieder zurück auf 0

Gruß
Backslash
Benutzeravatar
Hardy
Beiträge: 58
Registriert: 26 Jun 2008, 09:07

Beitrag von Hardy »

Hi Backslash,

mit bildschirmhoehe=9999 klappts wunderbar.
Dann sind jetzt auch die MORE-Zeilen weg und ich bekomme die komplette Accounting-Liste als Textdatei.

Vielen Dank für die schnelle Hilfe.

Gruß Hardy
Antworten