I am trying to determine patch levels and how long some Solaris machines have been without patching in order to support triaging which systems to patch first. How can I determine the last time a Solaris machine was patched?
I am trying to determine patch levels and how long some Solaris machines have been without patching in order to support triaging which systems to patch first. How can I determine the last time a Solaris machine was patched?
I dunno about determinng the last time a solaris box was patched, but you can work out the patch level with showrev -p
Well, don't know any good direct ways, but these might help. 'showrev -p' will tell you all the installed patches. And I guess the dates in /var/sadm/pkg would be from the last time the packages were modified (or patched).
I'll agree with the above showrev -p comments and add that uname -a to get the kernel version is also useful to give a general picture.
You should check first /etc/release that shows which version of Solaris was originally installed, then check with 'uname -a' which kernel patch are you currently using (it's the number XXXXXX-XX that shows up) then start comparing the kernel patches with the other machines, the kernel patch is a critical component so a newer kernel patch usually means a more up to date system in almost every aspect.
And then if you're not a faint of heart you can use the (unofficial) PCA tool to update your systems automatically just by providing a valid SunSolve account.
To determine how long a Solaris (10) system has been without patching, I remotely check the following (from a Linux system, because GNU
date
is handy).1) Remotely grab the date/time from the most recent thing in the
patch
directory;(See below for the explanation of the
ls
options)Note; The
awk
command prints the date in theMMM DD YYYY HH:mm:ss
format;2) Calculate
$days_since
withdays_since{}
(this works inksh
, might inbash
);Now we know that Solaris 10 system hasn't been patched in 192 days! :)
Quick reference for the Solaris 10
ls
command;