How To Quickly Get A List Of All Applications Installed On Your UNIX/Linux Machines

Want to support HowtoForge? Become a subscriber!
 
Submitted by EugeneR. (Contact Author) (Forums) on Thu, 2014-08-21 16:44. :: CentOS | Debian | Fedora | Kernel | Linux | SuSE | Ubuntu

How to quickly get list of all applications installed on your UNIX/Linux machines

In this tutorial I'll try to present how to quickly get the list of all applications installed on UNIX/Linux hosts. The procedure applies to the most popular UNIX/Linux distributions but is also applicable to windows hosts and some other hardware (e.g. firmware version on routers etc.). The procedure could help you track your software inventory and get notifications whenever users install/uninstall applications on their machines.

Step 1: Preparing UNIX/Linux hosts (important)

Note that data about installed applications will be collected via SNMP. In order to properly discover and collect data from hosts using SNMP, it's necessary to install and enable the SNMP Agent on the device itself also make sure that SNMP protocol is enabled on your firewall.

Step 2: Discovering UNIX/Linux machines

I'll be using free version of Verax NMS & APM because of its installed software monitor (it's limited to 10 devices but it should be enough for small network). The first thing you need to do after installation is to let system discover all your UNIX/Linux machines.
  1. Click the Discovery button from the options panel in the upper-right corner and go to Scan networks tab.
  2. Select Add from the menu and click Go.
Click to enlarge
Figure 1: Scan definition
  1. Now, you have to specify your network settings - just fill in the basic mandatory parameters such as IP addresses range in the network section and select SNMP login credentials. You can leave additional parameters in default.
  2. Click Save changes to confirm.
Click to enlarge
Figure 2. Settings dialog
  1. Now, select the network you've just added and click the Discover now button.
  2. The scan process will take a couple of minutes, depending on the size of your network (it's faster to start the discovery process for a single network at a time, instead of multiple networks simultaneously).The bar on the top of the view will display the current progress of the discovery process. Once the scan process has been completed, you will be shown the scan results.
  3. Select all your UNIX/Linux machines (all with "Unix Host" in Device Type column) and click Next.
Click to enlarge
Figure 3. Network scan results with selected UNIX Host

  1. For all selected devices the system automatically discovers interfaces, processors, disks, etc. it will also configure default monitors including Installed software sensor, which we needed to collect data about installed applications.

Note: Discovered applications/services tabs contain the list of services or applications such as database servers that can be monitored as separate entities. They do not contain information about desktop applications such as web browsers, etc.

Click to enlarge

Figure 4. Discovery completed
  1. Click Finish button on the top bar in order to finish discovery.
  2. Right now, your UNIX/Linux machines are added to the inventory and have initial set of monitors added including the installed software sensor. All discovered machines will be visible in the Network view as well as in Home view.
  3. At this point, each machine have Installed Software Sensor attached which will routinely probe for data regarding installed software. In order to see the full list of monitors attached to a device during discovering, select desired device from aspects tree (Home view) and click Monitors tab.
Click to enlarge
Figure 5. Installed Software Sensor on the Sensors list in Monitors tab.

Step 3: Displaying installed software sensors list

  1. The information collected by the Installed Software Sensors is aggregated and displayed in Software inventory view.
  2. To display Software inventory click Software in the main menu.
  3. Since, it's the first time use the system will ask if you want to build the installed software database - click Yes.

Note: it may take a few minutes before sensors collect initial data, so don't panic if you get an error, just wait 2-3 minutes.

The Software view contains the list of applications installed on all your UNIX/Linux machines. You can browse the inventory (by app, by device, etc.) or export it to a CSV.
To see software installed on a particular machine, you can use filters (left-bottom corner) or you can select device from aspects tree (home view) and click its Software tab.

Click to enlarge

Click to enlarge
Figure 7. Inventory of software installed on UNIX/Linux machines

By default, software inventory is updated once a day (based on a data collected by sensors). If you want to see the current status of your software inventory select Update software inventory option from menu and click Go.

Important: As mentioned before the Software inventory is updated once a day. Installed software sensors added during discovering also have probing interval set to "1day" which means that they will collect data once a day. If you want to collect data more often you have to change (decrease) sensors' probing intervals.

Changing probing interval

If you want to change probing interval for software sensor (e.g. to 10 min), perform the following steps:

  1. Click Network from the main menu to display the list of all devices.
  2. Select desired machines by selecting their corresponding check boxes in the first column.
  3. Select Edit selected from the action menu and click Go.
  4. The edit window shows up. Go to the Sensors tab.
  5. Find Installed Software Sensor and select Edit action. Change the probing interval (make sure that field-corresponding box is checked) and click Finish.
  6. Click Save changes to confirm.

About alerting

By default, information about changes in software inventory (users installing/uninstalling their applications) will appear as an "Informational" events in Events view (click Events in main menu).
You can set up separate alarms, notifications and other procedures (e.g. run script, rise a ticket in helpdesk, etc.) using event processing rules, however to keep this tutorial as short as possible I won't be describing how to do this now.

Click to enlarge
Figure 8. Event

Appendix: adding Installed Software Sensor manually

In case you don't want to add sensors automatically during network discovery, this part shows how to manually add sensors for already monitored machines.

  1. Click Network from the main menu to display the list of all network devices.
  2. Select devices by selecting their corresponding check boxes in the first column.
  3. Select Edit selected from the action menu.
Click to enlarge
Figure 9. Devices list in Home view.
  1. The edit window shows up. Go to the Sensors tab.
  2. Select Add from the action menu and click Go. The wizard dialog is displayed.
  3. Select Installed Software Sensor under the Advanced and click Next.
Click to enlarge
Figure 10. Sensor wizard dialog.
  1. You can now specify
sensor probing interval or other parameters and click Finish.
  • Click Save changes to confirm.
  • The alternative way to do this is to select all machines in Network view and select "rediscover" option from the menu.


    Please do not use the comment function to ask for help! If you need help, please use our forum.
    Comments will be published after administrator approval.
    Submitted by Anonymous (not registered) on Sat, 2014-09-06 09:58.

    Is it possible to take the list of software that is installed on a machine and identify the packages that were installed after the base version was installed.  ie the packages  that one installs which are not in the original distribution.  Then use this list to create a way of  installing the list on the same machine if  problem has arisen or to us it to install the packaged on an updated machine.  ie going from Fedora 19 to Fedora 20   where Fedora 20 is a clean install and not up just upgraded?

     

     

    Submitted by Anonymous (not registered) on Fri, 2014-08-22 22:47.
    You said "I'll be using free version of Verax NMS & APM because of its installed software monitor", but according to the web site link above there is no free version for Linux/Unix!!!
    Submitted by Frankish (not registered) on Fri, 2014-08-22 12:48.
    on Debian(ish): dpkg --get-selections > installedapps.txt