Operating System - HP-UX
1831555 Members
3777 Online
110025 Solutions
New Discussion

number of installed patches

 
SOLVED
Go to solution
John Lipsitz
Occasional Contributor

number of installed patches


How can I find out the EXACT number of patches installed on my system ?
5 REPLIES 5
Mateja Bezjak
Respected Contributor

Re: number of installed patches

Hi,

You can see all the patches installed on the system in /var/adm/sw/patch directory.

Regards,
Mateja
U.SivaKumar_2
Honored Contributor

Re: number of installed patches

Hi,

#cd /var/adm/sw/products
#ls -d P*

will give you list of all the patches in the system.
regards,
U.SivaKumar
Innovations are made when conventions are broken
Stefan Farrelly
Honored Contributor
Solution

Re: number of installed patches


The best way to see the number of "applied" patches (ie. active) is;

swlist -l patch | grep applied | wc -l

If you leave off the grep applied you will see all old superceeded patches also, I preusme you only want to see applied/active patches ?
The above command lists all filesets for these applied patches, patches usually have > 1 filesets in them. If you just want to see the numer of applied individual patches (even if they do have multiple filesets) do;

swlist -l patch|grep applied|sed 's/\./ /g'|awk '{print $1}'|grep PH|sort -u|wc -l


Im from Palmerston North, New Zealand, but somehow ended up in London...
Mateja Bezjak
Respected Contributor

Re: number of installed patches

Hi,
My previous answer is true for a 10.20 system. For 11.0 and 11i, you should ls /var/adm/sw/products directory.

Regards,
Mateja
brian_31
Super Advisor

Re: number of installed patches

Hi:

I would like to differ with others' opinion about the patches as they would be a lot of repetition based on dependencies. show_patches|wc -l would give the exact no. of applied patches.

Thanks
Giri.