{"id":810,"date":"2008-01-18T22:02:28","date_gmt":"2008-01-19T02:02:28","guid":{"rendered":"http:\/\/blogs.sungeek.net\/unixwiz\/2008\/01\/18\/quick-script-to-see-missing-patches-on-solaris\/"},"modified":"2008-01-18T23:09:35","modified_gmt":"2008-01-19T03:09:35","slug":"quick-script-to-see-missing-patches-on-solaris","status":"publish","type":"post","link":"https:\/\/blogs.sungeek.net\/unixwiz\/2008\/01\/18\/quick-script-to-see-missing-patches-on-solaris\/","title":{"rendered":"Quick Script to see missing patches on Solaris"},"content":{"rendered":"<p>Today I needed to see what patches were missing on a ton of machines. Instead of trying to start the Patch manager of the month for solaris, I wrote this little script that would produce me a HTML page of the current patches installed and ones that needed to be installed. This script is based off of the <a href=\"http:\/\/sunsolve.sun.com\/patchdiag.xref\">patchdiag.xref<\/a> available from Sun. I know there are many other tools out there such as <a href=\"http:\/\/www.par.univie.ac.at\/solaris\/pca\/\">PCA (Patch check advanced)<\/a> but in the environment I was in today, I could not use any third party programs so I wrote my own. The output looks like this:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/blogs.sungeek.net\/unixwiz\/wp-content\/uploads\/2008\/01\/picture-1.png\" alt=\"output of patch checking script\" \/><\/p>\n<p>What the script does is the following:<\/p>\n<ol>\n<li>Get a list of current patches on the machine<\/li>\n<li>Find the latest version of each patch that is installed on the machine and compare it to the latest version available according to the patchdiag.xref<\/li>\n<li>Generate one line of HTML code, listing the patch, the current installed revision and the current available revision and a description of the patch. It will also place a link to the patch on sunsolve.<\/li>\n<li>At the end it will list a summary of patches installed, missing, obsolete, and how many security and recommended patches there are.<\/li>\n<li>It will then compare the list of currently available patches against what is installed to see if there are patches that are available but not installed on the system<\/li>\n<li>If a patch has never been installed it will then list the line of HTML code showing the patch number, revision, flag (security,recommended) and its description<\/li>\n<li>At the end it will display the total number of patches that are not installed and how many are recommended and\/or security<\/li>\n<\/ol>\n<p>Basically it is a very simple script. It should work on all versions of solaris from 7+. It ONLY looks at Solaris specific patches and not those that are unbundled (i.e. Sun Studio, Web Server, etc.)<\/p>\n<p>Here is the script, it may not be the cleanest or most efficient, but it was a quick job&#8230;<\/p>\n<p><a href=\"http:\/\/blogs.sungeek.net\/unixwiz\/wp-content\/uploads\/2008\/01\/analyzepatches.txt\">Shell script to analyze solaris patches<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I needed to see what patches were missing on a ton of machines. Instead of trying to start the Patch manager of the month for solaris, I wrote this little script that would produce me a HTML page of the current patches installed and ones that needed to be installed. This script is based &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blogs.sungeek.net\/unixwiz\/2008\/01\/18\/quick-script-to-see-missing-patches-on-solaris\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Quick Script to see missing patches on Solaris&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44,16,2],"tags":[486,458,444],"class_list":["post-810","post","type-post","status-publish","format-standard","hentry","category-security","category-shell-scripts","category-solaris","tag-security","tag-shell-scripts","tag-solaris"],"_links":{"self":[{"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/posts\/810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/comments?post=810"}],"version-history":[{"count":0,"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/posts\/810\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/media?parent=810"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/categories?post=810"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/tags?post=810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}