DevConsole: New referenced memory usage field in Memphis (introduced in kernel 2.6.22)

This commit is contained in:
Eduardo Silva
2007-08-07 18:14:19 -04:00
parent a3efc1284f
commit 91f68897a6
7 changed files with 46 additions and 35 deletions
@@ -1,17 +0,0 @@
import info
INTERNALS = {
# Basic information
'PLGNAME': "Dirty Size",
'TABNAME': None, # No tabbed plugin
'AUTHOR': "Eduardo Silva",
'DESC': "Get dirty size memory usage",
# Plugin API
'Plg': None, # Plugin object
'top_data': [int], # Top data types needed by memphis core plugin
'top_cols': ["PDRSS (kb)"]
}
@@ -0,0 +1,17 @@
import info
INTERNALS = {
# Basic information
'PLGNAME': "SMaps",
'TABNAME': None, # No tabbed plugin
'AUTHOR': "Eduardo Silva",
'DESC': "Get dirty size and reference memory usage",
# Plugin API
'Plg': None, # Plugin object
'top_data': [int, int], # Top data types needed by memphis core plugin
'top_cols': ["PDRSS (kb)", "Referenced (kb)"]
}
@@ -8,13 +8,12 @@
def plg_on_top_data_refresh(self, ppinfo):
dirty_sizes = get_dirty(self, ppinfo['pid'])
smaps = get_data(self, ppinfo['pid'])
# memhis need an array
return [dirty_sizes['private']]
# memphis need an array
return [smaps['private_dirty'], smaps['referenced']]
def get_dirty(pself, pid):
def get_data(pself, pid):
ProcAnalysis = pself.INTERNALS['Plg'].proc_analysis(pid)
return ProcAnalysis.DirtyRSS()
return ProcAnalysis.SMaps()