This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
phptsmadmin/htdocs/node.thruput.php
2011-01-14 01:45:19 +11:00

22 lines
987 B
PHP

<?php
// $Header: /cvsroot/phptsmadmin/phpTSMadmin/htdocs/node.thruput.php,v 1.1 2009/04/19 05:27:13 wurley Exp $
# This page should show recent client thruput
# Required Libraries
require './common.php';
$thruput = $app['server']->query("SELECT substr(varchar(END_TIME),1,10) as ADATE,ENTITY,ACTIVITY,cast(float(sum(BYTES))/1024/1024/1024 as dec(8,2)) as GB from SUMMARY where ACTIVITY='BACKUP' and END_TIME>CURRENT_TIMESTAMP-(30)DAY and (ACTIVITY in ('ARCHIVE','BACKUP','RESTORE','RETRIEVE')) group by END_TIME,ENTITY,ACTIVITY order by ADATE desc,ENTITY ",null,false,false);
echo '<table class="result_table">';
printf('<tr class="%s"><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>',
'heading','Date','Node','Type','GB');
$counter = 0;
foreach ($thruput as $details) {
printf('<tr class="%s"><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>',
$counter++%2 ? 'even' : 'odd',
$details['ADATE'],$details['ENTITY'],$details['ACTIVITY'],$details['GB']);
}
echo '</table>';
?>