diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 34cefb4..0000000 --- a/INSTALL +++ /dev/null @@ -1,70 +0,0 @@ -$Header: /cvsroot/phptsmadmin/phpTSMadmin/INSTALL,v 1.5 2008/01/15 10:50:41 wurley Exp $ - -* Requirements - - phpTSMadmin is a PHP5 application. It wont work on PHP4. If you are using CentOS 4 or RedHat - Enterprise Linux v4, then you can get PHP5 from the centosplus repository. - - The requirements below are those used by RedHat Enterprise Linux v5.0 system. It is quite - possible that other versions of these components, or other distributions of Linux will also - work as well. - - If you encounter any problems with other versions, then drop us an email with - the error messages, what you did and what you expected, and if we need to make some code changes - to get it to work, then we'll take a look. - - * Apache 2.0.x - * PHP 5.1.x - * TSM Client 5.x (our tests were done on a 5.4.1 TSM server). - -* Additional Requirements that are optional. - - We also use a fantastic tool called JpGraph, that takes care of the Gantt charts. It is recommended that - you download and install that tool. You can get JpGraph at: - - http://www.aditus.nu/jpgraph - - You'll need at least v2.x our testing was with 2.3. - - Once downloaded, untar jpgraph in the libs directory, then update your config.php to reflect the path. - -* Installation - - These steps assume that you have installed, configured and running: - * Linux server, - * Apache installed, configured and running, - * PHP installed, configured if necessary and running with apache, - * TSM client installed, configured and working. - * JpGraph (if you choose to use it - which you should). - - 1. Download the latest version. - You can download phpTSMadmin from sourceforge. http://phpTSMadmin.sf.net - - 2. Unpack the tar files in an appropriate directory. - cd /var/www/phpTSMadmin (or any other directory that you choose) - tar xzf phpTSMadmin-XXXX.tgz - - 3. Configure your webserver. - Find the sample apache config file in the contrib directory. Place that in - your /etc/httpd/conf.d directory. - - Edit the sample apache config file as appropriate and restart your web server. - - Also make sure that in your php.ini configuration file, you have set "memory_limit" to - at leat 16M. If this is set too low, then your grantt charts will fail to be created - and your apache error log will have "Allowed memory size of X bytes exhausted" error - messages. - - 4. Copy config.php.example in the config directory to config/config.php and edit to - suite your environment. - Edit the phpTSMadmin's config.php file, making sure you define: - * TSM client configuration - * Jpgraph path - - 5. Make the following directories. - mkdir htdocs/tmp; chmod 777 htdocs/tmp - - 6. Then, point your browser to your phpTSMadmin URL. - -* For help - Drop me an email phptsmadmin-devel@lists.sourceforge.net. diff --git a/application/classes/Controller/Db.php b/application/classes/Controller/Db.php new file mode 100644 index 0000000..129c16f --- /dev/null +++ b/application/classes/Controller/Db.php @@ -0,0 +1,22 @@ +_('Database Information'), + 'body'=>View::factory(sprintf('%s/detail',strtolower($this->request->controller())))->set('o',ORM::factory('DB','TSMDB1')), + )); + } +} +?> diff --git a/application/classes/Controller/Tree.php b/application/classes/Controller/Tree.php index 0da023f..a892df2 100644 --- a/application/classes/Controller/Tree.php +++ b/application/classes/Controller/Tree.php @@ -31,6 +31,14 @@ class Controller_Tree extends lnApp_Controller_Tree { 'attr_href'=>URL::Site('domain'), )); + array_push($data,array( + 'id'=>'db', + 'name'=>'DB Info', + 'state'=>'none', + 'attr_id'=>'1', + 'attr_href'=>URL::Site('db'), + )); + array_push($data,array( 'id'=>'library', 'name'=>'Library Info', diff --git a/application/classes/Model/DB.php b/application/classes/Model/DB.php new file mode 100644 index 0000000..0e5a412 --- /dev/null +++ b/application/classes/Model/DB.php @@ -0,0 +1,60 @@ +'ASC', + ); + + protected $_display_filters = array( + 'FREE_PAGES'=>array( + array('number_format',array(':value',0)), + ), + 'FREE_SPACE_MB'=>array( + array('number_format',array(':value',0)), + ), + 'LAST_REORG'=>array( + array('TSM_ORM::date',array(':value','d-M H:i')), + ), + 'LAST_BACKUP_DATE'=>array( + array('TSM_ORM::date',array(':value','d-M H:i')), + ), + 'TOTAL_BUFF_REQ'=>array( + array('number_format',array(':value',0)), + ), + 'TOT_FILE_SYSTEM_MB'=>array( + array('number_format',array(':value',0)), + ), + 'TOTAL_PAGES'=>array( + array('number_format',array(':value',0)), + ), + 'USED_DB_SPACE_MB'=>array( + array('number_format',array(':value',0)), + ), + 'USABLE_PAGES'=>array( + array('number_format',array(':value',0)), + ), + 'USED_PAGES'=>array( + array('number_format',array(':value',0)), + ), + ); + + public function backups() { + return ORM::factory('VOLHISTORY')->where('TYPE','IN',Kohana::$config->load('config')->tsmdbtypes)->find_all(); + } + + public function vols() { + return ORM::factory('DBSPACE')->find_all(); + } +} +?> diff --git a/application/classes/Model/DBSPACE.php b/application/classes/Model/DBSPACE.php new file mode 100644 index 0000000..e2ae772 --- /dev/null +++ b/application/classes/Model/DBSPACE.php @@ -0,0 +1,31 @@ +'ASC', + ); + + protected $_display_filters = array( + 'FREE_SPACE_MB'=>array( + array('number_format',array(':value',0)), + ), + 'TOTAL_FS_SIZE_MB'=>array( + array('number_format',array(':value',0)), + ), + 'USED_FS_SIZE_MB'=>array( + array('number_format',array(':value',0)), + ), + ); +} +?> diff --git a/application/views/db/backups.php b/application/views/db/backups.php new file mode 100644 index 0000000..e7f3ed3 --- /dev/null +++ b/application/views/db/backups.php @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + backups() as $vo) { ?> + + + + + + + + + +
Database Backup Volumes
 
