Snow Inventory Java Scanner

Version 1.0

2021-09-01

Description

The Snow Inventory Java Scanner is a Java application and a component of Snow's Oracle Management Option.

The Snow Inventory Java Scanner is platform-independent, which enables it to run on a variety of operating systems. This initial version collects data related to Java Version 7 and higher.

Note

The inventory data collected by the scanner reflects a snapshot of the Java environment at the instant when the inventory scan is performed.

Prerequisites

  • Dependency on other Snow products

    The Snow Inventory Java Scanner is dependent on Snow Inventory Agents version 6.0.0 or higher, and compatible with Snow Inventory Server 6.0.2 or higher.

  • Java runtime environment

    Snow Inventory Java Scanner requires Java Runtime Environment 6 (1.6), 7 (1.7) or 8 (1.8) installed on the target computer. For improved performance, Snow recommends using Java Runtime Environment 8.

    Supported versions of Java Runtime Environments are Oracle Java SE and Oracle OpenJDK (versions 6, 7 and 8).

    Note

    The Java Runtime Environment (JRE) 1.7.0_07 contains a defect that causes Oracle inventory to fail. Any server running JRE 1.7.0_07 must be upgraded to a later version for the Snow Inventory Java scanner to function correctly.

  • Permissions and environment variables

    The operating system user running the Snow Inventory Java Scanner needs the following permissions and environment variables, depending on the platform:

    Platform

    Permissions and environment variables

    Linux

    Write permissions to /var/run/SnowSoftware/Inventory/Agent/script-output are required.

    Unix

    Write permissions to /var/tmp/SnowSoftware/Inventory/Agent/script-output are required.

    Windows

    An admin user account (Local Admin on the server) should be used when running the Snow Inventory Java Scanner.

Deployment

The Snow Inventory Java Scanner can be packaged and deployed separately, or together with Inventory Agents. Snow recommends you deploy this component using a Snow Inventory Agent installation package.

Files and locations scanned

The Snow Inventory Java Scanner requires access to the following files for the scan:

When running the scan with root permissions is not possible, the operating system user that is executing the Java scan will need permissions for every JAVA_HOME path location.

Scanning active Java processes

The Snow Inventory Java Scanner requires access to JDK's JCMD utility in order to find active java processes and detect the usage of the Java Flight Recorder commercial feature. The following JCMD commands are used:

- jcmd -l

- jcmd {process_id} VM.system_properties

- jcmd {process_id} VM.check_commercial_features

Output

The data retrieved by the Snow Inventory Java Scanner is stored in a snowpack file and placed in one of the following designated locations, depending on the platform.

Platform

Output path

Linux

/var/run/SnowSoftware/Inventory/Agent/script-output/<script_name>

Unix

/var/tmp/SnowSoftware/Inventory/Agent/script-output/<script_name>

Windows

%ProgramData%/SnowSoftware/Inventory/Agent/script-output/<script_name>

Snow Inventory Agents version 6 or higher search these designated locations for output from other Snow Inventory components such as Snow Inventory Java Scanner, or other scripts.

Install and schedule Snow Inventory Java scanner

Install Snow Inventory Java Scanner

The Snow Inventory Java Scanner is a component of Snow's Oracle Management Option. To install it:

  1. Specify that the Java Scanner Option needs to be included when requesting a Snow Inventory Agent deployment package.

  2. Install the Snow Inventory Agent, as described in the user guides for the Snow Inventory Linux, Unix, or Windows Agents, respectively.

Schedule the scan in a Linux or Unix environment

In Linux and Unix environments, the scanner is triggered through a crontab job.

  • Run the following crontab to schedule the execution of the scanner:

    # run five minutes after midnight, every day

    5 0 * * * $JAVA_HOME/bin/java -jar /opt/snow/sijs.jar

Schedule the scan in a Windows environment

In a Windows environment, the scanner is triggered by a powershell script.

  • Run the following command to schedule the execution of the scanner:

    $java -jar sijs.jar