This procedure is defined in the server but not documented via ad_proc or proc_doc and may be intended as a private interface.
The procedure is defined as:
proc ns::stats::linuxDiskSnapshot {} {
set disks {}
foreach path [lsort [glob -nocomplain -directory /sys/block *]] {
set name [file tail $path]
if {[string match loop* $name] || [string match ram* $name]} {continue}
set fields [regexp -all -inline {\S+} [::ns::stats::linuxReadFile $path/stat]]
if {[llength $fields] < 11} {continue}
set valid 1
foreach value $fields {
if {![string is entier -strict $value] || $value < 0} {set valid 0; break}
}
if {!$valid} {continue}
set disk [dict create reads [lindex $fields 0] readMs [lindex $fields 3] writes [lindex $fields 4] writeMs [lindex $fields 7] inFlight [lindex $fields 8] ioMs [lindex $fields 9] weightedIoMs [lindex $fields 10]]
set inflight [regexp -all -inline {\S+} [::ns::stats::linuxReadFile $path/inflight]]
if {[llength $inflight] == 2 && [string is entier -strict [lindex $inflight 1]]
&& [lindex $inflight 1] >= 0} {
dict set disk writeQueue [lindex $inflight 1]
}
dict set disks $name $disk
}
return $disks
}