2020-09-18 20:19:20 +05:30
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
require 'includes/html/graphs/common.inc.php';
|
|
|
|
|
$descr_len = 20;
|
|
|
|
|
|
2020-09-21 15:40:17 +02:00
|
|
|
$rrd_filename = rrd_name($device['hostname'], ['app', 'opensips', $app['app_id']]);
|
2020-09-18 20:19:20 +05:30
|
|
|
|
2020-09-21 15:40:17 +02:00
|
|
|
$array = [
|
|
|
|
|
'total_memory' => [
|
|
|
|
|
'descr' => 'Total',
|
|
|
|
|
'colour' => '22FF22',
|
|
|
|
|
],
|
|
|
|
|
'used_memory' => [
|
|
|
|
|
'descr' => 'Used',
|
|
|
|
|
'colour' => '0022FF',
|
|
|
|
|
],
|
2020-11-22 05:52:58 +01:00
|
|
|
];
|
2020-09-18 20:19:20 +05:30
|
|
|
|
|
|
|
|
$i = 0;
|
|
|
|
|
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
|
|
|
|
foreach ($array as $ds => $var) {
|
|
|
|
|
$rrd_list[$i]['filename'] = $rrd_filename;
|
2020-09-21 15:40:17 +02:00
|
|
|
$rrd_list[$i]['descr'] = $var['descr'];
|
|
|
|
|
$rrd_list[$i]['ds'] = $ds;
|
2020-09-18 20:19:20 +05:30
|
|
|
// $rrd_list[$i]['colour'] = $var['colour'];
|
|
|
|
|
$i++;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
echo "file missing: $file";
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-21 15:40:17 +02:00
|
|
|
$colours = 'mixed';
|
|
|
|
|
$nototal = 1;
|
2020-09-18 20:19:20 +05:30
|
|
|
$unit_text = 'bytes';
|
|
|
|
|
|
|
|
|
|
require 'includes/html/graphs/generic_multi_line.inc.php';
|