Troubleshooting
Problem
This document provides a sample script that can be used to run audit volume processes based on a list of volumes to be audited.
Resolving The Problem
The following script is provided as-is and is unsupported. The script is for use with a Tivoli Storage Manager administrative client on a UNIX system.
auditvols.sh :
#!/bin/ksh
#######################################################################
#
# This script will start audit of volumes based on input file and will
# run "X" number of audit volumes concurrently. The script will check
# the number of running audit volume every 10 minutes and will start
# new ones as needed. The audit is run with default fix=no value.
#
# The script accepts 4 arguments,
# 1. The Tivoli Storage Manager administrator userid
# 2. The Tivoli Storage Manager administrator password
# 3. The input file which contains the volumes to audit, 1 per line
# 4. The maximum number of audit volumes to run concurrently
#
#######################################################################
tsmid=$1
tsmpa=$2
vollist=$3
auditmax=$4
while read onevol ; do
oktostartaudit="NO"
while [ $oktostartaudit = "NO" ] ; do
#Get the current count of audit volume processes
auditcount=$(dsmadmc -id=$tsmid -pa=$tsmpa -dataonly=yes "select count(*) from processes where PROCESS like 'Audit Volume%'")
#Get the allowed number of processes that can be started
auditallowed=$(($auditmax - $auditcount))
if (($auditallowed > 0 ))
then
oktostartaudit="YES"
else
sleep 600
fi
done
#Start the audit processes
dsmadmc -id=$tsmid -pa=$tsmpa audit volume $onevol
done < $vollist
Was this topic helpful?
Document Information
More support for:
Tivoli Storage Manager
Software version:
All Supported Versions
Operating system(s):
AIX, HP-UX, Linux, Solaris
Document number:
502653
Modified date:
17 June 2018
UID
swg21656591