![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Linux behind a cisco router | tmm | IP Networking | 0 | 01-30-2008 02:54 AM |
| Cisco Router command to get hostname | rahulrathod | UNIX for Advanced & Expert Users | 3 | 02-15-2006 09:34 AM |
| I can't ping my linksys router from Ultra 10 | cstovall | SUN Solaris | 3 | 01-05-2005 11:47 AM |
| cannot ping router from sgi irix | eidde | IP Networking | 0 | 05-14-2004 04:24 PM |
| ping and telnet | macdonto | IP Networking | 5 | 10-05-2001 09:24 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Perl telnet to cisco router and compare the ping ms
All
Please help, i will telnet to router to obain the ping status and compare, if higher than normal latency, i will have further action.. if i do the telent and in perl script then .... e.g the result i obtain from the router will be =' Success rate is 100 percent (5/5), round-trip min/avg/max = 140/140/141 ms' and the xxxx/140/xxxx ms , while i only concern the average one = 140ms. How can I read the value in the middle of the '/'line, sometimes will be 2 digit , sometimes will be 4 digit and how I can compare it? For example I define 180ms is not acceptable, if now the ping is 100/250/300 ms while the 250 is higher than 180 , then I will print 'high Alarm'. |
|
||||
|
robotronic thanks ...
Thanks for robotronic 's help.
but i was mistake the result i obtain from the router must be look like this "Router#ping 192.168.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 104/104/104 ms Router#" there must be 7 lines how can i get the middle average value in addition, how i can handle the non standard reply , (e.g the remote cannot be ping) Router#ping 1.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds: U.U.. Success rate is 0 percent (0/5) Router# anyway, thanks for robotronic 's help as I had already search for a very long time for nothing. Last edited by optimus; 08-23-2007 at 02:59 PM.. |
|
||||
|
thanks for robotronic 's reply
robotronic
I am trying, and sol glad got your reply. I will try after office hour. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|