Wednesday, March 14, 2007

Check Solaris Patch Levels

I had to upgrade a workstation today and needed to check the patch levels. Here's the commands.

# showrev -p
or
# patchadd -p

Recommend you use showrev -p since it's a binary program. The patchadd utility is a script; therefore, it takes awhile to run.

2 comments:

zogness said...

Actually, this post tells me nothing. How do I understand the output of the command?

Pasquale said...

Useful ways to use showrev:
Say you know the name of the file you want to upgrade. I use as my example, Xsun -- the X server for Solaris:
which Xsun
file /usr/openwin/bin/Xsun
grep Xsun /var/sbin/install/contents
# Look for package names at eol
pkginfo -l SUNWxwplt
showrev -p | grep SUNWxwplt

This should give you just a few hits such as "123611-04" which you can then go to SunSolve and find patches for, or at least find out the latest recommended level, bug lists, etc. Also, presumably the "Packages:" section of the showrev output lists the packages in order of importance, so I'd look at the entries with my package listed first.