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
|
|
|
while ($disk = mysql_fetch_array($query))
|
|
|
|
{
|
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 ='bps';
|
|
|
|
$total_units ='B';
|
|
|
|
$colours_in ='greens';
|
2010-07-04 22:01:13 +00:00
|
|
|
$multiplier = "8";
|
|
|
|
$colours_out = 'blues';
|
|
|
|
|
|
|
|
$nototal = 1;
|
|
|
|
$rra_in = "read";
|
|
|
|
$rra_out = "written";
|
|
|
|
|
2010-07-24 19:14:41 +00:00
|
|
|
include ("includes/graphs/generic_multi_bits_separated.inc.php");
|
2010-07-04 22:01:13 +00:00
|
|
|
|
2011-03-16 21:59:11 +00:00
|
|
|
?>
|