When running CLI for Hitachi Command Suit (HICommandCLI.sh in UNIX or HICommandCLI.bat in Windows) we sometimes get this type of error:
KAIC90574-E The memory for the CLI became insufficient while this operation was being performed
Command Suite CLI is actually a Java application, and this error means that the default size of memory heap (256M or 512M according to Hitachi Command Suite CLI Reference Guide, MK-90HC176-19) is not enough to keep the data we have requested. Usually it happens while running requests with GetStorageArray, GetLogicalGroup and GetHostInfo commands on Command Suite servers with many large arrays registered in.
It’s obvious we must somehow increase the memory size in this case. Hitachi Command Suite CLI Reference Guide advises us to change HDVM_CLI_MEM_SIZE variable. And there are two possible ways of doing it: edit HICommandCLI script or set the environmental variable. But the Reference guide convinces us not to edit the script as any CLI reinstallation will erase our changes in the HICommandCLI.
So the right way is to set the variable.
In UNIX Bourne shell we just export it before starting HICommandCLI.sh:
Than we can pipe the output and parse it with any appropriate UNIX tools.
In Windows “cmd” for HICommandCLI.bat:
But things turn difficult if we must script some advanced output processing in it. Therefore the idea to run Command Suite CLI entirely in Microsoft PowerShell instead of ancient “cmd” looks very attractive.
But there is a hidden trap for setting variables: set HDVM_CLI_MEM_SIZE=1024m will not help in PowerShell as this “set” is actually an alias for Set-Variable cmdlet which sets a PowerShell variable. Instead of it we need to set an environmental variable, so run: