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::linuxReadNamedCounters {path} {
set content [::ns::stats::linuxReadFile $path]
set result {}
if {$content eq ""} {
return $result
}
set lines [split [string trim $content] \n]
set count [llength $lines]
for {set i 0} {$i + 1 < $count} {incr i} {
set nameFields [regexp -all -inline {\S+} [lindex $lines $i]]
set valueFields [regexp -all -inline {\S+} [lindex $lines [expr {$i + 1}]]]
if {[llength $nameFields] < 2
|| [llength $valueFields] < 2} {
continue
}
set nameSection [string trimright [lindex $nameFields 0] :]
set valueSection [string trimright [lindex $valueFields 0] :]
if {$nameSection ne $valueSection
|| [llength $nameFields] != [llength $valueFields]} {
continue
}
foreach name [lrange $nameFields 1 end] value [lrange $valueFields 1 end] {
if {[string is integer -strict $value]} {
dict set result $nameSection $name $value
}
}
incr i
}
return $result
}