<% ## Server information. ## Things that don't go here: threads, callbacks, scheduled, sockcallbacks foreach item { server hostname address pid uptime boottime home config log pageroot tcllib nsd argv0 name version label builddate platform } { ## Note the catch so this works on all AOLserver revisions. if [catch { set itemval [ns_info $item] if [regexp {boottime} $item] { set itemval "[ns_httptime $itemval]" } ns_puts "
" } errMsg] { ## Catch commands that don't exist. ns_puts " $item: $itemval " continue } } %> $item: n/a
<% foreach item [lsort [ns_cache_names]] { ns_puts " name stats " } %> $item " ns_puts "[ns_cache_stats $item]
<% foreach key [lsort [nsv_names]] { ns_puts " name entries bytes \n" } %> $key [nsv_array size $key] [string bytelength [nsv_array get $key]]
<% foreach item [lsort [ns_info locks]] { ns_puts " name owner id nlock nbusy " ns_puts " " } %>[lindex $item 0] " for { set i 1 } { $i < [llength $item] } { incr i } { ns_puts "[lindex $item $i] " } ns_puts "
<% foreach item [lsort [ns_info threads]] { ns_puts " name parent tid flags ctime proc arg " for { set i 0 } { $i < 7 } { incr i } { ns_puts " " } %>" } ns_puts " " if { $i != 4 } { ns_puts "[lindex $item $i]" } else { ns_puts "[ns_httptime [lindex $item $i]]" } ns_puts "
<% foreach item [lsort [ns_info scheduled]] { ns_puts " proc id flags interval nextqueue
lastqueue
laststart
lastendarg " ## proc, id, flags, interval ns_puts " " } %>[lindex $item 7] " for { set i 0 } { $i < 3 } { incr i } { ns_puts "[lindex $item $i] " } ## times: nextqueue, lastqueue, laststart, lastend ns_puts "" ## arg ns_puts " " for { set i 3 } { $i < 7 } { incr i } { ns_puts "[ns_httptime [lindex $item $i]]" } ns_puts "[lindex $item 8] " ns_puts "
<% foreach item { connections waiting queued keepalive } { ns_puts "
" } %> $item: " ns_puts "[ns_server $item]
<% foreach item [lsort [ns_info callbacks]] { ns_puts " event name arg " for { set i 0 } { $i < 3 } { incr i } { ns_puts " " } %>[lindex $item $i] " } ns_puts "
<% foreach item [lsort [ns_info sockcallbacks]] { ns_puts " sock id when proc arg " for { set i 0 } { $i < 4 } { incr i } { ns_puts " " } %>[lindex $item $i] " } ns_puts "
<% foreach item [lsort [ns_server urlstats]] { set N [lindex [lindex $item 1] 0] ns_puts " url hits wait (sec) open (sec) closed (sec) " ns_puts " " } %>[lindex $item 0] " ns_puts "$N " foreach {sec usec} [lrange [lindex $item 1] 1 7] { ns_puts "[format "%6f" [expr {($sec + ($usec * .000001))/$N}]] " } ns_puts "
<% ## Tcl library information. foreach item { tclversion patchlevel level nameofexecutable sharedlibextension library} { ns_puts "
" } %> $item: " ns_puts "[info $item]
<% for { set i 0 } { $i < [ns_set size [ns_conn headers]] } { incr i } { ns_puts "[ns_set key [ns_conn headers] $i]: [ns_set \ value [ns_conn headers] $i]" } %>