aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin/processes.php
diff options
context:
space:
mode:
authorPim van den Berg2012-09-05 16:07:44 +0200
committerPim van den Berg2012-09-05 16:10:39 +0200
commit074589c36937a468587abe37bc4ce0fbddf80b20 (patch)
tree921ffd1e49dde8bd21f625409f12d70251f3204b /plugin/processes.php
parentplugin: add snmp plugin (diff)
downloadapt-panopticon_cgp-074589c36937a468587abe37bc4ce0fbddf80b20.zip
apt-panopticon_cgp-074589c36937a468587abe37bc4ce0fbddf80b20.tar.gz
apt-panopticon_cgp-074589c36937a468587abe37bc4ce0fbddf80b20.tar.bz2
apt-panopticon_cgp-074589c36937a468587abe37bc4ce0fbddf80b20.tar.xz
apply datasize (bytes/bits) only to network related data
As discussed in https://github.com/pommi/CGP/pull/1.
Diffstat (limited to 'plugin/processes.php')
-rw-r--r--plugin/processes.php18
1 files changed, 6 insertions, 12 deletions
diff --git a/plugin/processes.php b/plugin/processes.php
index c66d3fb..dca00b7 100644
--- a/plugin/processes.php
+++ b/plugin/processes.php
@@ -63,8 +63,7 @@ switch($obj->args['type'])
63 'value' => '0000ff', 63 'value' => '0000ff',
64 ); 64 );
65 $obj->rrd_title = sprintf('Text Resident Set (%s)', $obj->args['pinstance']); 65 $obj->rrd_title = sprintf('Text Resident Set (%s)', $obj->args['pinstance']);
66 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 66 $obj->rrd_vertical = 'Bytes';
67 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
68 break; 67 break;
69 68
70 case 'ps_count': 69 case 'ps_count':
@@ -106,8 +105,7 @@ switch($obj->args['type'])
106 'write' => '00b000', 105 'write' => '00b000',
107 ); 106 );
108 $obj->rrd_title = sprintf('Disk Traffic (%s)', $obj->args['pinstance']); 107 $obj->rrd_title = sprintf('Disk Traffic (%s)', $obj->args['pinstance']);
109 $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['datasize'])); 108 $obj->rrd_vertical = 'Bytes per second';
110 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
111 break; 109 break;
112 110
113 case 'ps_disk_ops': 111 case 'ps_disk_ops':
@@ -132,8 +130,7 @@ switch($obj->args['type'])
132 'value' => '0000ff', 130 'value' => '0000ff',
133 ); 131 );
134 $obj->rrd_title = sprintf('Data Resident Set (%s)', $obj->args['pinstance']); 132 $obj->rrd_title = sprintf('Data Resident Set (%s)', $obj->args['pinstance']);
135 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 133 $obj->rrd_vertical = 'Bytes';
136 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
137 break; 134 break;
138 135
139 case 'ps_pagefaults': 136 case 'ps_pagefaults':
@@ -158,8 +155,7 @@ switch($obj->args['type'])
158 'value' => '0000ff', 155 'value' => '0000ff',
159 ); 156 );
160 $obj->rrd_title = sprintf('Resident Segment Size (%s)', $obj->args['pinstance']); 157 $obj->rrd_title = sprintf('Resident Segment Size (%s)', $obj->args['pinstance']);
161 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 158 $obj->rrd_vertical = 'Bytes';
162 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
163 break; 159 break;
164 160
165 case 'ps_stacksize': 161 case 'ps_stacksize':
@@ -170,8 +166,7 @@ switch($obj->args['type'])
170 'value' => '0000ff', 166 'value' => '0000ff',
171 ); 167 );
172 $obj->rrd_title = sprintf('Stacksize (%s)', $obj->args['pinstance']); 168 $obj->rrd_title = sprintf('Stacksize (%s)', $obj->args['pinstance']);
173 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 169 $obj->rrd_vertical = 'Bytes';
174 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
175 break; 170 break;
176 171
177 case 'ps_vm': 172 case 'ps_vm':
@@ -182,8 +177,7 @@ switch($obj->args['type'])
182 'value' => '0000ff', 177 'value' => '0000ff',
183 ); 178 );
184 $obj->rrd_title = sprintf('Virtual Memory (%s)', $obj->args['pinstance']); 179 $obj->rrd_title = sprintf('Virtual Memory (%s)', $obj->args['pinstance']);
185 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 180 $obj->rrd_vertical = 'Bytes';
186 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
187 break; 181 break;
188 182
189} 183}