Usage Data Application Path

Since Oracle has decided to start charging for Java Runtime, I have been trying to gather data to determine the cost of licensing, and to remove Oracle Java where it is not needed.

I would like to know all of the application paths for java.exe in order to determine the application running java.exe. I can see the paths in Bigfix Inventory, but not merged with usage data. I have merged the file path report and the usage report from BFI, but I was wondering if it would be possible to find all of the application usage paths and usage data in one analysis in Bigfix.

Thanks to another thread, I was able use the following statement to get the “Java.exe Days Last Used”. If usage path could be added to this, I think that would really be great.

if exists keys whose (exists value “DisplayName” whose (it as string as lowercase contains “java”) of it) of keys “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of (x64 registries;x32 registries) then if exists application usage summary “java.exe” then ((last time seen of application usage summary “java.exe” - now) / day * -1) as string else “never used” else “not installed”

I was happy to find that there is an inspector for the path.

image paths of instances of application usage summaries “java.exe”

Now the problem is that it is not correct. It is returning “c:\Program Files (x86)\Java\Jre7\bin\java.exe”, and I do not have 7 installed. Java 8 is the only version installed. The path should be “c:\Program Files (x86)\Java\Jre8\bin\java.exe”.

Where is “instances of application usage summaries” looking to get it data?

1 Like

“instances of application usage summary” appears to be querying the folder C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData__Global\UsageData to get its data. When I open the file C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData__Global\UsageData\java.exe.stat, I can see the path to Java 7. Bigfix appears to update these .stat files when the application is used. So, the last time java.exe was used, it was actually Java 7.

1 Like

It seems that the design of application usage presumes that every executable is uniquely named. So for open source products released by multiple vendors (like java) the path data gets overwritten every time. One solution might be for IBM/HCL to rewrite the tracking based on the full path name, not just the executable file name.

2 Likes

The system is supposed to be able to handle exactly this scenario with the instances. There should be multiple instances when calling https://developer.bigfix.com/relevance/reference/application-usage-summary-instance.html

What version of the platform is in question here?

We are running 9.5.8.38 of Bigfix.

There were some issues with the inspector in 9.5

The current agents definitely handle this properly and I’m trying to find out when the defect was fixed.

It looks like 9.5.9 was the version it was fixed in

See https://support.bigfix.com/bes/changes/fullchangelist-95.txt
Issue 159724 - Instances of Application Usage Summary wrongly calculates values for the same process in many paths

Is there a work around? It is going to take me a couple of weeks to get upgraded.

AlanM, Would this bug cause the “Initiate Software Scan” to fail in some instances? I have about 400 failures. It is failing on the following statement.

concatenation “%0a” of (unique values of (name of it as string & “;” & (if (exists image path of it) then (preceding text of last (if (name of operating system as lowercase starts with “win”) then “” else “/”) of image path of it as string) else “”) & “;” & ((year of it as string & month of it as two digits & day_of_month of it as two digits) of (date (universal time zone) of it) & (two digit hour of it & two digit minute of it & two digit second of it) of time (universal time zone) of it) of (first start time of it) & “;” & ((year of it as string & month of it as two digits & day_of_month of it as two digits) of (date (universal time zone) of it) & (two digit hour of it & two digit minute of it & two digit second of it) of time (universal time zone) of it) of (last time seen of it) & “;” & (total duration of it / (second / 1000)) as string & “;” & total run count of it as string) of (instances of application usage summaries whose (not exists matches (regex"^[C|c][C|c][M|m].*[T|t][M|m][P|p]$") of name of it)))

It appears that

image paths of application usage summary “filename” does not work for AIX and Linux. Is that correct? If so, would it be possible to add?

Alan, within the usage files is there a separate usage number per path. If not, I don’t see how relevance could calculate usage by path. Do you have the layout of the usage file? Is there a relevance statement that will report usage by path? There is relevance to report multiple paths, but there doesn’t appear to be a way to get usage by path.