DateSeqTypeDeviceVolumeLocation
display('DATE_TIME'); ?>backupid(); ?>display('TYPE'); ?>display('DEVCLASS'); ?>display('VOLUME_NAME'); ?>display('LOCATION'); ?>
diff --git a/application/views/db/detail.php b/application/views/db/detail.php new file mode 100644 index 0000000..b8fe9bb --- /dev/null +++ b/application/views/db/detail.php @@ -0,0 +1,9 @@ + + + + + + + + +
set('o',$o); ?>set('o',$o); ?>
set('o',$o); ?>
diff --git a/application/views/db/info.php b/application/views/db/info.php new file mode 100644 index 0000000..78d1ff4 --- /dev/null +++ b/application/views/db/info.php @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Database Information
 
Database Namedisplay('DATABASE_NAME'); ?>
Spacedisplay('FREE_SPACE_MB'),$o->display('USED_DB_SPACE_MB'),$o->display('TOT_FILE_SYSTEM_MB')); ?>
Database Pagesdisplay('FREE_PAGES'),$o->display('USED_PAGES'),$o->display('TOTAL_PAGES'),$o->display('USABLE_PAGES')); ?>
Bufferdisplay('BUFF_HIT_RATIO'),$o->display('TOTAL_BUFF_REQ')); ?>
Last Reorgdisplay('LAST_REORG'); ?>
Last Backupdisplay('LAST_BACKUP_DATE'); ?>
Backup Streamsdisplay('NUM_BACKUP_STREAMS'); ?>
Backup Device Classdisplay('FULL_DEV_CLASS'); ?>
diff --git a/application/views/db/volumes.php b/application/views/db/volumes.php new file mode 100644 index 0000000..e571942 --- /dev/null +++ b/application/views/db/volumes.php @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + vols() as $vo) { ?> + + + + + + + +
Database Volumes
 
LocationFree SpaceUsed SpaceTotal Space
display('LOCATION'); ?>display('FREE_SPACE_MB'); ?>display('USED_FS_SIZE_MB'); ?>display('TOTAL_FS_SIZE_MB'); ?>
diff --git a/contrib/http.phpTSMadmin.conf b/contrib/http.phpTSMadmin.conf deleted file mode 100755 index 6303f4d..0000000 --- a/contrib/http.phpTSMadmin.conf +++ /dev/null @@ -1,12 +0,0 @@ -# phpTSMadmin - - AllowOverride AuthConfig Limit - - - - ServerName phptsmadmin.mydomain.net - DocumentRoot /var/www/phpTSMadmin - - ErrorLog /var/log/httpd/phptsmadmin.mydomain.net-error_log - TransferLog /var/log/httpd/phptsmadmin.mydomain.net-access_log - diff --git a/docs/CREDITS b/docs/CREDITS deleted file mode 100644 index 2f481fb..0000000 --- a/docs/CREDITS +++ /dev/null @@ -1,15 +0,0 @@ -$Header: /cvsroot/phptsmadmin/phpTSMadmin/docs/CREDITS,v 1.2 2004/10/03 05:35:28 wurley Exp $ - ----------------------------- -| phpTSMadmin contributors | -============================ - -Developers: - * Deon George (wurley@users.sf.net) - -Other OS software: - * This script uses the template class from phplib - all credit to those developers. - For more information on phplib, check out their website http://phplib.shonline.de - * JPGraph is used to draw the gantt charts, you'll need to get it from http://www.aditus.nu/jpgraph/ - -If you would like to assist, contribute, develop, help then drop me an email. diff --git a/htdocs/help.php b/htdocs/help.php deleted file mode 100644 index 412f571..0000000 --- a/htdocs/help.php +++ /dev/null @@ -1,70 +0,0 @@ -getValue('server','name')); - -$blockBody['help'] = '
'; -$blockBody['help'] .= sprintf('',get_request('cmd','REQUEST')); -$blockBody['help'] .= ''; - -$blockBody['help'] .= ''; -$blockBody['help'] .= ''; -$blockBody['help'] .= ''; -$blockBody['help'] .= ''; -$blockBody['help'] .= ''; -$blockBody['help'] .= '
'; -$blockBody['help'] .= sprintf('',$app['server']->getIndex()); -$blockBody['help'] .= ''; -$blockBody['help'] .= ' 
'; -$blockBody['help'] .= '
'; - -if (isset($form['command'])) { - $helpCommand = $help->getCommand($form['command']); - - if (get_request('raw','REQUEST')) { - $blockBody['help'] .= '
'.implode('
',$helpCommand->raw).'
'; - - } else { - $blockBody['help'] .= '
'; - $blockBody['help'] .= ''; - - $blockBody['help'] .= sprintf('',$helpCommand->getTitle()); - $blockBody['help'] .= sprintf('',$helpCommand->getDescription()); - - $blockBody['help'] .= sprintf('',_('Privileges Required')); - $blockBody['help'] .= sprintf('',$helpCommand->getClass()); - - $blockBody['help'] .= sprintf('',_('Syntax')); - $blockBody['help'] .= sprintf('',$helpCommand->getSyntax()); - - $blockBody['help'] .= sprintf('',_('Parameters')); - $blockBody['help'] .= sprintf('',$helpCommand->getParameters()); - - $blockBody['help'] .= ''; - $blockBody['help'] .= sprintf('',_('Related Commands')); - $blockBody['help'] .= sprintf('',$helpCommand->getRelated()); - - $blockBody['help'] .= '

%s

%s
%s
%s
%s
%s
%s
%s
 
%s
%s
'; - } -} - -# End -render_page($blockTitle,$blockBody); -?> diff --git a/htdocs/image.backupevents.php b/htdocs/image.backupevents.php deleted file mode 100644 index a214b09..0000000 --- a/htdocs/image.backupevents.php +++ /dev/null @@ -1,57 +0,0 @@ - $details) { - foreach ($_SESSION['graph']['backupevent']['legend'] as $key => $count) { - @$_SESSION['graph']['backupevent']['data'][$sched][$key] += 0; - } - ksort($_SESSION['graph']['backupevent']['data'][$sched]); -} - -$graph_row = 2; -$xcounter = 1; -$ycounter = 1; -$numrows = round(count($_SESSION['graph']['backupevent']['data'])/$graph_row); - -$graph = new PieGraph(500,30+180*$numrows,'auto'); - -foreach ($_SESSION['graph']['backupevent']['data'] as $sched => $details) { - ksort($details); - - $newsched = preg_replace('/-/','_',$sched); - $$newsched = new PiePlot(array_values($details)); - $$newsched->SetCenter(120+(($xcounter%$graph_row)*160),120+(($ycounter-1)*180)); - $$newsched->SetGuideLines(false,false); - $$newsched->SetGuideLinesAdjust(1.0); - $$newsched->SetSize(60); - $$newsched->SetTheme('sand'); - $$newsched->value->SetFormat('%2.1f%%'); - $$newsched->title->Set($sched); - $$newsched->title->SetMargin(10); - - if ($xcounter == 1) - $$newsched->SetLegends(array_keys($details)); - - $graph->Add($$newsched); - if (! ($xcounter%$graph_row)) - $ycounter++; - - $xcounter++; -} - -$graph->legend->SetFillColor('azure'); -$graph->SetMarginColor('azure2'); -$graph->title->Set(sprintf('Schedule Backup Status for %s',$app['server']->GetStatusDetail('SERVER_NAME'))); - -# Display the chart -unset($_SESSION['graph']['backupevent']); -$graph->Stroke(); -?> diff --git a/htdocs/image.dbbackuphistory.php b/htdocs/image.dbbackuphistory.php deleted file mode 100644 index 3f8008e..0000000 --- a/htdocs/image.dbbackuphistory.php +++ /dev/null @@ -1,83 +0,0 @@ -GetDBBackupDetail('history'); -if (! $history) - exit; - -$graph = new Graph(400,200,'auto'); -$graph->SetScale('textlin'); - -$fulldata = array(); -$incrdata = array(); -$xtitles = array(); - -foreach ($app['server']->GetDBBackupDetail('history') as $index => $backupdetails) { - switch ($backupdetails['type']) { - case 'FULL' : - $fulldata[] = $backupdetails['size']; - $incrdata[] = 0; - break; - - case 'INCR' : - $fulldata[] = 0; - $incrdata[] = $backupdetails['size']; - break; - } - $xtitles[] = preg_replace('/ /',"\n",tsmDate($backupdetails['date'],'daytime')); - $maxdata[] = $app['server']->GetDBDetail('USABLE_PAGES'); - $curdata[] = $app['server']->GetDBDetail('USED_PAGES'); -} - -$cplot = new LinePlot($maxdata); -$cplot->SetLegend('Max DB Size'); -$cplot->SetColor('red'); -$cplot->SetWeight(2); -if (count($maxdata) == 1) - $cplot->mark->SetType(MARK_IMG_MBALL,'red',0.5); -$graph->Add($cplot); - -$dplot = new LinePlot($curdata); -$dplot->SetLegend('Cur Size'); -$dplot->SetColor('lightred'); -$dplot->SetWeight(2); -$graph->Add($dplot); - -$aplot = new BarPlot($fulldata); -$aplot->SetLegend('Full'); -$aplot->SetFillColor('blue'); -$aplot->value->Show(); -$aplot->value->SetFormat('%5.0f'); -$graph->Add($aplot); - -$bplot = new BarPlot($incrdata); -$bplot->SetLegend('Incremental'); -$bplot->SetFillColor('lightblue'); -$bplot->value->Show(); -$bplot->value->SetFormat('%5.0f'); -$graph->Add($bplot); - -$graph->img->SetMargin(60,110,20,40); -$graph->legend->Pos(0.01,0.80,'right','center'); -$graph->legend->SetFillColor('azure'); -$graph->xaxis->SetTickLabels($xtitles); -$graph->xaxis->SetLabelAngle(90); -$graph->xgrid->Show(true); -$graph->yaxis->title->Set('Database Pages \'000s'); -$graph->yaxis->SetLabelFormatCallback('labelformat'); -$graph->yaxis->SetTitleMargin(45); -$graph->SetMarginColor('azure2'); -$graph->title->Set(sprintf('Database Backups %s',$app['server']->GetStatusDetail('SERVER_NAME'))); - -# Display the Gantt chart -$graph->Stroke(); - -function labelformat($label) { - return number_format($label/1000); -} - -?> diff --git a/htdocs/server.db.php b/htdocs/server.db.php deleted file mode 100644 index b99f4ae..0000000 --- a/htdocs/server.db.php +++ /dev/null @@ -1,145 +0,0 @@ -GetStatusDetail('SERVER_NAME'), - $app['server']->GetStatusDetail('PLATFORM'), - $app['server']->GetStatusDetail('VERSION'), - $app['server']->GetStatusDetail('RELEASE'), - $app['server']->GetStatusDetail('LEVEL'), - $app['server']->GetStatusDetail('SUBLEVEL')); - -$blockBody['db'] = ''; - -$blockBody['db'] .= sprintf('',_('Database Summary')); -$blockBody['db'] .= ''; - -# Show our dbbackup graph -$blockBody['db'] .= sprintf('', - $app['server']->getIndex()); -$blockBody['db'] .= '
%s
'; - -$blockBody['db'] .= sprintf('', - $app['server']->GetDBDetail('PHYSICAL_VOLUMES'),$app['server']->GetDBDetail('AVAIL_SPACE_MB'), - $app['server']->GetDBDetail('PCT_UTILIZED')); - -foreach ($app['server']->GetDBDetail('dbvols') as $key) { - $blockBody['db'] .= sprintf('', - $key['COPY1_NAME'],$key['AVAIL_SPACE_MB'],$key['FREE_SPACE_MB'],$key['COPY1_STATUS']); - - if ($key['COPY2_NAME']) - $blockBody['db'] .= sprintf('', - $key['COPY2_NAME'],$key['COPY2_STATUS']); - - if ($key['COPY3_NAME']) - $blockBody['db'] .= sprintf('', - $key['COPY3_NAME'],$key['COPY3_STATUS']); -} - -$blockBody['db'] .= ''; - -$blockBody['db'] .= sprintf('', - $app['server']->GetLogDetail('PHYSICAL_VOLUMES'),$app['server']->GetLogDetail('AVAIL_SPACE_MB'), - $app['server']->GetLogDetail('PCT_UTILIZED')); - -foreach ($app['server']->GetLogDetail('logvols') as $key) { - $blockBody['db'] .= sprintf('', - $key['COPY1_NAME'],$key['AVAIL_SPACE_MB'],$key['FREE_SPACE_MB'],$key['COPY1_STATUS']); - - if ($key['COPY2_NAME']) - $blockBody['db'] .= sprintf('', - $key['COPY2_NAME'],$key['COPY2_STATUS']); - - if ($key['COPY3_NAME']) - $blockBody['db'] .= sprintf('', - $key['COPY3_NAME'],$key['COPY3_STATUS']); -} -$blockBody['db'] .= ''; - -$blockBody['db'] .= sprintf('', - $app['server']->GetStatusDetail('LOGMODE')); -$blockBody['db'] .= ''; - - -$blockBody['db'] .= sprintf('', - $app['server']->GetDBDetail('CACHE_HIT_PCT'),$app['server']->GetDBDetail('CACHE_WAIT_PCT')); - -if ($trigger = $app['server']->GetDBBackupDetail('trigger')) { - $blockBody['db'] .= ''; - - $blockBody['db'] .= sprintf('', - sprintf('%s',$app['server']->getIndex(),$trigger['INCRDEVCLASS'],$trigger['INCRDEVCLASS']), - $trigger['LOGFULLPCT']); - $blockBody['db'] .= sprintf('', - $trigger['NUMICREMENTAL'], - sprintf('%s',$app['server']->getIndex(),$trigger['DEVCLASS'],$trigger['DEVCLASS'])); -} - -$blockBody['db'] .= '
'.classValue(_('%s DB volumes totaling %sMB (%s%% utilsed).'),'value').'
 '.classValue(_('%s (%sMB) (%sMB Free) (%s).'),'value').'
 '.classValue(_('%s (%s).'),'value').'
 '.classValue(_('%s (%s).'),'value').'
 
