Created
September 13, 2012 23:35
-
-
Save jamerfort/3718595 to your computer and use it in GitHub Desktop.
List all the "Error Msg:" stats for each thread in the current site.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# hcitcl error_msgs.tcl | |
msiAttach | |
# get a list of threads | |
set threads [msiTocEntry] | |
set len [llength $threads] | |
# loop through each thread | |
for { set i 0 } { $i < $len } {incr i} { | |
set thread_name [lindex $threads $i] | |
# get this thread's stats | |
set stats [msiGetStatSample $i] | |
# look for the "PLASTERRTEXT" key in the stats | |
if { [lsearch [keylkeys stats] PLASTERRTEXT] != -1 } { | |
set lastmsg [keylget stats PLASTERRTEXT] | |
if { $lastmsg != "" } { | |
puts "$thread_name: $lastmsg" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment