';
printf(_('Device Class | %s | |
'),$devc);
printf('Type | '.
classValue(_('%s %s media is used for this device class.'),'value').
' | |
',
$devclass->access,
$devclass->type);
if (trim($devclass->library)) {
printf('Library | '.
classValue(_('%s library is used to store this media.'),'value').
' | |
',
$devclass->library);
printf(' | '.
classValue(_('%s drives defined in this library.'),'value').
' | |
',
count($drives->getDrives($devclass->library)));
}
if (trim($devclass->dir))
printf('Local Directory | '.
classValue(_('%s directory will contain %s volumes for this device class.'),'value').
' | |
',
$devclass->dir,$devclass->capacity);
echo '
';
echo '';
# Title
echo "\n\n";
printf('%s - %s (%s) | |
',
$stgpool->getName(),$stgpool->type,$stgpool->access);
# Utlisation and Migration details
echo "\n\n";
switch ($stgpool->type) {
case 'PRIMARY' :
switch ($devclass->access) {
case 'Sequential' :
printf(' | '.
classValue(_('%s%% storage capacity utilised with %s%% volumes used.'),
'value').
' | |
',
$stgpool->utilisation,$stgpool->migratable);
break;
case 'Random' :
printf(' | '.
classValue(_('%s%% storage capacity utilised with %s%% migratable data.'),
'value').
' | |
',
$stgpool->utilisation,$stgpool->migratable);
break;
default :
printf('Unknown access strategy %s. | ',$devclass->access);
}
break;
case 'COPY' :
printf(' |
| '.
classValue(_('%s%% storage capacity utilised.'),'value').
' | |
',
$stgpool->utilisation);
break;
default :
printf('%s %s. | ',
_('Unknown pooltype'),$stgpool->type);
}
# Max object size
echo "\n\n";
if ($stgpool->maxsize)
printf(' |
| '.
classValue(_('%3.2fMB Maximum Object Size.'),'value').
' | |
',
$stgpool->maxsize/1024/1024);
if ($stgpool->reclaim)
printf(' | '.
classValue(_('%s%% wasted space is required before reclaimation. Reclamation will use %s'),
'value').
' | |
',
$stgpool->reclaim,($stgpool->reclaimstgp ? $stgpool->reclaimstgp : $stgp));
if ($stgpool->reclaimrunning)
printf(' | '.
_('Reclamation IS currently running.').
' | |
');
if ($stgpool->reuse)
printf(' | '.
classValue(_('%s days must pass before volumes will be reused.'),'value').
' | |
',
$stgpool->reuse);
# Migration details
if ($stgpool->nextstgp)
printf(' | '.
classValue(_('Migration to %s will occur at %s%% (stopping at %s%%)'),'value').
' | |
',
$stgpool->nextstgp,$stgpool->migr['hi'],$stgpool->migr['low']);
if ($stgpool->migr['running'])
printf(' | '.
classValue(_('Migration IS currently running. %sMB Migrated %ss'),'value').
' | |
',
$stgpool->migr['mb'],$stgpool->migr['sec']);
# Collocation Information
if ($stgpool->collocate)
printf(' | '.
classValue(_('%s Collocation.'),'value').
' | |
',
$stgpool->collocate);
# Disk Caching.
if ($stgpool->cache)
printf(' | '.
classValue(_('%s Migration caching.'),'value').
' | |
',
$stgpool->cache);
$stgcount++;
echo ' |
';
# Volume information.
echo "\n\n";
switch ($devclass->type) {
case 'DISK' :
if ($volumes->getStoragePoolVolumes($stgpool->getName()))
foreach ($volumes->getStoragePoolVolumes($stgpool->getName()) as $volume) {
printf(' | '.
classValue(_('Vol %s (%s%% %s) - %s.'),'value').
' | |
',
$volume->getName(),$volume->utilisation,
$volume->status['volume'],
$volume->access);
}
break;
default :
# Scratch Media
$temp = '';
if (count($volumes->getStoragePoolScratchVolumes($stgpool->getName())))
$temp .= sprintf(' | '.
classValue(_('%s scratch media in use (of %s).'),'value').
' | |
',
count($volumes->getStoragePoolScratchVolumes($stgpool->getName())),$stgpool->maxscratch);
if (count($volumes->getStoragePoolDefinedVolumes($stgpool->getName())))
$temp .= sprintf(' | '.
classValue(_('%s defined media in use.'),'value').
' | |
',
count($volumes->getStoragePoolDefinedVolumes($stgpool->getName())));
if ($temp) {
printf('%s |
',
_('Media SCRATCH Status'));
echo $temp;
echo ' |
';
$temp = '';
}
# Media Access
foreach (array('FULL','FILLING','PENDING','EMPTY') as $status) {
if (count($volumes->getStoragePoolVolumesStatus($stgpool->getName(),$status)))
$temp .= sprintf(' | '.
classValue(_('%s media %s.'),'value').
' | |
',
count($volumes->getStoragePoolVolumesStatus($stgpool->getName(),$status)),$status);
}
if ($temp) {
printf('%s |
',
_('Media FILLING Status'));
echo $temp;
echo ' |
';
$temp = '';
}
foreach (array('READWRITE','READONLY','UNAVAILABLE','OFFSITE','DESTROYED') as $status) {
if (count($volumes->getStoragePoolVolumesAccess($stgpool->getName(),$status)))
$temp .= sprintf(' | '.
classValue(_('%s media %s.'),'value').
' | |
',
count($volumes->getStoragePoolVolumesAccess($stgpool->getName(),$status)),$status);
}
if ($temp) {
printf('%s |
',
_('Media ACCESS Status'));
echo $temp;
echo ' |
';
$temp = '';
}
# Utilisation
$stat['count'] = 0;
$stat['util'] = 0;
$stat['reclaim'] = 0;
$stat['cap'] = 0;
foreach ($volumes->getStoragePoolVolumes($stgpool->getName()) as $volume) {
$stat['util'] += $volume->utilisation;
$stat['reclaim'] += $volume->reclaim;
$stat['cap'] += $volume->estcap;
$stat['count']++;
}
if ($stat['count'] > 0) {
printf('%s |
',
_('Media Stats'));
printf(' | '.
classValue(_('%3.2f%% average utilisation.'),'value').
' | |
',
$stat['util']/$stat['count']);
printf(' | '.
classValue(_('%3.2f%% average wasted space.'),'value').
' | |
',
$stat['reclaim']/$stat['count']);
printf(' | '.
classValue(_('%3.0f MB average capacity.'),'value').
' | |
',
$stat['cap']/$stat['count']);
}
break;
}
echo ' |
';
# Nodes with data in this pool
echo "\n\n";
$total = 0;
$nodedata = '';
$counter = 0;
foreach ($occupancy->getStoragePoolTotals($stgpool->getName()) as $node => $typedetails) {
$node = $nodes->getNode($node);
foreach ($typedetails as $type => $details) {
$nodedata .= sprintf('%s | %s | %s %s | %s MB |
',
($counter++%2==0?'even':'odd'),
$node->getName(),$type,
(isset($detail['files']) ? number_format($detail['files']) : ' '),
(count($node->getTapeVolumes($stgpool->getName(),$type)) ? count($node->getTapeVolumes($stgpool->getName(),$type)) : ' '),
isset($details['physical']) ? number_format($details['physical']) : ' ');
$total += $details['physical'];
}
}
if ($nodedata) {
echo ''."\n\n";
echo '';
printf('%s | ',
_('Nodes with data in this storage pool.'));
printf('%s | %s | %s | %s | ',
_('Node'),_('Type'),_('Volumes'),_('MB'));
echo $nodedata;
printf('%s | %s MB | ',
_('Total'),number_format($total));
echo ' '."\n\n";
echo ' | |
';
echo ' |
';
}
echo '