#共享内存泄漏检测
proc OM_share_memory_leak_check {} {
ExecTelnetCmd "return"
ExecTelnetCmd "system-view"
ExecTelnetCmd "_d"
set spu_list [GetSpuSlotList]
set num ""
foreach num $spu_list {
ExecTelnetCmd "enable xboard output redirect $num"
ExecTelnetCmd "Y\n" 1
set info_list [list]
set report [ExecTelnetCmd "debugging xboard command $num vcpu 0 mon show-share-memory 1 0 0 0"]
set repList [list]
set repList [split $report "\n"]
set line ""
foreach line $repList {
if {-1 != [string first "PtNo =" $line]} {
set no ""
set mask ""
if {[regexp {[=] +([0-9]+)[^\:]+[:](.*)} $line matchstr no mask]} {
set no [string trim $no]
set mask [string trim $mask]
lappend info_list $no
lappend info_list $mask
}
} if {-1 != [string first "TotalSize :" $line] || -1 != [string first "FreeSize :" $line]} {
set no ""
if {[regexp {[\(]([0-9]+)} $line matstr no]} {
lappend info_list $no
}
}
}
proc OM_share_memory_leak_check {} {
ExecTelnetCmd "return"
ExecTelnetCmd "system-view"
ExecTelnetCmd "_d"
set spu_list [GetSpuSlotList]
set num ""
foreach num $spu_list {
ExecTelnetCmd "enable xboard output redirect $num"
ExecTelnetCmd "Y\n" 1
set info_list [list]
set report [ExecTelnetCmd "debugging xboard command $num vcpu 0 mon show-share-memory 1 0 0 0"]
set repList [list]
set repList [split $report "\n"]
set line ""
foreach line $repList {
if {-1 != [string first "PtNo =" $line]} {
set no ""
set mask ""
if {[regexp {[=] +([0-9]+)[^\:]+[:](.*)} $line matchstr no mask]} {
set no [string trim $no]
set mask [string trim $mask]
lappend info_list $no
lappend info_list $mask
}
} if {-1 != [string first "TotalSize :" $line] || -1 != [string first "FreeSize :" $line]} {
set no ""
if {[regexp {[\(]([0-9]+)} $line matstr no]} {
lappend info_list $no
}
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货