Created
April 6, 2012 18:46
-
-
Save jamerfort/2322016 to your computer and use it in GitHub Desktop.
Get a count of messages in the Cloverleaf recover database.
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
#!/usr/bin/env hcitcl | |
msiAttach | |
# get a list of threads | |
set threads [msiTocEntry] | |
set num_threads [llength $threads] | |
set total_pending 0 | |
# loop through each thread | |
for {set i 0} {$i < $num_threads} {incr i} { | |
set thread [lindex $threads $i] | |
set pending 0 | |
catch { | |
# get this thread's stats | |
set stats [msiGetStatSample $i] | |
set pending [keylget stats OBDATAQD] | |
foreach inter_thread_stat [keylget stats INTERTHREAD] { | |
# get the Post XLate Queued value | |
set pxqd_value [keylget inter_thread_stat POSTXLTQD] | |
if { $pxqd_value > 0 } { | |
incr pending $pxqd_value | |
} | |
} | |
} | |
if { $pending > 0 } { | |
incr total_pending $pending | |
} | |
} | |
puts $total_pending |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment