(1,'Total Data stored','SELECT CAST(FLOAT(SUM(logical_mb)) / 1024 / 1024 AS DEC(8,3)) FROM occupancy','TB','','','',0,3,'totaldata',10),
(2,'Total Data backuped','SELECT cast(float(sum(bytes))/1024/1024/1024/1024 as dec(8,3)) FROM SUMMARY WHERE ACTIVITY=''BACKUP'' AND (CURRENT_TIMESTAMP-END_TIME)HOURS LESS= 24 HOURS','TB','','','',0,3,'totaldata',20),
(3,'Total Data archived','SELECT cast(float(sum(bytes))/1024/1024/1024/1024 as dec(8,3)) FROM SUMMARY WHERE ACTIVITY=''ARCHIVE'' AND (CURRENT_TIMESTAMP-END_TIME)HOURS LESS= 24 HOURS','TB','','','',0,3,'totaldata',30),
(4,'Scratch Tapes','SELECT COUNT(*) FROM libvolumes WHERE status=''Scratch''','','less','10','alarm',1,3,'healthdata',10),
(5,'Volumes with Errors','SELECT COUNT(*) FROM volumes WHERE error_state=''YES''','','more','0','alarm',0,3,'healthdata',20),
(6,'Unavailable Volumes','SELECT COUNT(*) FROM volumes WHERE access=''UNAVAILABLE''','','more','0','alarm',0,3,'healthdata',30),
(7,'Drives Offline','SELECT COUNT(*) FROM drives WHERE NOT online=''YES''','','more','0','alarm',1,3,'healthdata',40),
(8,'Paths Offline','SELECT COUNT(*) FROM paths WHERE NOT online=''YES''','','more','0','alarm',1,3,'healthdata',50),
(9,'Cache Hit','SELECT CACHE_HIT_PCT from db','%','less','98.0','warn',0,3,'database',10),
(10,'Database Usage','SELECT pct_utilized FROM db','%','more','90.0','alarm',0,3,'database',20),
(11,'Log Usage','SELECT pct_utilized FROM log','%','more','90.0','alarm',0,3,'database',30),
(12,'DB Fragmentation','SELECT CAST((100 - (CAST(MAX_REDUCTION_MB AS FLOAT) * 256 ) / (CAST(USABLE_PAGES AS FLOAT) - CAST(USED_PAGES AS FLOAT) ) * 100) AS DECIMAL(4,2)) AS PERCENT_FRAG FROM DB','%','more','10.0','alarm',0,3,'database',40),
(13,'DB Volumes not synced','SELECT COUNT(*) FROM dbvolumes WHERE ( NOT copy1_status=''Synchronized'' OR NOT copy2_status=''Synchronized'' OR NOT copy3_status=''Synchronized'')','','more','0','alarm',0,3,'database',50),
(14,'DB Logs not synced','SELECT COUNT(*) FROM logvolumes WHERE ( NOT copy1_status=''Synchronized'' OR NOT copy2_status=''Synchronized'' OR NOT copy3_status=''Synchronized'')','','more','0','alarm',0,3,'database',60),
(15,'Last DB Backup','SELECT last_backup_date FROM db','','','','',0,3,'database',70),
(16,'Failed Admin Schedules','SELECT count(*) FROM events WHERE status NOTEQUAL ''Completed'' AND status NOTEQUAL ''Future'' AND status NOTEQUAL ''Started'' AND status NOTEQUAL ''Restarted'' and status NOTEQUAL ''In Progres'' and status NOTEQUAL ''Pending'' and NODE_NAME is NULL','','more','0','alarm',0,3,'schedules',10),
(17,'Failed Client Schedules','SELECT count(*) FROM events WHERE status NOTEQUAL ''Completed'' AND status NOTEQUAL ''Future'' AND status NOTEQUAL ''Started'' AND status NOTEQUAL ''Restarted'' and status NOTEQUAL ''In Progres'' and status NOTEQUAL ''Pending'' AND NODE_NAME is NOT NULL','','more','0','alarm',0,3,'schedules',20),
(18,'Running Client Schedules','SELECT count(*) FROM events WHERE status NOTEQUAL ''Completed'' AND status NOTEQUAL ''Future'' AND (status=''In Progres'' OR status=''Started'' OR status=''Restarted'') and NODE_NAME is NOT NULL','','more','0','warn',0,3,'schedules',30),
(19,'Running Admin Schedules','SELECT count(*) FROM events WHERE status NOTEQUAL ''Completed'' AND status NOTEQUAL ''Future'' AND (status=''In Progre%'' OR status=''Started'' OR status=''Restarted'') and NODE_NAME is NULL','','more','0','warn',0,3,'schedules',40);
(1,'allnodes','All Nodes','select NODE_NAME, domain_name, platform_name, client_os_level, TCP_ADDRESS, trim(char(client_version)) ||''.''|| trim(char(client_release)) ||''.''|| trim(char(client_level)) ||''.''|| trim(char(client_sublevel)) as version from nodes','`timestamp` int(11), `Node Name` varchar(64), `Domain` varchar(30), `OS` varchar(100), `OS Level` varchar(100), `IP` varchar(16), `Version` varchar(100)',NULL,'This query lists all existing nodes, their domains etc.','Node Name','','','','',0,'update',15,'nodes',10),
(2,'inactivenodes','Inactive Nodes','select NODE_NAME, domain_name, platform_name, LASTACC_TIME from nodes where LASTACC_TIME < current_timestamp - 24 hours','`timestamp` int(11), `Node Name` varchar(64), `Domain` varchar(30), `OS` varchar(100), `Last Accessed` varchar(26) ',NULL,'A list of all nodes that haven''t been accessed since 24 hours.','Last Accessed','','','','',0,'update',15,'nodes',20),
(3,'filespaces','Filespaces','select nodes.node_name as NODENAME, filespaces.filespace_name as FSNAME, substr(char(filespaces.backup_end), 1, 10) as FS_LASTBACKUP from nodes, filespaces WHERE filespaces.node_name=nodes.node_name','`timestamp` int(11), `Node Name` varchar(64), `Filespace` varchar(255), `Last Backup` varchar(26) ',NULL,'A list of all filespaces and it''s last backup','Node Name','','','','',0,'update',15,'nodes',30),
(4,'stalledfilespaces','Stalled Filespaces','select node_name, filespace_name, backup_start, backup_end from filespaces where cast((current_timestamp-backup_end)days as decimal) >= 3','`timestamp` int(11), `Node Name` varchar(64), `Filespace` varchar(255), `Backup Start` varchar(26), `Backup End` varchar(26) ',NULL,'A list of all filespaces that might be stalled (and have not been backed up in the last 3 days)','Node Name','','','','',0,'update',15,'nodes',40),
(5,'spacenode','Space Usage / Node','SELECT o.node_name||'''' as NODE_NAME, sum(cast(o.physical_mb/1024 as decimal (10,2))) as TOTAL_GB, sum(cast(o.num_files as decimal (10,0))) as TOTAL_FILES_STORED, dec(dec(sum(o.num_files))/(select dec(sum(num_files)) from occupancy)*100,6,4) as PCT_FILES_STORED, n.platform_name FROM occupancy o,nodes n WHERE o.node_name=n.node_name GROUP BY n.node_name, o.node_name, n.platform_name','`timestamp` int(11), `Node Name` varchar(64), `Total GB` varchar(30), `Total Files stored` int(11), `Pct of total files` varchar(6), `Platform` varchar(100)',NULL,'This query list all nodes and their total space consumption in GB','Total GB','','','','',0,'snapshot',15,'nodes',50),
(6,'datanode','Data and Tapes / Node','select vu.node_name, ao.total_mb, count(distinct vu.volume_name) as tapes, ao.total_mb/count(distinct vu.volume_name) as mbtape from volumeusage vu, auditocc ao where vu.node_name=ao.node_name group by vu.node_name, ao.total_mb','`timestamp` int(11), `Node` varchar(64), `Total MB` int(30), `Tapes` int(30), `MB/Tape` int(30) ',NULL,'This query shows how many data the nodes are using and over how many tapes they are spread.','Total MB','','','','',0,'snapshot',15,'nodes',60),
(7,'tapesnode','Tapes used by Node','select distinct node_name, volume_name,stgpool_name from volumeusage','`timestamp` int(11), `Node Name` varchar(35), `Volume Name` varchar(100), `Storage Pool` varchar(30) ',NULL,'Search for a node name and get all tapes that are used by ths node','Volume Name','','','','',0,'snapshot',15,'nodes',70),
(9,'otherservers','Other Servers','select SERVER_NAME, HL_ADDRESS, LL_ADDRESS, DESCRIPTION, LASTACC_TIME from servers','`timestamp` int(11), `Server Name` varchar(64), `IP` varchar(16), `port` varchar(5), `Desciption` varchar(255), `Last Access` varchar(26) ',NULL,'Some information about other tsm servers known to the current one','Server Name','','','','',0,'update',15,'server',20),
(11,'mgmtclasses','Management Classes','select DOMAIN_NAME, SET_NAME, CLASS_NAME, DEFAULTMC, DESCRIPTION from mgmtclasses','`timestamp` int(11), `Domain` varchar(30), `Policy Set` varchar(30), `Class Name` varchar(30), `Default Class` varchar(3), `Description` varchar(255) ',NULL,'A list of all management classes defined in the current tsm server','Domain','','','','',0,'update',15,'server',40),
(12,'policysets','Policy Sets','select DOMAIN_NAME, SET_NAME, DEFMGMTCLASS, DESCRIPTION from policysets','`timestamp` int(11), `Domain` varchar(30), `Policy Set` varchar(30), `DEFMGMTCLASS` varchar(30), `Description` varchar(255) ',NULL,'This is a list of all policy sets defined in the current tsm server','Domain','','','','',0,'update',15,'server',50),
(13,'domains','Domains','select DOMAIN_NAME, SET_LAST_ACTIVATED, DEFMGMTCLASS, NUM_NODES, BACKRETENTION, ARCHRETENTION, DESCRIPTION, ACTIVESTGPOOLS from domains','`timestamp` int(11), `Domain` varchar(30), `Last Activated Set` varchar(30), `DEFMGMTCLASS` varchar(30), `# Nodes` int(11), `Backup Retention` int(11), `Archive Retention` int(11), `Description` varchar(255), `Active Stgpools` varchar(30) ',NULL,'This is a list of all domains defined in the current tsm server','Domain','','','','',0,'update',15,'server',60),
(14,'backupcopygroups','Backup Copygroups','SELECT domain_name, class_name, VEREXISTS, VERDELETED, RETEXTRA, RETONLY, destination FROM bu_copygroups WHERE set_name=''ACTIVE''','`timestamp` int(11), `Domain` varchar(30), `Managementclass` varchar(30), `VerExists` int(11), `VerDeleted` int(11), `RetExtra` int(11), `RetOnly` int(11), `Destination Pool` varchar(64) ',NULL,'Destination pools and other information about all backup copygroups','Domain','','','','',0,'update',15,'server',70),
(15,'archivecopygroups','Archive Copygroups','SELECT domain_name, class_name, retver, destination FROM ar_copygroups where set_name=''ACTIVE''','`timestamp` int(11), `Domain` varchar(30), `Managementclass` varchar(30), `RetVer` int(11), `Destination Pool` varchar(64) ',NULL,'Destination pools and other information about all archive copygroups','Domain','','','','',0,'update',15,'server',80),
(16,'drives','Drives','select LIBRARY_NAME, DRIVE_NAME, DEVICE_TYPE, ONLINE, ELEMENT, DRIVE_STATE, ALLOCATED_TO, CLEAN_FREQ, DRIVE_SERIAL, VOLUME_NAME from drives','`timestamp` int(11), `Library` varchar(30), `Name` varchar(30), `Type` varchar(30), `Online` varchar(3), `Element` varchar(30), `State` varchar(30), `Allocated To` varchar(30), `Clean Freq` varchar(30), `Serial #` varchar(30), `Volume` varchar(30) ',NULL,'This is a list of all tape drives defined in the current tsm server','Name','equal','NO','Online','alarm',1,'update',15,'server',90),
(17,'paths','Paths','select SOURCE_NAME, SOURCE_TYPE, DESTINATION_NAME, DESTINATION_TYPE, LIBRARY_NAME, NODE_NAME, DEVICE, EXTERNAL_MANAGER, LUN, DIRECTORY, ONLINE from paths','`timestamp` int(11), `Source Name` varchar(30), `Source Type` varchar(30), `Dest Name` varchar(30), `Dest Type` varchar(30), `Library` varchar(30), `Node Name` varchar(64), `Device` varchar(30), `External Manager` varchar(30), `Lun` varchar(30), `Directory` varchar(30), `Online` varchar(3) ',NULL,'This is a list of all paths defined in the current tsm server','Source Name','equal','NO','Online','alarm',1,'update',15,'server',100),
(18,'drmedia','Disaster Recovery Media','select VOLUME_NAME, STGPOOL_NAME, LIB_NAME, VOLTYPE, UPD_DATE, LOCATION, STATE from drmedia','`timestamp` int(11), `Volume Name` varchar(100), `Storage Pool` varchar(30), `Library` varchar(30), `Volume Type` varchar(30), `Last Update` varchar(26), `Location` varchar(30), `State` varchar(30) ',NULL,'A list of all available DR media','volume Name','notequal','MOUNTABLE','State','alarm',0,'snapshot',15,'server',110),
(19,'backupstatus_24h','Backup Status / 24h','select Entity, Successful, cast(float(sum(bytes))/1024/1024/1024 as dec(8,3)) as GB, Examined, Affected, Failed from summary where activity=''BACKUP'' and cast((current_timestamp-start_time)hours as decimal(8,0)) LESS 24 group by Entity,Successful,Examined,AFFECTED,Failed','`timestamp` int(11), `Entity` varchar(64), `Successful` varchar(3), `GB` varchar(30), `Examined` int(11), `Affected` int(11), `Failed` int(11), UNIQUE KEY `Entity` (`Entity`,`GB`,`Examined`,`Affected`,`Failed`)',NULL,'A list of all backups that have been started during the last 24 hours','Successful','equal','NO','Successful','alarm',0,'update',15,'backup',10),
(20,'backups_all','Backup Times','SELECT entity AS "Node_name", CAST(sum(bytes/1024/1024/1024) AS decimal(8,3)) AS "GB_xfer", start_time, end_time, END_TIME-START_TIME as duration, comm_wait, Affected, Failed, Successful FROM summary WHERE activity=''BACKUP'' group by start_time, end_time, Successful,Examined,Affected,Failed,entity,comm_wait','`timestamp` int(11), `Node Name` varchar(64), `TX/GB` varchar(30), `Start Time` varchar(30), `End Time` varchar(30), `Duration` varchar(30), `Comm Wait` int(11), `Files` int(11), `Failed` int(11), `OK?` varchar(3), UNIQUE KEY `Node Name` (`Node Name`,`TX/GB`,`Start Time`,`End Time`,`Comm Wait`) ','`Node Name`, `Start Time`, `End Time`, `OK?`','Search for a node name and get a list of all backups performed on this node','Start Time','equal','NO','Successful','alarm',0,'append',15,'backup',20),
(21,'backups_24h','Backup Times / 24h','SELECT entity AS "Node_name", CAST(sum(bytes/1024/1024/1024) AS decimal(8,3)) AS "GB_xfer", start_time, end_time, END_TIME-START_TIME as duration, comm_wait, Affected, Failed, Successful FROM summary WHERE activity=''BACKUP'' AND start_time>=current_timestamp - 24 hours group by start_time, end_time, Successful,Examined,Affected,Failed,entity,comm_wait','`timestamp` int(11), `Node Name` varchar(64), `TX/GB` varchar(30), `Start Time` varchar(26), `End Time` varchar(26), `Duration` varchar(30), `Comm Wait` int(11), `Files` int(11), `Failed` int(11), `OK?` varchar(3) ','`Node Name`, `Start Time`, `End Time`, `OK?`','This query gives you an overview over all backups performed during the last 24 hours.','Start Time','equal','NO','Successful','alarm',0,'update',15,'backup',30),
(23,'archivestatus_24h','Archive Status / 24h','select Entity, Successful, cast(float(sum(bytes))/1024/1024/1024 as dec(8,3)) as GB, Examined, Affected, Failed from summary where activity=''ARCHIVE'' and cast((current_timestamp-start_time)hours as decimal(8,0)) LESS 24 group by Entity,Successful,Examined,AFFECTED,Failed','`timestamp` int(11), `Entity` varchar(64), `Successful` varchar(3), `GB` varchar(30), `Examined` int(11), `Affected` int(11), `Failed` int(11), UNIQUE KEY `Entity` (`Entity`,`GB`,`Examined`,`Affected`,`Failed`) ',NULL,'A list of all archives that have been started during the last 24 hours','Successful','equal','NO','Successful','alarm',0,'update',15,'backup',60),
(24,'archives_all','Archive Times','SELECT entity AS "Node_name", CAST(sum(bytes/1024/1024/1024) AS decimal(8,3)) AS "GB_xfer", start_time, end_time, END_TIME-START_TIME as duration, comm_wait, Affected, Failed, Successful FROM summary WHERE activity=''ARCHIVE'' group by start_time, end_time, Successful,Examined,Affected,Failed,entity,comm_wait','`timestamp` int(11), `Node Name` varchar(64), `TX/GB` varchar(30), `Start Time` varchar(26), `End Time` varchar(26), `Duration` varchar(30), `Comm Wait` int(11), `Files` int(11), `Failed` int(11), `OK?` varchar(3), UNIQUE KEY `Node Name` (`Node Name`,`Start Time`,`End Time`,`Comm Wait`) ','`Node Name`, `Start Time`, `End Time`, `OK?`','Search for a node name and get a list of all archives performed on this node','Start Time','equal','NO','Successful','alarm',0,'append',15,'backup',70),
(25,'archives_24h','Archive Times / 24h','SELECT entity AS "Node_name", CAST(sum(bytes/1024/1024/1024) AS decimal(8,3)) AS "GB_xfer", start_time, end_time, END_TIME-START_TIME as duration, comm_wait, Affected, Failed, Successful FROM summary WHERE activity=''ARCHIVE'' AND start_time>=current_timestamp - 24 hours group by start_time, end_time, Successful,Examined,Affected,Failed,entity,comm_wait','`timestamp` int(11), `Node Name` varchar(64), `TX/GB` varchar(30), `Start Time` varchar(26), `End Time` varchar(26), `Duration` varchar(30), `Comm Wait` int(11), `Files` int(11), `Failed` int(11), `OK?` varchar(3), UNIQUE KEY `Node Name` (`Node Name`,`Start Time`,`End Time`,`Comm Wait`) ','`Node Name`, `Start Time`, `End Time`, `OK?`','This query gives you an overview over all archives performed during the last 24 hours.','Start Time','equal','NO','Successful','alarm',0,'append',15,'backup',80),
(27,'clientscheddef','Client Schedules Definitions','select schedule_name, domain_name, description, action, priority, starttime, period, perunits, dayofweek, sched_style from client_schedules','`timestamp` int(11), `Schedule Name` varchar(30), `Domain` varchar(30), `Description` varchar(255), `Action` varchar(30), `Prio` int(2), `Start` varchar(26), `Period` int(2), `Unit` varchar(30), `Day of Week` varchar(30), `Style` varchar(30) ',NULL,'A list of all client schedules defined in the current tsm server.','Schedule Name','','','','',0,'snapshot',15,'schedules',10),
(28,'clientschedules','Client Schedules Results','select node_name, schedule_name, scheduled_start, ACTUAL_START,COMPLETED, status, result, reason from events where scheduled_start >= current_timestamp - 24 hours and node_name != '''' and status != ''Future'' and status != ''Started''','`timestamp` int(11), `Node Name` varchar(64), `Schedule Name` varchar(30), `Scheduled Start` varchar(26), `Actual Start` varchar(26), `End Time` varchar(26), `Status` varchar(30), `Result` int(11), `Reason` int(11), UNIQUE KEY `Node Name` (`Node Name`,`Schedule Name`,`Scheduled Start`,`Actual Start`,`End Time`)','`Node Name`,`Actual Start`, `End Time`, `Status`','This query shows the start times and results of all client schedule that were scheduled during the last 24 hours.','Node Name','notequal','Completed','Status','alarm',0,'append',15,'schedules',20),
(30,'adminscheddef','Admin Schedules Definitions','select schedule_name, command, description, active, priority, starttime, period, perunits, dayofweek, sched_style from admin_schedules','`timestamp` int(11), `Schedule Name` varchar(30), `Command` varchar(255), `Description` varchar(255), `Active?` varchar(3), `Prio` int(2), `Start` varchar(26), `Period` int(30), `Unit` varchar(30), `Day of Week` varchar(30), `Style` varchar(30) ',NULL,'A list of all administrative schedules defined in the current tsm server.','Schedule Name','','','','',0,'snapshot',15,'schedules',40),
(31,'adminschedules','Admin Schedules Results','select schedule_name, scheduled_start, ACTUAL_START,COMPLETED,status, result, reason from events where scheduled_start >= current_timestamp - 24 hours and node_name is null and status != ''Future'' and status != ''Started''','`timestamp` int(11), `Schedule Name` varchar(30), `Scheduled Start` varchar(26), `Actual Start` varchar(26), `End Time` varchar(26), `Status` varchar(30), `Result` int(11), `Reason` int(11), UNIQUE KEY `Schedule Name` (`Schedule Name`,`Scheduled Start`,`Actual Start`,`End Time`)','`Schedule Name`, `Actual Start`, `End Time`, `Status`','This query shows the start times and results of all administrative schedule that were scheduled during the last 24 hours.','Schedule Name','notequal','Completed','Status','alarm',0,'append',15,'schedules',50),
(33,'assos','Assossiations','select domain_NAME, schedule_name, node_name, chg_time from associations','`timestamp` int(11), `Domain` varchar(30), `Schedule` varchar(30), `Node` varchar(64), `Change Time` varchar(26) ',NULL,'This query lists all defined schedule associations.','Domain','','','','',0,'update',15,'schedules',70),
(34,'migration','Migration','SELECT ENTITY, Activity, Start_Time as "Start_Time", End_Time, END_TIME-START_TIME as duration, Examined, Affected, cast((BYTES/1048576)/1024 as decimal(12,3)) as GB, FAILED, Mediaw, Processes, Successful FROM ADSM.SUMMARY where ACTIVITY like upper(''MIGRATION'') and date(start_time) >= current_date -1 days','`timestamp` int(11), `Activity` varchar(30), `Process` varchar(30), `Start Time` varchar(26), `End Time` varchar(26), `Runtime` varchar(26), `Files/Dirs checked` int(11), `Files/Dirs transfered` int(11), `GB transfered` varchar(30), `Failures` int(1), `Mediaw` int(11), `Processes` int(11), `Successful` varchar(3), UNIQUE KEY `Activity` (`Activity`,`Process`,`Start Time`,`End Time`)','`Activity`, `Start Time`, `End Time`, `Successful`','Information about all migration processes that ran during the last 24 hours.','Start Time','equal','NO','Successful','alarm',0,'append',15,'schedules',80),
(36,'processes','Running Processes','SELECT process_num, process, substr(char(start_time),1,19) AS START_TIME, substr(char(current_timestamp - start_time),1,10) as duration, cast(float(bytes_processed) /1024/1024 AS DEC(8,2)) AS MB, cast((cast(bytes_processed as dec(18,0))/cast((current_timestamp-start_time) seconds as decimal(18,0))) / 1024 / 1024 AS DEC (18,2)) as MBs, status FROM processes','`timestamp` int(11), `Process Number` int(11), `Process` varchar(30), `Start Time` varchar(26), `ELAPTIME (D HHMMSS)` varchar(26), `MB` varchar(30), `MB/s` varchar(30), `Status` varchar(30) ',NULL,'This query lists all running processes on the current tsm server.','Process Number','','','','',0,'snapshot',2,'activity',10),
(37,'sessions','Active Sessions','select SESSION_ID, substr(char(start_time),1,19) AS START_TIME, STATE, WAIT_SECONDS, cast(float(sum(BYTES_SENT))/1024/1024/1024 as dec(8,3)) as BSEND, cast(float(sum(BYTES_RECEIVED))/1024/1024/1024 as dec(8,3)) as received, CLIENT_NAME,CLIENT_PLATFORM, OUTPUT_VOL_ACCESS, INPUT_VOL_ACCESS, MOUNT_POINT_WAIT from sessions group by SESSION_ID, START_TIME, STATE, WAIT_SECONDS, CLIENT_NAME, INPUT_VOL_ACCESS, OUTPUT_VOL_ACCESS, MOUNT_POINT_WAIT, CLIENT_PLATFORM','`timestamp` int(11), `Session` int(11), `Start Time` varchar(26), `State` varchar(30), `Wait (s)` int(11), `GB sent` varchar(30), `GB rcvd` varchar(30), `Node` varchar(64), `OS` varchar(100), `Output Volume` varchar(30), `Input Volume` varchar(30), `MP Wait` int(11) ',NULL,'This query lists all active sessions on the current tsm server.','Session','','','','',0,'snapshot',2,'activity',20),
(38,'mounts','Mount Status','select LIBRARY_NAME, DRIVE_NAME, DRIVE_STATE, VOLUME_NAME, ALLOCATED_TO from drives where VOLUME_NAME is not null','`timestamp` int(11), `Library` varchar(30), `Drive` varchar(30), `State` varchar(30), `Volume` varchar(30), `Allocated to` varchar(30) ',NULL,'This query lists all mounted volumes.','Library','','','','',1,'snapshot',5,'activity',30),
(39,'mounthistory','Mount History','select DRIVE_NAME, START_TIME, END_TIME from summary where DRIVE_NAME NOTEQUAL '''' and end_time >=current_timestamp - 24 hours','`timestamp` int(11), `Drive Name` varchar(30) ,`Start Time` varchar(26),`End Time` varchar(26), UNIQUE KEY `Drive Name` (`Drive Name`,`Start Time`,`End Time`)','`Drive Name`, `Start Time` ,`End Time`','A graphical chart which represents all tape mounts during the last 24 hours.','Drive Name','','','','',1,'append',15,'activity',40),
(40,'warnings','Warnings','select DATE_TIME, MESSAGE from actlog where SEVERITY=''W''','`timestamp` int(11), `Time` varchar(26), UNIQUE KEY `Time` (`Time`,`Message`), `Message` varchar(255) ',NULL,'Warnings received from the tsm activity log.','','','','','',0,'append',15,'activity',50),
(41,'errors','Errors','select DATE_TIME, MESSAGE from actlog where SEVERITY=''E''','`timestamp` int(11), `Time` varchar(26), `Message` varchar(255), UNIQUE KEY `Time` (`Time`,`Message`) ',NULL,'Errors received from the tsm activity log.','','','','','',0,'append',15,'activity',60),
(42,'freescratch','Free Tapes','select count(*)Scratch from libvolumes where status=''Scratch''','`timestamp` int(11), `Scratch` int(11) ',NULL,'Gives you a number of scratch tapes known to the current tsm server.','','less','10','Scratch','alarm',1,'snapshot',15,'serverstorage',10),
(43,'freescratch_pool','Free Tapes / Pool','SELECT STGPOOLS.STGPOOL_NAME, STGPOOLS.MAXSCRATCH, Count(STGPOOLS.MAXSCRATCH) as "Allocated_SCRATCH", STGPOOLS.MAXSCRATCH-count(STGPOOLS.MAXSCRATCH) as "Remaining_SCRATCH" FROM STGPOOLS,VOLUMES WHERE (VOLUMES.STGPOOL_NAME = STGPOOLS.STGPOOL_NAME) AND ((STGPOOLS.DEVCLASS=''LTO3DEVCL'')) GROUP BY STGPOOLS.STGPOOL_NAME, STGPOOLS.MAXSCRATCH','`timestamp` int(11), `Storagepool` varchar(30), `MAXSCRATCH` int(11) ,`Allocated Scratch` int(11), `Remaining Scratch` int(11) ',NULL,'Shows how many scratch tapes are available per pool. The numbers shown here are only defined max. values, not actual free tapes!','Storagepool','equal','0','Remaining Scratch','alarm',0,'update',15,'serverstorage',20),
(45,'spacereclamation','Space Reclamation','select volume_name, pct_reclaim, stgpool_name from volumes where pct_reclaim >= 60','`timestamp` int(11), `Volume Name` varchar(100), `Pct reclaim` varchar(6), `Storage Pool` varchar(30) ',NULL,'A list of volumes that could be reclaimed.','Pct reclaim','','','','',0,'update',15,'serverstorage',40),
(46,'errortapes','Error Tapes','select VOLUME_NAME, ACCESS from volumes where access !=''READWRITE''','`timestamp` int(11), `Volume Name` varchar(30), `Access` varchar(30) ',NULL,'A list of volumes that are not in READWRITE state.','Volume Name','','','','',0,'snapshot',15,'serverstorage',50),
(47,'volumes','Volumes','select volume_name, stgpool_name, est_capacity_mb, pct_utilized, status, access, error_state, write_errors, read_errors from volumes','`timestamp` int(11), `Volume Name` varchar(100), `Storage Pool` varchar(30), `Capacity (MB)` varchar(30), `Usage (Pct)` varchar(6), `Status` varchar(30), `Access` varchar(30), `Err State` varchar(30), `Write Err` varchar(30), `Read Err` varchar(30) ',NULL,'A list of all volumes known to this tsm server.','Volume Name','notequal','READWRITE','Access','alarm',0,'update',15,'serverstorage',60),
(48,'libvolumes','Library Volumes','select LIBRARY_NAME, VOLUME_NAME, STATUS, OWNER, LAST_USE, DEVTYPE, MEDIATYPE from libvolumes','`timestamp` int(11), `Library` varchar(30), `Volume Name` varchar(100), `Status` varchar(30), `Owner` varchar(30), `Last Use` varchar(26), `Device Type` varchar(30), `Media Type` varchar(30) ',NULL,'An inventory of all libraries attached to this tsm server.','Library','','','','',1,'update',15,'serverstorage',70),
(49,'backupsets','Backupsets','select NODE_NAME, BACKUPSET_NAME, DATE_TIME, DESCRIPTION from backupsets','`timestamp` int(11), `Node Name` varchar(64), `Backupset Name` varchar(30), `Date` varchar(26), `Description` varchar(255) ',NULL,'A list of all active Backupsets.','Node Name','','','','',0,'snapshot',15,'offsite',10),
(50,'exports','Exports','select DATE_TIME, VOLUME_SEQ, DEVCLASS, VOLUME_NAME, LOCATION, COMMAND from volhistory where TYPE=''EXPORT''','`timestamp` int(11), `Date` varchar(26), `SEQ` varchar(10), `Dev Class` varchar(100), `Volume Name` varchar(100), `Location` varchar(255), `Command` varchar(255) ',NULL,'A list of all Exports.','Date','','','','',0,'snapshot',15,'offsite',20),
(51,'offsitetapes','Offsite Tapes','select VOLUME_NAME, TYPE, VOLUME_SEQ, DATE_TIME, COMMAND from volhistory where type=''BACKUPSET'' or type=''EXPORT'' and volume_name not in (select volume_name from libvolumes)','`timestamp` int(11), `Volume Name` varchar(100), `Type` varchar(30), `Vol Seq` int(11), `Date/Time` varchar(26), `Command` varchar(255) ',NULL,'A list of your offsite tapes (all backupsets and exports that are currently not in you tape library)','Date/Time','','','','',0,'snapshot',15,'offsite',30);