New developer-console

This commit is contained in:
Eduardo Silva
2006-11-16 09:09:07 -03:00
committed by Marco Pesenti Gritti
parent 9a7518f230
commit d51031d882
34 changed files with 927 additions and 18 deletions
@@ -0,0 +1,6 @@
sugardir = $(pkgdatadir)/shell/console/plugins/dirty_size
sugar_PYTHON = \
README \
__init__.py \
info.py
+2
View File
@@ -0,0 +1,2 @@
This plugin give support to get the public and shared dirty memory usage
by process using the /proc/PID/smaps file.
@@ -0,0 +1,17 @@
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)"]
}
+20
View File
@@ -0,0 +1,20 @@
###########################################################
# Main function:
# -----------------
# self: self plugin object
# mself: memphis object / principal class
# pinfo: row with information about current tracing process
############################################################
def plg_on_top_data_refresh(self, ppinfo):
dirty_sizes = get_dirty(self, ppinfo['pid'])
# memhis need an array
return [dirty_sizes['private']]
def get_dirty(pself, pid):
ProcAnalysis = pself.INTERNALS['Plg'].proc_analysis(pid)
return ProcAnalysis.DirtyRSS()