Try Remote execution
sh –c “swlist |grep -i cpb |tail -1”
and choose a grammar file that can parse the data – I’d start w/ the generic grammar first.
I think the grammar that probably will work is NSVP_Space (name space value grammar) … since the list would look something like this:
PHSS_34453 1.0 OV NNM7.50 IA-64 Solid Database Update
>>> PHSS_34871 1.0 OV NNM7.50 IA-64 Consolidated Patch 4
>>> PHSS_37274 1.0 OV NNM7.51 IA-64 Intermediate Patch 18
The problem will probably be dealing with the >>> for patches.
Pipe it through tr or sed to get right of stuff you don’t like.
whats wierd is my original script works on several servers, but a few show some error where it says "no data for host"
I will play with it some more and report back.
Btw, Im only trying to capture the bundle information
sh –c “swlist –l bundle | grep –i cpb | tail -1 2>/dev/null”; exit 0
This will keep errors being parsed with your output, and exit 0 will keep you from getting collection errors.
So if EO doesn’t work, it will just tell you it doesn’t exist.
If that doesn’t work, try this:
SHELL=/bin/sh; swlist –l bundle | grep –i cpb | tail -1 2>/dev/null; exit 0
On another note:
Can't you live browse your server, and see this information?
And can be added as part of your Component Template for HP Bundle/HP Bundle List for snapshot/audit/compliance.
it can be browsed in the Patch tab. but we have a client who wants to report the latest Bundle data. Creating an EO seemed to be the easiest way.
We can do an Audit but Im not sure they want it in an audit report.
Snapshot the object and export that or use reports.
If you are using EO , then central execution allows you to keep copy of script on appserver and execute it on the target machine remote.
May i know what type of error are you getting when you run the EO ? Are you using scriptutil or nsh to run the script?