Here are few useful scripts that can be defined on an IBM Spectrum Protect / TSM environment.
Script: DB_BACKUP
This script will perform all the tasks of the database backup that should be run on a daily basis. We suggest scheduling this script as an administrative schedule to run every morning, after all the backups have completed, an no other processes (such as reclamation or expiration) are active.
Script: DB_UTILIZEDdefine script db_backup description="Database backup" update script db_backup "set dbrecovery dbbkp" update script db_backup "del volh tod=-3 t=dbb" update script db_backup "backup db t=f devc=dbbkp nums=4" update script db_backup "backup volhist" update script db_backup "backup devconfig"
Script DB_UTILIZED can be used to display the database and log utilization. It basically runs a few select statements on both the db and log tables in the database, but makes it easier to view the results.
define script db_utilized description="Display database and log utilization"Script: MOUNTS
update script db_utilized "select sum(100-(free_space_mb*100) / tot_file_system_mb) as DB_PCT_UTILIZED from db"
update script db_utilized "select sum(cast(100-(FREE_SPACE_MB*100) / TOTAL_SPACE_MB as decimal(5,2))) as ACTIVE_LOG_PCT_UTILIZED from log"
update script db_utilized "select sum(cast(100-(ARCHLOG_FREE_FS_MB*100) / ARCHLOG_TOL_FS_MB as decimal(5,2))) as ARCHIVE_LOG_PCT_UTILIZED from log"
update script db_utilized "select sum(cast(100-(AFAILOVER_FREE_FS_MB*100) / AFAILOVER_TOL_FS_MB as decimal(5,2))) as FAILOVER_LOG_PTC_UTILIZED from log"
Script MOUNTS will display the active volume mounts on the system.
define script mounts description="Display volume mounts"Script: T_PCT
update script mounts "select client_name,session_id,INPUT_VOL_ACCESS,OUTPUT_VOL_ACCESS from sessions where INPUT_VOL_ACCESS>' ' or OUTPUT_VOL_ACCESS>' '
Script T_PCT will display the volumes to be reclaimed higher than a given percent. It will both show a list of all the volumes, and it will display a total number of volumes at the end. When running this script, both a percentage and a storage pool name should be provided, for example:
RUN T_PCT 70 FILE_DISKIn the example above, all volumes in storage pool FILE_DISK that can be reclaimed having a pct_reclaim higher than 70% will be displayed.
The script is defined as follows:
define script t_pct description="Display reclaimable volumes at given percent"
update script t_pct "select substr(volume_name,1,12) as VOLUME_NAME, substr(stgpool_name,1,20) as STGPOOL_NAME, substr(status,1,15) as STATUS, substr(access,1,15) as ACCESS, pct_reclaim from volumes where (pct_reclaim >=$1 and lower(stgpool_name)='$2') or (pct_reclaim >=$1 and stgpool_name='$2') order by pct_reclaim desc"
update script t_pct "select count(*) as Total from volumes where (pct_reclaim>=$1 and lower(stgpool_name)='$2') or (pct_reclaim>=$1 and stgpool_name='$2')
UNIX Health Check delivers software to scan Linux and AIX systems for potential issues. Run our software on your system, and receive a report in just a few minutes. UNIX Health Check is an automated check list. It will report on perfomance, capacity, stability and security issues. It will alert on configurations that can be improved per best practices, or items that should be improved per audit guidelines. A report will be generated in the format you wish, and the report includes the issues discovered and information on how to solve the issues as well.
Interested in learning more?
Interested in learning more?



