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 @@
+
+
+
+
Database Backup Volumes
+
+
+
+
+
+
Date
+
Seq
+
Type
+
Device
+
Volume
+
Location
+
+ backups() as $vo) { ?>
+
+
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 @@
+
+
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 @@
+
+
+
+
Database Volumes
+
+
+
+
+
+
Location
+
Free Space
+
Used Space
+
Total Space
+
+ vols() as $vo) { ?>
+
+
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'] = '';
-
-if (isset($form['command'])) {
- $helpCommand = $help->getCommand($form['command']);
-
- if (get_request('raw','REQUEST')) {
- $blockBody['help'] .= '
',_('It looks like you have NOT yet run a TSM backup.'));
-}
-
-
-if ($app['server']->GetDBDetail('BACKUP_RUNNING') == 'YES')
- $blockBody['backup'] .= sprintf('
%s
',_('Database backup IS currently running.'));
-else
- $blockBody['backup'] .= sprintf('
%s
',_('Database backup is NOT currently running.'));
-
-$blockBody['backup'] .= '
',_('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('
';
-
-# 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('
';
-
-# 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('
';
-
-# 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 '';
-}
-?>