6 Replies Latest reply on Sep 23, 2015 10:42 AM by Rob Slattery

    BLCLI Used For Listing Hotfixes w/n Smartgroup

    Rob Slattery

      Would the following BLCLI command list the hotfixes within windows smartgroups or will it just display a list of smartgroups?

       

      From  the BLCLI_83.PDF:

       

      59.13.4 Example

      The following example shows how to list all thedepot objects in the group catalog1.

       

      blcli PatchCatalog listAllByCatalogNameAndType catalog1 "WINDOWS_CATALOG_GROUP"

       

      Our goal is to list all of the hotfixes with smartgroups.

        • 1. Re: BLCLI Used For Listing Hotfixes w/n Smartgroup
          Rob Slattery

          That BLCLI command just does not work for us but I found a new script on the communities that does work.  However, after running the script, you can't click on job results without the BladeLogic GUI freezing and, you have to force-close the client.  We modified the original script so we can use parameter settings (point to different OS platform or different patch smartgroups).

           

          I opened a BMC ticket to see if we can figure out why the GUI freezes and I'll update this thread when fixed.  If anyone has any clues on why the script freezes, please let me know.  Thanks everyone!!

           

          !/bin/nsh

          HOSTNAME=$NSH_RUNCMD_HOST

           

          rm -f //${HOSTNAME] /tmp/all_patches.csv

           

          sgType=$1      

           

          # 5017 for Windows

          # 5018 for Red Hat

          # 5019 for Solaris

          # 5046 for AIX

          # 5024 for Other Linux

           

          catalogPath=$2

          # Example:/Patch/Windows/Windows Patch Catalog

           

          sgName=$3

          # Example:Approved Patches

           

          blcli_connect

           

          catalogPath="$2"

          sgName="$3"

           

          blcli_execute Group groupNameToId "${catalogPath}/${sgName}" ${sgType}

          blcli_storeenv sgId

          blcli_execute DepotObject findAllHeadersByGroup ${sgId}

          blcli_execute SDepotObjectHeader getName

          blcli_execute Utility setTargetObject

          blcli_execute Utility listPrint > //${HOSTNAME}/tmp/win_allpatches.csv

          blcli_disconnect

          • 2. Re: BLCLI Used For Listing Hotfixes w/n Smartgroup
            Bill Robinson

            click on what job results ?  you ran this as a script ?  why do need this info ?

             

            i'd assume that the job results panel freezing is a result of the size of the job_run_event table and your blade admins need to work on cleanup of that table.

            • 3. Re: BLCLI Used For Listing Hotfixes w/n Smartgroup
              Rob Slattery

              I was thinking the same thing, why do we need to click on the job results in the first place since we're exporting; we don't.  However, we're going to be moving this script into production for all of our teams to use and if someone decides to view the job results, this will cause issues for us.

               

              job_run_event table, is this something our oracle db's would work on?  Also, I ran a patch analysis job against several targets and when finished, I reviewed the job results with no problems, Blade client did not freeze.

              • 4. Re: BLCLI Used For Listing Hotfixes w/n Smartgroup
                Bill Robinson

                Right – but if you are writing the results to a file, why do you need to open the job ?

                 

                And why do you even need to do this in the first place ?

                • 5. Re: BLCLI Used For Listing Hotfixes w/n Smartgroup
                  Rob Slattery

                  Here's the reason we're wanting this:  People are still comparing what BladeLogic catalog contains with what Qualys and BOA have approved to patch.

                  • 6. Re: BLCLI Used For Listing Hotfixes w/n Smartgroup
                    Bill Robinson

                    ok, so the list of patches should be in here:

                    //${HOSTNAME}/tmp/win_allpatches.csv

                     

                    what's in that file ?