Originally posted by herm ernst
Originally posted by Chris Williams
proc getProcThreads {process} { global HciSiteDir global hostData if ![array exists hostData] { set netconfig [file join $HciSiteDir NetConfig] nfLoad $netconfig processData hostData xlateData NetFilePrologue } set outList {} set threads [lsort -dictionary [array names hostData]] foreach thread $threads { set kl [list [array get hostData $thread]] set threadKeys [keylget kl $thread] if ![string equal -nocase [keylget threadKeys PROCESSNAME] $process] {continue} lappend outList $thread } return $outList}
Originally posted by Connie Kraska
global envif {$argc != 1} { puts "" puts ""procbythread puts "" exit}set procname [lindex $argv 0]set fh [open $env(HCISITEDIR)/NetConfig "RDONLY"]while 1 { if {[eof $fh]} {break} set len [gets $fh line] if {[string first "protocol" $line] == 0} { set threadname [lindex [split $line " "] 1] } if {[string first [string toupper $procname] [string toupper $line]] >= 0} { puts "$threadname: $line" }}