#!/hci/cloverleaf/cis6.1/integrator/bin/hcitcl
######################################################
# Tcl program to obtain Routing info for each thread
global hciRoot
global hciSite
global siteDir
set hciRoot $env(HCIROOT)
set hciSite $env(HCISITE)
set siteDir $env(HCISITEDIR)
set fmt “%-20s %-20s %-35s %s”
set hdr [format $fmt “SOURCE” “DESTINATION” “TRX ID” “XLATE/TCLPROCS”]
puts $hdr
puts “——————————————————————————————————————————- ”
netcfgLoad
set connList [lsort [netcfgGetConnList]]
foreach connection $connList {
set connData [netcfgGetConnData $connection]
set destList “”
keylget connData DATAXLATE dataXlate
if {[llength $dataXlate] > 0} {
foreach route $dataXlate {
keylget route TRXID trxid
keylget route ROUTE_DETAILS route_details
foreach routeDetail $route_details {
set dest “”
set xlate “”
set OutTrans “”
set XlatePreProcs “”
set XlatePostProcs “”
keylget routeDetail DEST dest
keylget routeDetail PREPROCS.PROCS XlatePreProcs
if { $XlatePreProcs ne “” } { append OutTrans $XlatePreProcs ” ” }
keylget routeDetail XLATE xlate
if { $xlate ne “” } { append OutTrans $xlate ” ” }
keylget routeDetail POSTPROCS.PROCS XlatePostProcs
if { $XlatePostProcs ne “” } { append OutTrans $XlatePostProcs ” ” }
keylget routeDetail PROCS.PROCS RouteTclprocs
if { $RouteTclprocs ne “” } { append OutTrans $RouteTclprocs }
set OutTrans [string map {” ” “,”} $OutTrans]
set OutTrans [string trimright $OutTrans “,”]
if { $OutTrans eq “” } { set OutTrans “none” }
lappend destList [format $fmt $connection $dest $trxid $OutTrans]
}
}
foreach dest $destList {
puts “$dest”
}
puts ” ”
}
keylget connData SMS.IN_DATA inTclProcs
# puts “inTclProcs –> $inTclProcs”
keylget connData SMS.OUT_DATA outTclProcs
# puts “outTclProcs –> $outTclProcs”
}
Have fun if you want to use it. From the command line we use named it getroutedata. This way we can use command line stuff to find all of the routes that have certain TCL procs.