'.classValue(_('%s LOG volumes totaling %sMB (%s%% utilsed).'),'value').'
 '.classValue(_('%s (%sMB) (%sMB Free) (%s).'),'value').'
 '.classValue(_('%s (%s).'),'value').'
 '.classValue(_('%s (%s).'),'value').'
 
'.classValue(_('Database REDO log mode %s.'),'value').'
 
'.classValue(_('%s%% database cache hit rate (%s%% cache wait).'),'value').'
 
'.classValue(_('TSM will automatically backup the database to %s when the logs reach %s%% full.'),'value').'
'.classValue(_('After %s INCREMENTAL backups, a full backup will be performed to %s.'),'value').'
'; - -# Database Backup Information -$blockTitle['backup'] = sprintf(_('Database backup information for %s'),$app['server']->getValue('server','name')); -$blockBody['backup'] = ''; - -if ($app['server']->GetDBDetail('LAST_BACKUP_DATE')) { - $blockBody['backup'] .= sprintf('', - $app['server']->GetDBDetail('BACKUP_CHG_MB'),$app['server']->GetDBDetail('BACKUP_CHG_PCT'), - tsmDate($app['server']->GetDBDetail('LAST_BACKUP_DATE'))); - - $blockBody['backup'] .= ''; - - ## Show DB Vols - $blockBody['backup'] .= sprintf('', - tsmDate($app['server']->GetDBBackupDetail('count'),'nosec'), - tsmDate($app['server']->GetDBBackupDetail('first'),'nosec'), - tsmDate($app['server']->GetDBBackupDetail('last'),'nosec')); - - $blockBody['backup'] .= sprintf('', - 'SEQ #','DATE','TYPE','DEVICE','VOLUME','LOCATION','STATUS'); - - $counter = 0; - $lastseries = 0; - foreach ($app['server']->GetDBBackupDetail('vols') as $volname => $voldetails) { - if (! is_array($voldetails)) - continue; - - if ($lastseries != $voldetails['BACKUP_SERIES']) { - $lastseries = $voldetails['BACKUP_SERIES']; - $counter ++; - } - - $blockBody['backup'] .= sprintf('', - ($voldetails['STATUS'] == 'InValid' ? 'class="shadow"' : ($counter%2==0?'class="even"':'class="odd"')), - sprintf('%s-%s-%s',$voldetails['BACKUP_SERIES'],$voldetails['BACKUP_OPERATION'],$voldetails['VOLUME_SEQ']), - tsmDate($voldetails['DATE_TIME'],'nosec'), - tsmBackupType($voldetails['TYPE']), - $voldetails['DEVCLASS'], - $volname, - $app['server']->GetVolLocation($volname), - $voldetails['STATUS']); - } - - $blockBody['backup'] .= ''; - -} else { - $blockBody['backup'] .= sprintf('',_('It looks like you have NOT yet run a TSM backup.')); -} - - -if ($app['server']->GetDBDetail('BACKUP_RUNNING') == 'YES') - $blockBody['backup'] .= sprintf('',_('Database backup IS currently running.')); -else - $blockBody['backup'] .= sprintf('',_('Database backup is NOT currently running.')); - -$blockBody['backup'] .= ''; -$blockBody['backup'] .= '
'.classValue(_('%sMB (%s%%) has changed since the last backup on %s'),'value').'
 
