beautypg.com

HP XP RAID Manager Software User Manual

Page 69

background image

SET /a CNT_ADD=%CNT_ADD% + 1
%RAIDINF_PATH%\raidinf add report -servername %SERVER% -report ^
%REPORT_NAME%
if ERRORLEVEL 1 (
IF %CNT_ADD% GTR %LOOP% GOTO :ABEND
CALL :SLEEP
GOTO ADD_RETRY
)
GOTO :END
EXIT /B

:SLEEP
REM
REM ############################# SLEEP with %TIMEOUT% sec
REM
ping 127.0.0.1 -n %TIMEOUT% > NUL
EXIT /B

:ABEND
REM ############################# ABEND
ECHO "Create Report Script was ABEND"

:END
REM ############################# Logout
%RAIDINF_PATH%\raidinf -logout -servername %SERVER%

Script example for downloading a configuration report

This script logs the user in, downloads a configuration report, and logs the user out, using the
Report Configuration Tool.

For each command other than logout, this example performs 3 retries at intervals of 2 minutes,
assuming that communication errors and other errors can occur. The downloaded configuration
report is accumulated for 3 generations in the C:\Reports folder by names from
Report_DailyConfigurationReport_1.tgz

to

Report_DailyConfigurationReport_3.tgz

. In addition, if the script for creating a

configuration report fails, generation copy is terminated so that the past configuration reports may
not be overwritten.

REM
REM Download Report Script(DownloadReport.bat)
REM
SET USER=<Username for Remote Web Console>
SET PASS=<Password for Remote Web Console>
SET SERVER=<Hostname or IP Address of SVP>
SET REPORT_NAME=DailyConfigurationReport
SET LOOP=2
REM LOOP:0-2 3Times
SET TIMEOUT=121
REM TIMEOUT 2[minutes]=120[s]
SET TARGETFOLDER=C:\Reports\tmp
SET REPORTFOLDER=C:\Reports
SET RAIDINF_PATH="C:\Program Files\raidinf"
REM
REM Create Report Folder
REM
IF NOT EXIST %REPORTFOLDER% (
MKDIR %REPORTFOLDER%
IF NOT EXIST %TARGETFOLDER% (
MKDIR %TARGETFOLDER%
)
)

SET /a CNT_LOGIN=0
:LOGIN_RETRY

Creating a configuration report using the Report Configuration Tool

69

This manual is related to the following products: