one more question i am almost done here
Here is my script, what i want to do is using show clock command to give me a message at the end
script run for x amount of time, and show me the time.
and I AM DONE, and awaiting my TCL books ;) :)
thank you
**********************************************************************
puts "\nSTART TIME OF THE SCRIPT"
show clock
puts "\n-------------------------------------------- \n HEALTCHECK ABOUT TO START \n--------------------------------------------"
foreach address {
192.168.1.1
192.168.1.2
192.168.1.3
192.168.1.4
} { set status [ catch { exec "ping $address re 10" } msg ]
if { [regexp "(!!!!!!!!!)" $msg] } {
puts "$address \t****** BGP PEERS PASSED *******"
} else { puts "$address \t****** BGP PEERS FAILED ******" }
}
puts "--------------------------------------------\n BGP TEST COMPLETED \n--------------------------------------------"
puts "\nSTOP TIME OF THE SCRIPT"
show clock
Marcin Zgola
Internetwork Lead
CCIE #18676
Netrix, LLC
http://www.netrixllc.com
Ph. 847-964-5300
Fax.: 847-964-5350
-----Original Message-----
From: Baldwin, Patrick A. [mailto:Alex.Baldwin_at_nasa.gov]
Sent: Friday, November 12, 2010 8:33 PM
To: Marko Milivojevic; Senthil Kumar
Cc: Tyson Scott; Marcin Zgola; Cisco certification
Subject: RE: TCL Script help
not a bad book, I found it in ebook format for $9.99 on Cisco's eBook deal of the day a few weeks ago.
http://www.ciscopress.com/deals/
BTW until midnight, Routing TCP/IP Vol II is on for $9.99 a must have for CCIE study.
Patrick A. Baldwin (Alex)
Network Engineering
Colsa Corp., HOSC Contract
NASA , Marshall Space Flight Center
Office: (256)B 544-2089
o
Fax: (256)B 544-8629B B
B E-mail: Alex.Baldwin_at_Nasa.gov
-----Original Message-----
From: nobody_at_groupstudy.com [mailto:nobody_at_groupstudy.com] On Behalf Of Marko Milivojevic
Sent: Friday, November 12, 2010 5:09 PM
To: Senthil Kumar
Cc: Tyson Scott; Marcin Zgola; Cisco certification
Subject: Re: TCL Script help
TCL Scripting for Cisco IOS (ISBN: 1587059452)
-- Marko Milivojevic - CCIE #18427 Senior Technical Instructor - IPexpert FREE CCIE training: http://bit.ly/vLecture Mailto: markom_at_ipexpert.com Telephone: +1.810.326.1444 Web: http://www.ipexpert.com/ On Fri, Nov 12, 2010 at 03:37, Senthil Kumar <2008ccie_at_live.com> wrote: > Tyson, > Could you please recommend any book for TCL script? I have little > knowledge, and I would like to learn deeper... I appreciate your reply > Thanks > > On 12/11/10 3:11 AM, "Tyson Scott" <tscott_at_ipexpert.com> wrote: > >>proc ping1 {IP} { >> set PING [ exec "ping vrf CUST1 $IP repeat 10" ] >> set PING [ regexp -inline -all {[\.!]{3}} $PING ] >> if { [ string first "!" $PING ] == -1 } { >> puts "[format "%-40s %s" "ping $IP" "****** FAILED *******" ]" >> } else { puts "[format "%-40s %s" "ping $IP" "****** PASSED *******" ]" } >>} >>proc ping2 {IP} { >> set PING [ exec "ping vrf C-GRATE $IP repeat 10" ] >> set PING [ regexp -inline -all {[\.!]{3}} $PING ] >> if { [ string first "!" $PING ] == -1 } { >> puts "[format "%-40s %s" "ping $IP" "****** FAILED *******" ]" >> } else { puts "[format "%-40s %s" "ping $IP" "****** PASSED *******" ]" } >>} >>foreach address { >>10.8.2.1 >>10.8.2.2 >>10.8.2.7 >>10.8.0.45 >>10.3.1.1 >>10.3.2.1 >>10.3.0.26 >>10.3.0.3 >>172.16.64.1 >>172.16.68.1 >>} { ping2 $address } >>foreach address { >>167.10.10.5 >>10.10.0.1 >>10.10.0.5 >>} { ping1 $address } >> >>Regards, >> >>Tyson Scott - CCIE #13513 R&S, Security, and SP >>Managing Partner / Sr. Instructor - IPexpert, Inc. >>Mailto: tscott_at_ipexpert.com >> >> >>-----Original Message----- >>From: nobody_at_groupstudy.com [mailto:nobody_at_groupstudy.com] On Behalf Of >>Marcin Zgola >>Sent: Thursday, November 11, 2010 1:31 AM >>To: Cisco certification >>Subject: TCL Script help >> >>i have a PE router, that i want to develop TCL script that will check >>connectivity to all of the customers. >> >>I am confused with the script. HEre is list of ip addresses i want to ping >>sourcing from each VRF< and results either PASSED or FAILED. >> >>can some one help me? >> >>set cust2 { >>10.8.2.1 >>10.8.2.2 >>10.8.2.7 >>10.8.0.45 >>10.3.1.1 >>10.3.2.1 >>10.3.0.26 >>10.3.0.3 >>172.16.64.1 >>172.16.68.1 >>} >>set cust1 { >>167.10.10.5 >>10.10.0.1 >>10.10.0.5 >>} >>foreach address { >> >>} { >>if { [regexp "(!!!!!!!!!)" [exec "ping vrf CUST1 $address rep 10" ]] } { >>puts "$address B ****** PASSED *******" >>} else { puts "$address ****** FAILED ******" } >>} >>if { [regexp "(!!!!!!!!!)" [exec "ping vrf C-GRATE $addressgrate rep 10" >>]] >>} { >>puts "$address B ****** PASSED *******" >>} else { puts "$address ****** FAILED ******" } >> >>Marcin Zgola >>Internetwork Lead >>CCIE #18676 >>Netrix, LLC >>http://www.netrixllc.com >>Ph. 847-964-5300 >>Fax.: 847-964-5350 >> >> >>Blogs and organic groups at http://www.ccie.net >> >>_______________________________________________________________________ >>Subscription information may be found at: >>http://www.groupstudy.com/list/CCIELab.html >> >> >>Blogs and organic groups at http://www.ccie.net >> >>_______________________________________________________________________ >>Subscription information may be found at: >>http://www.groupstudy.com/list/CCIELab.html > > > Blogs and organic groups at http://www.ccie.net > > _______________________________________________________________________ > Subscription information may be found at: > http://www.groupstudy.com/list/CCIELab.html Blogs and organic groups at http://www.ccie.netReceived on Sat Nov 13 2010 - 03:59:02 ART
This archive was generated by hypermail 2.2.0 : Sun Dec 05 2010 - 22:14:56 ART