Some node filespace stats
This commit is contained in:
@@ -146,6 +146,49 @@ class Model_FILESPACE extends ORM_TSM {
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the physical space that has been given to TSM to store
|
||||
*/
|
||||
public function data_physical() {
|
||||
$result = 0;
|
||||
|
||||
foreach ($this->_occupancy() as $oo) {
|
||||
// Quick Sanity Check
|
||||
if ((int)$oo->PHYSICAL_MB == 0 AND $oo->LOGICAL_MB > $oo->REPORTING_MB)
|
||||
SystemMessage::add(array(
|
||||
'title'=>_('TSM Data Integrity ?'),
|
||||
'body'=>sprintf('While [%s] PHYSICAL_MB is (%s), LOGICAL_MB (%s) > REPORTING_MB(%s) [%s]?',$oo->FILESPACE_NAME,$oo->PHYSICAL_MB,$oo->LOGICAL_MB,$oo->REPORTING_MB,$oo->STGPOOL_NAME),
|
||||
'type'=>'error',
|
||||
));
|
||||
|
||||
elseif ((int)$oo->PHYSICAL_MB > 0 AND $oo->LOGICAL_MB > $oo->PHYSICAL_MB)
|
||||
SystemMessage::add(array(
|
||||
'title'=>_('TSM Data Integrity ?'),
|
||||
'body'=>sprintf('While [%s] PHYSICAL_MB is (%s), LOGICAL_MB (%s) is greater [%s]?',$oo->FILESPACE_NAME,$oo->PHYSICAL_MB,$oo->LOGICAL_MB,$oo->STGPOOL_NAME),
|
||||
'type'=>'error',
|
||||
));
|
||||
|
||||
if ((int)$oo->PHYSICAL_MB > 0)
|
||||
$result += $oo->PHYSICAL_MB;
|
||||
else
|
||||
$result += $oo->REPORTING_MB;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the space that TSM is using to store this data
|
||||
*/
|
||||
public function data_logical() {
|
||||
$result = 0;
|
||||
|
||||
foreach ($this->_occupancy() as $oo)
|
||||
$result += $oo->LOGICAL_MB;
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the LOGICAL_MB that this FILESYSTEM has in a STORAGE POOL
|
||||
* @param $pool is STORAGE POOL NAME
|
||||
|
Reference in New Issue
Block a user