2016-07-07 11:05:49 +00:00
|
|
|
<?php
|
2019-04-11 23:26:42 -05:00
|
|
|
require 'includes/html/graphs/common.inc.php';
|
2016-07-07 11:05:49 +00:00
|
|
|
$scale_min = 0;
|
|
|
|
$colours = 'mixed';
|
2016-07-08 19:15:48 +00:00
|
|
|
$unit_text = 'Operations';
|
|
|
|
$unitlen = 10;
|
|
|
|
$bigdescrlen = 15;
|
|
|
|
$smalldescrlen = 15;
|
2016-07-08 18:02:07 +00:00
|
|
|
$dostack = 0;
|
2016-07-08 19:15:48 +00:00
|
|
|
$printtotal = 0;
|
2017-09-02 20:45:31 +02:00
|
|
|
$rrd_filename = get_rrd_dir($device['hostname']).'/app-nfsstats-'.$app['app_id'].'.rrd';
|
2016-07-07 11:05:49 +00:00
|
|
|
$array = array(
|
|
|
|
'total' => array(
|
|
|
|
'descr' => 'Total',
|
2016-07-07 11:59:29 +00:00
|
|
|
'colour' => '000000',
|
2016-07-07 11:05:49 +00:00
|
|
|
),
|
|
|
|
'null' => array(
|
|
|
|
'descr' => 'NULL',
|
2016-07-07 11:59:29 +00:00
|
|
|
'colour' => '630606',
|
2016-07-07 11:05:49 +00:00
|
|
|
),
|
|
|
|
'getattr' => array(
|
|
|
|
'descr' => 'Get attributes',
|
2016-07-07 11:59:29 +00:00
|
|
|
'colour' => '50C150',
|
2016-07-07 11:05:49 +00:00
|
|
|
),
|
|
|
|
'setattr' => array(
|
|
|
|
'descr' => 'Set attributes',
|
2016-07-07 11:59:29 +00:00
|
|
|
'colour' => '4D65A2',
|
2016-07-07 11:05:49 +00:00
|
|
|
),
|
|
|
|
'lookup' => array(
|
|
|
|
'descr' => 'Lookup',
|
2016-07-07 11:59:29 +00:00
|
|
|
'colour' => '8B64A1',
|
2016-07-07 11:05:49 +00:00
|
|
|
),
|
|
|
|
'access' => array(
|
|
|
|
'descr' => 'Access',
|
2016-07-07 11:59:29 +00:00
|
|
|
'colour' => 'AAAA39',
|
2016-07-07 11:05:49 +00:00
|
|
|
),
|
|
|
|
'read' => array(
|
|
|
|
'descr' => 'Read',
|
2016-07-07 11:59:29 +00:00
|
|
|
'colour' => '',
|
2016-07-07 11:05:49 +00:00
|
|
|
),
|
|
|
|
'write' => array(
|
|
|
|
'descr' => 'Write',
|
|
|
|
'colour' => '457A9A',
|
|
|
|
),
|
|
|
|
'create' => array(
|
|
|
|
'descr' => 'Create',
|
2016-07-07 11:59:29 +00:00
|
|
|
'colour' => '690D87',
|
2016-07-07 11:05:49 +00:00
|
|
|
),
|
|
|
|
'mkdir' => array(
|
|
|
|
'descr' => 'Make dir',
|
|
|
|
'colour' => '072A3F',
|
|
|
|
),
|
|
|
|
'remove' => array(
|
|
|
|
'descr' => 'Remove',
|
2016-07-07 11:59:29 +00:00
|
|
|
'colour' => 'F16464',
|
2016-07-07 11:05:49 +00:00
|
|
|
),
|
|
|
|
'rmdir' => array(
|
|
|
|
'descr' => 'Remove dir',
|
|
|
|
'colour' => '57162D',
|
|
|
|
),
|
|
|
|
'rename' => array(
|
|
|
|
'descr' => 'Rename',
|
2016-07-07 11:59:29 +00:00
|
|
|
'colour' => 'A40B62',
|
2016-07-07 11:05:49 +00:00
|
|
|
),
|
|
|
|
'readdirplus' => array(
|
|
|
|
'descr' => 'Read dir plus',
|
|
|
|
'colour' => 'F1F164',
|
|
|
|
),
|
|
|
|
'fsstat' => array(
|
|
|
|
'descr' => 'FS stat',
|
|
|
|
'colour' => 'F1F191',
|
|
|
|
),
|
|
|
|
);
|
|
|
|
|
|
|
|
$i = 0;
|
|
|
|
|
2018-01-29 13:52:22 -02:00
|
|
|
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
2017-02-24 15:22:15 +00:00
|
|
|
foreach ($array as $ds => $var) {
|
2016-07-07 11:05:49 +00:00
|
|
|
$rrd_list[$i]['filename'] = $rrd_filename;
|
2017-02-24 15:22:15 +00:00
|
|
|
$rrd_list[$i]['descr'] = $var['descr'];
|
2016-07-07 11:05:49 +00:00
|
|
|
$rrd_list[$i]['ds'] = $ds;
|
2017-02-24 15:22:15 +00:00
|
|
|
$rrd_list[$i]['colour'] = $var['colour'];
|
2016-07-07 11:05:49 +00:00
|
|
|
$i++;
|
|
|
|
}
|
2016-08-18 20:28:22 -05:00
|
|
|
} else {
|
2016-07-07 11:05:49 +00:00
|
|
|
echo "file missing: $file";
|
|
|
|
}
|
|
|
|
|
2019-04-11 23:26:42 -05:00
|
|
|
require 'includes/html/graphs/generic_multi_line_exact_numbers.inc.php';
|