Hi All,
I just started exploring with Device Manager CLI. Is there any way I can get Host Group Details and the number of LUNs allocated to it?
Any one line command can be helpful. I was trying to use "GetLogicalGroup" but it keeps returning me an empty list. I would like to add that I have used the CLI to already discover my SAN Arrays.
Regards,
Avradeep
Here's a script I wrote.. you can modify it as needed:
#!/bin/ksh
#Commented out the following two lines because java was already in env path.
#export HDVM_CLI_MEM_SIZE=256M
#export HDVM_CLI_JRE_PATH=/opt/java6/bin
print -n "Enter name of host name as shown in HCS: "; read host
/share/HCSCLI/HiCommandCLI GetHost "hostname=$host" subtarget=LogicalUnit \
| sed 's/,//g'\
| awk 'BEGIN{FS="=";
printf("%s %s %10s %12s\n","Serial", "LDEV", "KB Size", "Block Size")
printf("%s %s %12s %10s\n","------", "----", "----------", "----------")
}
/name=/||/capacityInKB/||/objectID=LU/||/dpPoolID/ {
if($1~/objectID/)
{
split($2, array, ".");
printf("%-5s " "%04x", array[3], array[4]);
}
else if($1~/capacity/)
{
first++
if(first>1)printf("%12i" "%13.0f\n",$2, $2/.5);next;
}
}'
echo ""
Sample output:
Enter name of host name as shown in HCS: HostY
Serial LDEV KB Size Block Size
------ ---- ---------- ----------
26067 fe20 1048576 2097152
48179 1003 209715840 419431680
48179 1011 1048576320 2097152640
48179 1012 1048576320 2097152640
48179 1040 78643200 157286400
48179 1041 104857920 209715840