#!/usr/bin/kshclversion="cis6.1"hld="prod"tmpcfg="/tmp/hci_temp_netconfig.txt"sites=`ls /$hld/$clversion/*/NetConfig | awk -F/ '{print $4}'`for site in $sites do setsite $site echo "------------------------------------------------------------------" echo "site: $site" cat /$hld/$clversion/$site/NetConfig > $tmpcfg # loop through each process in the site processes=`ls /$hld/$clversion/$site/exec/processes` for process in $processes;do echo " process: $process" # loop through each thread threads=`getProcessInboundThreads.tcl $site $tmpcfg $process` for thread in $threads;do echo " inbound thread: $thread" done done doneexit 0
#! /usr/bin/ksh# The following line is seen as a continuecomment by Tclexec $QUOVADX_INSTALL_DIR/integrator/bin/hcitcl "$0" ${1+"$@};set site [lindex $argv 0 ]set cfile [lindex $argv 1]set process [lindex $argv 2]set hfile [open $cfile r]set config [read $hfile]close $hfileset threads {}set ct 0set lconfig [split "$config" "n"]foreach line $lconfig { if {[string range $line 0 7] eq "protocol"} { set thread [lindex [split $line " "] 1] set start [string first "protocol $thread" "$config"] set start [expr $start + 9 + [string length $thread]] set end [expr [string first "nprotocol" "$config" $start] - 1] if {$end < 0} { set kprotocol [string range "$config" $start end] } else { set kprotocol [string range "$config" $start $end] } set start [expr [string first "{" "$kprotocol"] + 1] set end [expr [string last "}" "$kprotocol"] - 1] set kprotocol [string range "$kprotocol" $start $end] set tprocess [keylget kprotocol PROCESSNAME] set tprocess [string trim "$tprocess"] if {"$tprocess" eq "$process"} { set outboundonly [keylget kprotocol OUTBOUNDONLY] if {!$outboundonly} { lappend threads $thread } } }}set newthreads [lsort -unique $threads ]foreach thread $newthreads {echo $thread}exit 0