Some node filespace stats

This commit is contained in:
Deon George
2012-12-13 15:46:25 +11:00
parent 1c7c79f89c
commit e7e3e42ba2
6 changed files with 140 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
<table width="100%">
<tr>
<td style="width: 50%; vertical-align: top;"><?php echo View::factory('node/info')->set('o',$o); ?></td>
<td style="width: 50%; vertical-align: top;"><?php echo View::factory('node/session')->set('o',$o); ?></td>
<td style="width: 50%; vertical-align: top;"><?php echo View::factory('node/stats')->set('o',$o); ?></td>
</tr>
<tr>
<td style="width: 50%; vertical-align: top;"><?php echo View::factory('domain/policy')->set('o',$o->DOMAIN); ?></td>

View File

@@ -0,0 +1,25 @@
<!-- $o = ORM::factory('NODE') -->
<table class="box-full">
<tr>
<td class="head" colspan="2">Filespace Stats</td>
</tr>
<tr>
<td class="spacer">&nbsp;</td>
</tr>
<tr>
<td>File Space</td>
<td class="right">Data</td>
<td class="right">Backed Up</td>
<td class="right">Stored</td>
<td class="right">Ratio</td>
</tr>
<?php $i=0; foreach ($o->fs() as $fso) { ?>
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
<td class="data"><?php echo $fso->display('FILESPACE_NAME'); ?></td>
<td class="data-right"><?php echo number_format($fso->utilsation(),0,'',''); ?></td>
<td class="data-right"><?php echo number_format($fso->data_physical(),0,'',''); ?></td>
<td class="data-right"><?php echo number_format($fso->data_logical(),0,'',''); ?></td>
<td class="data-right"><?php echo $fso->utilsation() ? number_format($fso->data_logical()/$fso->utilsation(),2) : 'N/A'; ?></td>
</tr>
<?php } ?>
</table>

View File

@@ -0,0 +1,30 @@
<!-- $o = ORM::factory('NODE') -->
<table class="box-full">
<tr>
<td class="head" colspan="2">Node Stats</td>
</tr>
<tr>
<td class="spacer">&nbsp;</td>
</tr>
<tr>
<td style="width: 40%;">Files Protected</td>
<td style="width: 60%;" class="data"><?php echo $o->file_byptype('PRIMARY'); ?></td>
</tr>
<tr>
<td>Files on Copy Media</td>
<td class="data"><?php echo $o->file_byptype('COPY'); ?> (<?php echo $o->file_mediaprotection(); ?>%)</td<>
</tr>
<tr>
<td>Active Files on the Node</td>
<td class="data"><?php echo $o->file_active(); ?></td<>
</tr>
<tr>
<td>Data on Node</td>
<td class="data"><?php printf('%s/%s (%s%%)',$o->fs_data(),$o->fs_capacity(),$o->fs_utilisation()); ?></td>
</tr>
<tr>
<td>Data in TSM</td>
<td class="data"><?php printf('%s Ratio: %s',$o->fs_logical(),number_format($o->fs_logical()/$o->fs_data(),2)); ?></td>
</tr>
</table>
<?php echo View::factory('node/filespace_stats')->set('o',$o); ?>