8 Replies Latest reply on Oct 31, 2008 7:31 AM by Gerardo Bartoccini

    How to report on SW inventory 2

    Gerardo Bartoccini



      I have to report on what we call "native" software, i.e. the software that registers itself in the OS software repository.

      This means that this software is available through the OS commands such as swlist, pkginfo, rpm, etc.


      For Linux, AIX and HP-UX, software info and versions are available by default. I have edited the Windows and Solaris os_config sommands in order to include software versions, according to something I found in another topic. I'm copying the blquery commands here just for reference:




      blquery -E //$

      /Scripts/windows_software_inventory.blq | csv2xml -x -r cat windows_software_inventory.blq printf ("Name,Version\n"); package_record_count ('NAME = "*" && printf ("%s,%s\n", NAME, VERSION)'); Solaris ======= blquery -E //$$
      /Scripts/solaris_software_inventory.blq | sed 's/,/ /g;s/#/,/g;s/ REV=/,/g' | csv2xml -x -r


      cat solaris_software_inventory.blq

      printf ("NameDescription#Category#Version#Revision\n");

      package_record_count ('NAME = "*" && printf ("%s#%s#%s#%s\n", NAME, DESCRIPTION, CATEGORY, VERSION)');


      (the sed commands are needed since commas are included in the output. PropertiesDataDescription.xml must be edited accordingly and load_warehouse_schema script must be run)


      I built quite good-looking reports with, for all OS's: Server Name, OS Name, OS Version, Software Name, Software Version.

      I have also scheduled them so that they are stored somewhere on the report server file system once a week.


      Now, my doubt (let's take Solaris as an example, but it works for all systems):

      The software info is available on the OS (e.g.: pkginfo -l VRTSvxvm).

      Instead, in our case this info is retrieved by os_config script through blquery, converted to csv, then to xml, then it's populated into the reports db, then extracted by means of a scheduled report and exported to csv.


      This sounds a bit crazy to me. Besides, I get 5 reports (one per OS) for each software, so I have to find a way to merge them (basically, the customer is asking a simple question: how many Veritas Volume Manager installations do I have on my data center?)


      I'm planning to manually parse the csv files in order to aggregate the info, but, before I start, I would like to understand if there is a smarter way of doing this.


      (one option: create a shell script that runs the os_config commands (blquery, swlist, etc.) and creates a csv file with all the info. This would completely skip report server. Does that makes sense?)


      Sorry for the long message