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 command file is provided as-is and is unsupported. The script is for use with a Tivoli Storage Manager administrative client on a Windows system.
auditvols.cmd :
@echo off
rem ********************************************************************
rem * This command file will start audit of volumes based on input file
rem * and will run "X" number of audit volumes concurrently. It will check
rem * the number of running audit volume every 10 minutes and will start
rem * new ones as needed. The audit is run with default fix=no value.
rem *
rem * The script accepts 4 arguments,
rem * 1. The Tivoli Storage Manager administrator userid
rem * 2. The Tivoli Storage Manager administrator password
rem * 3. The input file which contains the volumes to audit, 1 per line
rem * 4. The maximum number of audit volumes to run concurrently
rem ********************************************************************
setlocal
SET TSMID=%1
SET TSMPA=%2
SET VOLLIST=%3
SET AUDITMAX=%4
SET TSMCMD="dsmadmc -id="%TSMID%" -pa="%TSMPA%" -dataonly=yes select count(*) from processes where PROCESS like 'Audit Volume%%'"
For /F %%I IN (%VOLLIST%) do (CALL :START_AUDIT %%I)
goto :END
:START_AUDIT
CALL :WAIT_AUDIT
dsmadmc -id="%TSMID%" -pa="%TSMPA%" audit volume %1
goto :EOF
:WAIT_AUDIT
for /F "usebackq delims==" %%N in (`%TSMCMD%`) do (@set AUDITCOUNT=%%N)
set /a AUDITALLOWED=%AUDITMAX%-%AUDITCOUNT%
if %AUDITALLOWED% gtr 0 goto :EOF
choice /n /t 600 /d y
goto :WAIT_AUDIT
:END
endlocal
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21684837