2010-07-04 22:01:13 +00:00
|
|
|
<?php
|
|
|
|
|
2011-03-16 21:59:11 +00:00
|
|
|
if ($_GET['id']) { $id = mres($_GET['id']); }
|
|
|
|
if ($_GET['device']) { $id = mres($_GET['device']); }
|
2010-07-04 22:01:13 +00:00
|
|
|
|
2011-03-16 21:59:11 +00:00
|
|
|
$i = 1;
|
2010-07-04 22:01:13 +00:00
|
|
|
|
|
|
|
$query = mysql_query("SELECT * FROM `ucd_diskio` AS U, `devices` AS D WHERE D.device_id = '".$id."' AND U.device_id = D.device_id");
|
2011-03-16 21:59:11 +00:00
|
|
|
|
2011-04-06 13:54:50 +00:00
|
|
|
while ($disk = mysql_fetch_assoc($query))
|
2011-03-16 21:59:11 +00:00
|
|
|
{
|
2010-07-04 22:01:13 +00:00
|
|
|
$rrd_filename = $config['rrd_dir'] . "/" . $disk['hostname'] . "/ucd_diskio-" . safename($disk['diskio_descr'] . ".rrd");
|
2011-03-16 21:59:11 +00:00
|
|
|
if (is_file($rrd_filename))
|
2010-07-04 22:01:13 +00:00
|
|
|
{
|
|
|
|
$rrd_list[$i]['filename'] = $rrd_filename;
|
|
|
|
$rrd_list[$i]['descr'] = $disk['diskio_descr'];
|
|
|
|
$rrd_list[$i]['rra_in'] = "reads";
|
|
|
|
$rrd_list[$i]['rra_out'] = "writes";
|
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-03-16 21:59:11 +00:00
|
|
|
$units = '';
|
|
|
|
$units_descr = 'Operations/sec';
|
|
|
|
$total_units = 'B';
|
|
|
|
$colours_in = 'greens';
|
2010-07-04 22:01:13 +00:00
|
|
|
$multiplier = "1";
|
|
|
|
$colours_out = 'blues';
|
|
|
|
|
|
|
|
$nototal = 1;
|
|
|
|
|
2011-03-17 16:35:18 +00:00
|
|
|
include("includes/graphs/generic_multi_seperated.inc.php");
|
2010-07-04 22:01:13 +00:00
|
|
|
|
2011-03-16 21:59:11 +00:00
|
|
|
?>
|