Sponsored Content
Top Forums Shell Programming and Scripting Perl telnet to cisco router and compare the ping ms Post 302133478 by optimus on Thursday 23rd of August 2007 01:33:22 PM
Old 08-23-2007
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'.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Cisco Router command to get hostname

Hi All, I am connected to a cisco router and I want to know the hostname of this router. I connect as telnet <IPADDRESS> and the prompt shows vpnaccess-bristol> But I want to know the full hostname of the router how can i do that. When i type the hostname command the following... (3 Replies)
Discussion started by: rahulrathod
3 Replies

2. IP Networking

Linux behind a cisco router

Dear All, I have worked with xDSL routers working in bridged mode, and linux behind them working as a Firewall utilizing IPTABLES. My question is, how this will change if the xDSL router is replaced with a Cisco Router? I mean to ask that, can I assign a public ip on the linux machine, which... (0 Replies)
Discussion started by: tmm
0 Replies

3. IP Networking

isc dhcpd and cisco router

Hello all, I have set up dhcpd on a linux box for serving subnets on multiple vlans configured on a Cisco 6500 with ip helper of the dhcp server. Servers get dhcp leases just fine, however, some machines lose their connection for reboot or what not and I can not get their lease back even though... (0 Replies)
Discussion started by: closedown
0 Replies

4. Shell Programming and Scripting

perl telnet issue with cisco

Hi Experts, I am using perl to telnet on cisco boxes. We have this stupid cisco node which does not support "terminal Length0" command. Since I am using Net::Telnet and capturing output with @output = $telnet->cmd('cmd'); Say @output = $telnet->cmd('show version'); Now problem... (2 Replies)
Discussion started by: mtomar
2 Replies

5. Shell Programming and Scripting

Perl variables inside Net::Telnet::Cisco Module doesn't work

I am writing perl script to configure Cisco device but Variables inside Net::Telnet::Cisco Module doesn't work and passed to device without resolving. Please advise. here is a sample of script: use Net::Telnet::Cisco; $device = "10.14.199.1"; ($o1, $o2, $o3, $o4) = split(/\./,$device);... (5 Replies)
Discussion started by: ahmed_zaher
5 Replies

6. Shell Programming and Scripting

Animation Ping on Solaris Like Cisco Ping

Hi, I develop simple animation ping script on Solaris Platform. It is like Cisco ping. Examples and source code are below. bash-3.00$ gokcell 152.155.180.8 30 Sending 30 Ping Packets to 152.155.180.8 !!!!!!!!!!!!!.!!!!!!!!!!!!!!!. % 93.33 success... % 6.66 packet loss...... (1 Reply)
Discussion started by: gokcell
1 Replies

7. Shell Programming and Scripting

Perl Telnet cisco routers

Hi all i have little problem finding solution about simple telnet script .... i have 250 routers and on some i have different password and on some they ask just for password no username. So for example 1,2,3 have username and password (user,password) 4, and 5 have different username and password... (0 Replies)
Discussion started by: IvanMP
0 Replies

8. Shell Programming and Scripting

Perl telnet to router run commands from file

I have a perl script that is called with a router name command list file and output file. The command file can be very large, up to 3k of commands. At first I dumped the command list file to an array and ran the entire file on the router and captured the output. It worked ok for a command list in... (1 Reply)
Discussion started by: numele
1 Replies

9. IP Networking

Need help configuring Cisco 892-k9 router

I bought a Cisco 892-k9 router and I am having in issue trying to setup the initial configuration. Does someone have a sampl configuration for a single subnet that I can use for my configuration? Thanks. (0 Replies)
Discussion started by: gandolf989
0 Replies
Regexp::Common::URI::telnet(3)				User Contributed Perl Documentation			    Regexp::Common::URI::telnet(3)

NAME
Regexp::Common::URI::telnet -- Returns a pattern for telnet URIs. SYNOPSIS
use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{telnet}/ and print "Contains a telnet URI. "; } DESCRIPTION
$RE{URI}{telnet} Returns a pattern that matches telnet URIs, as defined by RFC 1738. Telnet URIs have the form: "telnet:" "//" [ user [ ":" password ] "@" ] host [ ":" port ] [ "/" ] Under "{-keep}", the following are returned: $1 The complete URI. $2 The scheme. $3 The username:password combo, or just the username if there is no password. $4 The username, if given. $5 The password, if given. $6 The host:port combo, or just the host if there's no port. $7 The host. $8 The port, if given. $9 The trailing slash, if any. REFERENCES
[RFC 1738] Berners-Lee, Tim, Masinter, L., McCahill, M.: Uniform Resource Locators (URL). December 1994. SEE ALSO
Regexp::Common::URI for other supported URIs. AUTHOR
Damian Conway (damian@conway.org) MAINTAINANCE
This package is maintained by Abigail (regexp-common@abigail.be). BUGS AND IRRITATIONS
Bound to be plenty. LICENSE and COPYRIGHT This software is Copyright (c) 2001 - 2009, Damian Conway and Abigail. This module is free software, and maybe used under any of the following licenses: 1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD Licence. See the file COPYRIGHT.BSD. 4) The MIT Licence. See the file COPYRIGHT.MIT. perl v5.16.2 2010-02-23 Regexp::Common::URI::telnet(3)
All times are GMT -4. The time now is 06:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy