jmutton has asked for the wisdom of the Perl Monks concerning the following question:
The two numbers that I'm interested in are the SNR values (69 and 42). Here is my code so far. Just really stuck about parsing the values to be used in a cacti graphi.Account:admin Password: ***** User login successful, expired time is "Unlimited". Type ? for command help > wan vdsl show basic VDSL Link Status: Showtime Firmware Version: 1414c3 VDSL Profile: 17a Basic Status Upstream Downstream Unit Actual Data Rate: 13320 39961 Kb/s SNR: 69 42 0.1dB >
#!/usr/bin/perl use Net::Telnet; my $telnet = Net::Telnet->new(Input_log => 'telnet.log'); $telnet->open('192.168.1.1'); $telnet->waitfor('/Account:/'); $telnet->print('admin'); $telnet->waitfor('/Password:/'); $telnet->print('admin'); sleep(1); $telnet->waitfor('/>/'); my @lines = $telnet->cmd('wan vdsl show basic'); #print @lines; $telnet->close;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Telnet Output
by roboticus (Chancellor) on Dec 30, 2013 at 17:06 UTC | |
|
Re: Telnet Output
by atcroft (Abbot) on Dec 30, 2013 at 17:05 UTC | |
by jmutton (Initiate) on Jan 01, 2014 at 21:19 UTC | |
by jmutton (Initiate) on Jan 01, 2014 at 22:46 UTC |