HP XP P9500 Storage User Manual
Page 82
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 except the logout command, this example performs three retries at intervals of
2 minutes, assuming that communication errors and other errors can occur. The downloaded
configuration report is accumulated for three 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
REM ####################################### Login %CNT_LOGIN%
SET /a CNT_LOGIN=%CNT_LOGIN% + 1
%RAIDINF_PATH%\raidinf -login %USER% %PASS% -servername %SERVER%
if ERRORLEVEL 1 (
IF %CNT_LOGIN% GTR %LOOP% GOTO :ABEND
CALL :SLEEP
GOTO LOGIN_RETRY
)
82
Viewing and managing the storage system