1834018 Members
2306 Online
110063 Solutions
New Discussion

sam vs. swlist -R

 
SOLVED
Go to solution
Charlie Hoffman
Occasional Advisor

sam vs. swlist -R

can someone please explain why sam shows that a patch is installed and swlist -R does not show the same patch?
8 REPLIES 8
Srini Jay
Valued Contributor

Re: sam vs. swlist -R

If you think the patch is already intalled, try "swlist -l patch" to list all patches.

I haven't used swlist -R and when I did now, it listed patches as part of one of the GoldBase or so.
Pete Randall
Outstanding Contributor

Re: sam vs. swlist -R

Checking the SAM log shows that SAM runs swlist -i, which would be a high level overview whereas your swlist -R equates to "-l bundle -l product -l subproduct -l fileset", which is about as thorough as you can get.


Pete

Pete
James R. Ferguson
Acclaimed Contributor
Solution

Re: sam vs. swlist -R

Hi Charlie:

The best way to query a paricular patch is probably:

# swlist -l patch -a state PHNE_32129

This shows the state of the patch if present, or all patches if you drop the specific patch argument (e.g. PHNE_32129).

You can also use:

# show_patches

...which is a nice frontend to 'swlist'.

The '-R' option of 'swlist' is a shorthand for:

# swlist -l bundle -l subproduct -l fileset

...which does not note the state of a patch(installed, applied, configured, etc.)

Regards!

...JRF...

Sivakumar TS
Honored Contributor

Re: sam vs. swlist -R


Dear Charlie,

#swlist -R is equivallent to

#swlist -l bundle -l product -l subproduct -l fileset ===> which means EVERYTHING that is installed in the system.

Whereas in SAM you can view to the product level only.

With Regards,

Siva.
Nothing is Impossible !
Charlie Hoffman
Occasional Advisor

Re: sam vs. swlist -R

I found it myself. Sam uses the default of true and shows superseded patches. Command line uses the default of false and does not show superseded patches.

show_superseded_patches=false

Displays or hides superseded patches in command line swlist output. In the default state of false, swlist will not display superseded patches even if you perform a swlist command on the superseded patch. Setting this option to true permits display of superseded patches. This option applies to command line swlist only. In an interactive session, swlist -i always shows superseded patches regardless of the value of this option.
Pete Randall
Outstanding Contributor

Re: sam vs. swlist -R

While I'm sure that's part of it, consider this:

# swlist -R |grep PH |wc -l
904
# swlist |grep PH |wc -l
2


The second example uses no options in an attempt to duplicate swlist -i that SAM does. I then ran if with the -i option and confirmed that only two patches were shown.


Pete

Pete
Steven E. Protter
Exalted Contributor

Re: sam vs. swlist -R

Shalom Charlie,

Sam has a mode that lets you see the commands it used.

You look at the patch list in sam or swlist -i and then you should be able to look at the commands issued. Then you should be able to do an apples to apples type comparision.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Charlie Hoffman
Occasional Advisor

Re: sam vs. swlist -R

Thanks for all the suggestions. I was looking for a patch that was required for an Oracle upgrade. It was PHCO_24402. Sam showed the patch as installed. Swlist -R did not show the patch at all. I could not find any option that would allow me to see the patch was ever on the system until I found the -x option that allowed me to turn off the superseded option. As soon as I changed the default option of show_superseded_patched from false to true, I could see every patch that had ever been installed on the system.

The show_patches -s provided the same information and I like that front end. I had never used or heard of that command.

The main reason I went off on this witch hunt was because I wanted to find out why there was a difference in the output of sam's swlist and the command line version. I know know the reason is that the default for command line swlist is false.

Thanks for that info.