system
January 21, 2008, 8:16pm
1
(imported topic written by jcsUTSW)
I need to have BES run this command.
powermt display dev=all | awk ‘/Pseudo|LUN/’
It returns something that looks like this…
Pseudo name = hdiskpower2
Logical device ID = 600601605A601E001EA60F85B3BFDC11
LUN 1001, swpaqdb1,ocr disk, raw,10,swpaqdb2
This is only the first in a list of about 8. The next return in the same format. Some systems might have one and others might have 16.
I need the name (hdiskpower2) and the lun information thats enclosed in brackets at the end of the second line.
Or am I going about this the wrong way?
Any help appreciated.
system
January 21, 2008, 8:41pm
2
(imported comment written by sthull)
BES isn’t designed to run a command and directly return its output. You should instead run your command and redirect it to a file. Then use BES to return the relevant parts of the file through a retrieved property or analysis.
Regards,
Steve
system
January 22, 2008, 12:25am
3
(imported comment written by jessewk)
After you create an action to send the output of the command to a file, you can create your property using relevance something like this:
(
following text of first "= " of it, following text of first “” of next line of it
)
of lines starting with "Pseudo name = " of file “c:\temp.txt”
That would output something like this:
hdiskpower2, ( LUN 1001, swpaqdb1,ocr disk, raw,10,swpaqdb2 )
hdiskpower3, ( LUN 1001, swpaqdb1,ocr disk, raw,10,swpaqdb2 )