beautypg.com

HP XP7 Storage User Manual

Page 98

background image

GOTO LOGIN_RETRY
)

SET /a CNT_DEL=0
:DEL_RETRY
REM ############################# DELETE %CNT_DEL%
SET /a CNT_DEL=%CNT_DEL% + 1
%RAIDINF_PATH%\raidinf delete report -servername %SERVER% ^
-report %REPORT_NAME% -fill
if ERRORLEVEL 1 (
IF %CNT_DEL% GTR %LOOP% GOTO :ABEND
CALL :SLEEP
GOTO :DEL_RETRY
)

SET /a CNT_ADD=0
:ADD_RETRY
REM ############################# ADD %CNT_ADD%
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%

Example script 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 commandexcept the logout command, 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

98

Viewing and managing the storage system

This manual is related to the following products: