HP XP Command View Advanced Edition Software User Manual
Page 254
/* displays storage information of the target volume's DKC.*/
/* */
/* This sample script uses the following CLI commands. */
/* - KTQRYDEV */
/* */
/* This sample script assumes the following settings. */
/* 1) Device number of target (want to get storage information) */
/* volume is specified in the DEVN() option value */
/* in the script's argument. */
/* */
/**********************************************************************/
/* Sample script begins. */
SAY "#-- BEGIN KTDEMO04.";
/*
* Parse argument specified in the EXEC command.
*/
PARSE UPPER ARG @options
PARSE UPPER VALUE @options 'DEVN()' with 'DEVN('opt_devn')';
/*
* Check option values in the argument.
*/
IF opt_devn = '' THEN DO
SAY "Please specify DEVN() value in the argument.";
EXIT 8;
END;
/*
* Query tiering policy to the target volume.
*/
CALL KTQRYDEV "STEM(DEMO_STEM.) MSG(DEMO_MSG.) DEVN("opt_devn")";
/*
* Check the return code to see if it is 0 or not.
*/
IF RESULT /= 0 THEN DO
CALL printErrorMessage "KTQRYDEV" RESULT;
EXIT 8;
END;
val_SN = DEMO_STEM.SerialNum;
val_CU = DEMO_STEM.CUNum;
val_CCA = DEMO_STEM.CCA;
val_POOLID = DEMO_STEM.POOLID;
sym_SN = 'SN' ||val_SN;
sym_CU = 'CU' ||val_CU;
sym_CCA = 'CCA' ||val_CCA;
SAY 'DKC';
SAY ' SN:' ||DEMO_STEM.LOCAL.sym_SN.SerialNum||,
',Model:' ||DEMO_STEM.LOCAL.sym_SN.Model||,
',Microcode:' ||DEMO_STEM.LOCAL.sym_SN.Microcode||,
',IFType:' ||DEMO_STEM.LOCAL.sym_SN.IFType;
IF DATATYPE(val_POOLID)='NUM' THEN DO
/*
* Display Pool values in the volume specified in the DEVN().
*/
SAY '';
Sample scripts
254