'.classValue(_('%s backups between %s and %s available for TSM DB restore.'),'value').'
 %s%s%s%s%s%s%s
 %s%s%s%s%s%s%s
 
%s
%s
%s
 
'; - -# End -render_page($blockTitle,$blockBody); -?> diff --git a/htdocs/volume.inventory.php b/htdocs/volume.inventory.php deleted file mode 100644 index c536e20..0000000 --- a/htdocs/volume.inventory.php +++ /dev/null @@ -1,95 +0,0 @@ -'; -$blockBody['innotci'] .= 'LibrarySlotBarcode/Vol NameUsageStatus/AccessLibrary AccessUtilisationReclaimLast ReadLast Write'; - -$blockBody['innotci'] .= sprintf('%s',_('The following volumes are in a library, but NOT checked in.')); -$counter = 0; -foreach ($libraries->libVolumes(false) as $library => $volumes) { - foreach ($volumes as $element => $volume) { - $blockBody['innotci'] .= sprintf('%s%s%s%s%s/%s%s%s%%%s%%%s%s', - $counter++%2 ? 'even' : 'odd', - isset($volume->lib['name']) ? $volume->lib['name'] : 'Unknown LIB', - isset($volume->location) ? $volume->location : $volume->lib['slot'], - $volume->name, - $volume->stgpool, - $volume->status['volume'], - $volume->access, - isset($volume->lib['access']) ? $volume->lib['access'] : 'N/A', - $volume->utilisation, - $volume->reclaim, - tsmDate($volume->last['read'],'notime'),tsmDate($volume->last['write'],'notime')); - } -} -$blockBody['innotci'] .= ' '; - -# The following PRIMARY VOLUMES not in the library. -$blockBody['innotci'] .= sprintf('%s',_('The following PRIMARY pool volumes are NOT checked in a library.')); -$counter = 0; -foreach ($libvolumes->primaryNotInLib() as $volume) { - $blockBody['innotci'] .= sprintf('%s%s%s%s%s/%s%s%s%%%s%%%s%s', - $counter++%2 ? 'even' : 'odd', - 'N/A', - isset($volume->location) ? $volume->location : 'InLIB', - $volume->getName(), - $volume->stgpool, - $volume->status['volume'], - $volume->access, - 'N/A', - $volume->utilisation, - $volume->reclaim, - tsmDate($volume->last['read'],'notime'),tsmDate($volume->last['write'],'notime')); -} -$blockBody['innotci'] .= ' '; - -# The following COPY VOLUMES in the library can be checked out. -$blockBody['innotci'] .= sprintf('%s',_('The following COPY pool volumes can be checked out of the library(s).')); -$counter = 0; -foreach ($libvolumes->libCopyVolumes(true) as $volume) { - $blockBody['innotci'] .= sprintf('%s%s%s%s%s/%s%s%s%%%s%%%s%s', - $counter++%2 ? 'even' : 'odd', - $volume->lib['name'], - isset($volume->location) ? $volume->location : 'InLIB', - $volume->getName(), - $volume->stgpool, - $volume->status['volume'], - $volume->access, - 'N/A', - $volume->utilisation, - $volume->reclaim, - tsmDate($volume->last['read'],'notime'),tsmDate($volume->last['write'],'notime')); -} -$blockBody['innotci'] .= ' '; - -# The following PRIMARY VOLUMES not in the library. -$blockBody['innotci'] .= sprintf('%s',_('The following COPY pool volumes are not checked in a library.')); -$counter = 0; -foreach ($libvolumes->libCopyVolumes(false) as $volume) { - $blockBody['innotci'] .= sprintf('%s%s%s%s%s/%s%s%s%%%s%%%s%s', - $counter++%2 ? 'even' : 'odd', - 'N/A', - isset($volume->location) ? $volume->location : 'InLIB', - $volume->getName(), - $volume->stgpool, - $volume->status['volume'], - $volume->access, - 'N/A', - $volume->utilisation, - $volume->reclaim, - tsmDate($volume->last['read'],'notime'),tsmDate($volume->last['write'],'notime')); -} -$blockBody['innotci'] .= ''; - -# End -render_page($blockTitle,$blockBody); -?> diff --git a/lib/config_custom.php b/lib/config_custom.php index 6a705a0..12f7645 100644 --- a/lib/config_custom.php +++ b/lib/config_custom.php @@ -10,14 +10,6 @@ /** Available Commands */ -$config->configDefinition('command','libraryinfo',array( - 'summary'=>'Library Info', - 'desc'=>'Information on Automated Tape Libraries.', - 'default'=>'redir&page=library')); -$config->configDefinition('command','nodedetail',array( - 'summary'=>'Node Detail', - 'desc'=>'Detail of Node Storage Usage.', - 'default'=>'redir&page=node')); $config->configDefinition('command','nodeoccupancy',array( 'summary'=>'Node Occupancy', 'desc'=>'Summary of Node Occupancy.', @@ -26,23 +18,10 @@ $config->configDefinition('command','schedulegantt',array( 'summary'=>'Schedule Gantt', 'desc'=>'Gantt view of todays schedules.', 'default'=>'schedule.gantt')); -$config->configDefinition('command','summarygantt',array( - 'summary'=>'Activity Summary Gantt', - 'desc'=>'Gantt view of todays activities.', - 'default'=>'redir&page=server/gantt')); -$config->configDefinition('command','serverdb',array( - 'summary'=>'Server DB Information', - 'desc'=>'Database Information for TSM Server.', - 'default'=>'server.db')); $config->configDefinition('command','serverstats',array( 'summary'=>'Server Stats', 'desc'=>'TSM Server Performance Stats.', 'default'=>'server.stats')); -$config->configDefinition('command','volumeinventory',array( - 'summary'=>'Volume Inventory', - 'desc'=>'Information on Volumes.', - 'default'=>'volume.inventory')); - $config->configDefinition('lib','jpgraph',array( 'desc'=>'Path to JPGraph', 'default'=>LIBDIR.'JpGraph')); diff --git a/lib/tsm_classes.php b/lib/tsm_classes.php index b4ae5f9..e89b5dc 100644 --- a/lib/tsm_classes.php +++ b/lib/tsm_classes.php @@ -580,6 +580,7 @@ class node extends base { } function addOccupancy($details) { + if (isset($this->fs[$details->filespace_id])) $this->fs[$details->filespace_id]->setOccupancy($details); } @@ -1432,7 +1433,8 @@ class nodes extends xtsm { $result = $this->server->query('select * from FILESPACES',null); if ($result) foreach ($result as $details) - $this->nodes[$details['NODE_NAME']]->addFileSpace($details); + if (isset($this->nodes[$details['NODE_NAME']])) + $this->nodes[$details['NODE_NAME']]->addFileSpace($details); # Get the file systems occupancy. foreach ($this->getNodes() as $node) { @@ -1444,7 +1446,8 @@ class nodes extends xtsm { $result = $this->server->query('select * from VOLUMEUSAGE',null); if ($result) foreach ($result as $details) - $this->nodes[$details['NODE_NAME']]->addVolumeUsage($details); + if (isset($this->nodes[$details['NODE_NAME']])) + $this->nodes[$details['NODE_NAME']]->addVolumeUsage($details); } function getNodes() { diff --git a/tools/unserialize.php b/tools/unserialize.php deleted file mode 100644 index beb555c..0000000 --- a/tools/unserialize.php +++ /dev/null @@ -1,15 +0,0 @@ -'; - echo ''; - echo ''; - echo ''; -} -?>