getFSOccupancy($type)) return null; $blockBody = ''; switch ($type) { case 'Bkup' : $blockBody .= sprintf('', 3+count($node->getStoragePools())); break; case 'Arch' : $blockBody .= sprintf('', 3+count($node->getStoragePools())); break; default: return null; } $blockBody .= ''; $blockBody .= ''; $blockBody .= ''; $blockBody .= ''; # List out the Storage Pools foreach ($node->getStoragePools() as $stgp) $blockBody .= sprintf('',$stgp); $blockBody .= ''; $counter = 0; foreach ($node->getFSOccupancy($type) as $fs => $object) { $blockBody .= sprintf('',($counter++%2==0?'even':'odd')); $blockBody .= sprintf('', trim($object->type) ? $object->type : 'Unknown File System',$object->getName()); $blockBody .= sprintf('', isset($object->backup['start']) ? tsmdate($object->backup['start'],'nomsec') : 'NO START', isset($object->backup['end']) ? tsmdate($object->backup['end'],'nomsec') : 'NO END', isset($object->backup['end']) ? tsmdate($object->backup['end'],'notime') : 'NO DATE', $object->getName()); $blockBody .= sprintf('', isset($object->capacity) ? number_format($object->capacity) : '?', isset($object->util) ? $object->util : '?', number_format($object->capacity*$object->util/100)); foreach ($node->getStoragePools() as $stgp) { if (isset($object->occupancy[$type][$stgp])) $blockBody .= sprintf('', number_format($object->occupancy[$type][$stgp]['num'],0), number_format($object->occupancy[$type][$stgp]['physical'],2), count($object->getVolumeUsage($stgp)) ? sprintf(' (%s)',count($object->getVolumeUsage($stgp))) : ''); else $blockBody .= ''; } $blockBody .= ''; } $blockBody .= '
Backup Space Utilisation
Archive Space Utilisation
File SystemLast BackupLast Size%s
%s%s %s MB%s%s 
'; $blockBody .= "\n\n"; return $blockBody; } /** * This function returns an HTML table of the VOLUMES used by a $node of $type */ function showVols($node,$type='Bkup') { if (! $node->getVolumes($type)) return null; $blockBody = ''; switch ($type) { case 'Bkup' : $blockBody .= sprintf(''); break; case 'Arch' : $blockBody .= sprintf(''); break; default: return null; } $blockBody .= ''; $blockBody .= ''; $blockBody .= ''; $blockBody .= ''; $blockBody .= ''; $last['stg'] = ''; $last['fs'] = ''; $counter = 0; foreach ($node->getVolumes($type) as $fs => $object) { foreach ($object->volume[$type] as $stgp => $volumes) { foreach ($volumes as $vol => $volume) { $blockBody .= sprintf('', ($counter%2==0?'even':'odd'), $object->getName() == $last['fs'] ? '' : $object->getName(), $stgp == $last['stg'] ? '' : $stgp, sprintf('%s (%s/%s%s)',$vol, $volume->status['volume'],$volume->access, trim($volume->location) ? '-'.$volume->location : '')); $last['stg'] = $stgp; $last['fs'] = $object->getName(); } $counter++; } } $blockBody .= '
Backup Volume Utilisation
Archive Volume Utilisation
File SystemStorage PoolVolume
%s%s%s
'; $blockBody .= "\n\n"; return $blockBody; } /** * This function returns an HTML table of the VOLUMES by PRIMARY/COPY used by a $node of $type */ function showAllvols($node,$type='Bkup') { if (! $node->getVolumes($type)) return null; $blockBody = ''; switch ($type) { case 'Bkup' : $blockBody .= sprintf(''); break; case 'Arch' : $blockBody .= sprintf(''); break; default: return null; } $counter = 0; foreach ($node->getPrimaryVolumes($type) as $volumename => $volume) { $blockBody .= sprintf('', ($counter%2==0?'even':'odd'), ! $counter ? 'Primary' : ' ', sprintf('%s (%s/%s%s)',$volume->getName(), $volume->status['volume'],$volume->access, trim($volume->location) ? '-'.$volume->location : '')); $counter++; } $counter = 0; foreach ($node->getCopyVolumes($type) as $volumename => $volume) { $blockBody .= sprintf('', ($counter%2==0?'even':'odd'), ! $counter ? 'Copy' : ' ', sprintf('%s (%s/%s%s)',$volume->getName(), $volume->status['volume'],$volume->access, trim($volume->location) ? '-'.$volume->location : '')); $counter++; } $blockBody .= '
Backup Volume Utilisation
Archive Volume Utilisation
%s%s
%s%s
'; $blockBody .= "\n\n"; return $blockBody; } # Defaults $nodes = objectCache('nodes'); $mgmtclass = objectCache('mgmtclasses'); # List of Clients. printf(_('Select NODE on %s'),$app['server']->getValue('server','name')); echo '
'; printf('',get_request('cmd','REQUEST')); printf('',$app['server']->getIndex()); echo ''; echo ''; echo '
'; echo "\n"; if (isset($_REQUEST['NODE'])) { echo '
'; echo ''; printf('', $_REQUEST['NODE'],$app['server']->getValue('server','name')); $node = $nodes->nodes[$_REQUEST['NODE']]; if ($node->url) printf('', $node->url,$node->hostname); else printf('',$node->hostname ? $node->hostname : ' '); printf('',$node->contact ? $node->contact : ' '); printf('', $node->os,$node->level['os']); printf('', $node->level['tsm_ver'],$node->level['tsm_rel'],$node->level['tsm_lvl'],$node->level['tsm_slv']); echo ''; printf('', tsmDate($node->time['registered'],'nosec')); printf('', tsmDate($node->time['lastacc'],'nosec'), (time()-strtotime(tsmDate($node->time['lastacc'],'nosec')))/86400); printf('', tsmDate($node->time['pwset'],'nosec'), (time()-strtotime(tsmDate($node->time['pwset'],'nosec')))/86400); printf('', tsmDate($node->passwd['expiry'],'nosec') ? tsmDate($node->passwd['expiry'],'nosec') : ' '); printf('', $node->passwd['invalid'], $node->locked ? 'LOCKED' : 'NOT Locked'); echo ''; printf('',$node->cloptset ? $node->cloptset : ' '); printf('', $node->compression ? 'YES' : 'NO'); printf('',$node->txngroupmax ? $node->txngroupmax : ' '); printf('', $node->delete['arch'] ? 'YES' : 'NO'); printf('', $node->delete['back'] ? 'YES' : 'NO'); printf('', $node->mp['keep'] ? 'YES' : 'NO',$node->mp['max']); echo ''; printf('',$node->group ? $node->group : _('Not Set')); echo ''; printf('',$node->domain); # Show the MGMTClasses that apply to this node. printf(''); foreach ($mgmtclass->getMgmtClasses($node->domain,'Bkup') as $object) { if (is_object($object)) printf('', $object->version['EXISTS'],$object->retain['EXTRA'],$object->version['DELETED'],$object->retain['ONLY'],$object->frequency,$object->getName(), $object->isDefaultMgmtClass() ? ' (Default)' : '', $object->getStoragePool() ? $object->getStoragePool()->getName() : sprintf('(%s)',_('Storage Pool Doesnt Exist'))); } printf(''); foreach ($mgmtclass->getMgmtClasses($node->domain,'Arch') as $object) { if (is_object($object)) printf('', $object->retain['DAYS'],$object->getName(), $object->isDefaultMgmtClass() ? ' (Default)' : '', $object->getStoragePool() ? $object->getStoragePool()->getName() : sprintf('(%s)',_('Storage Pool Doesnt Exist'))); } echo ''; if ($node->getFileSystems()) { printf('',showFSDetails($node,'Bkup')); echo ''; printf('',showFSDetails($node,'Arch')); } else { echo ''; } if (count($node->getVolumeUsage())) { echo ''; printf('',showAllVols($node,'Bkup')); echo ''; printf('',showAllVols($node,'Arch')); echo ''; printf('',showVols($node,'Bkup')); echo ''; printf('',showVols($node,'Arch')); } echo '

NODE detail for %s on %s

System Name%s
System Name%s
Contact%s
OS%s (%s)
TSM Client Version%s.%s.%s.%s

Access Information

Registered%s
Last Accessed%s (%2.0f days ago)
Last Password Change%s (%2.0f days ago)
Password Expiry%s
Invalid Password Count%s (%s)

Configuration Options

Option Set%s
Compression %s
TXN Group Max%s
Can Delete Archives%s
Can Delete Backups%s
Keep Mount Points%s (%s)

Storage Configuration

Colloc Group Name%s
 
Backup Domain%s
 Available Backup Management Classes
 %s%sStorage Pool: %s
 Available Archive Management Classes
 %s%sStorage Pool: %s

Storage Utilisation

%s
 
%s
TSM does not have any data for this host.

Volume Utilisation

%s
 
%s

Volume Utilisation by File System

%s
 
%s
'; } ?>