Skip to main content
Question

Application usage statistics: How to make useful?


Forum|alt.badge.img+3
  • New Contributor
  • 3 replies

We need to view usage statistics on each of the Adobe apps we use. I can't figure out how to report the usage in the last 90 days per user. I don't even seem to get very close. Below is essentially what I'm looking for.

ComputerName, UserName, ApplicationName, Usage

laptop12, jdoe@company.com, Adobe Acrobat Pro, 23 hours

If I look at each of roughly 800 computers I can see the pretty charts that claim to show usage. Some level of data is there, but I see no way to export it to make it useful.

4 replies

Forum|alt.badge.img+10
  • Contributor
  • 26 replies
  • April 14, 2021

Hey @srenschen - did you ever find a solution for this? Im in a similar boat right now


RaymoJamf
Forum|alt.badge.img+4
  • Contributor
  • 10 replies
  • February 8, 2023

I could use the same report.  Any updates?


brockwalters
Forum|alt.badge.img+8
  • Valued Contributor
  • 64 replies
  • February 22, 2024

Here's my computer record in Jamf:

Here is the output from the API application usage endpoint. In descending chronological order (so today is at the top...):

 

curl -LsS -X GET -H 'Accept: application/json' -u "$apiuser:$apipswd" "$jamfurl/computerapplicationusage/id/1381/2022-08-15_2022-08-19" | jq '.[] | .[] | .apps | .[] | select(.name == "Safari.app")' { "name": "Safari.app", "version": "15.6.1", "foreground": 138, "open": 0 } { "name": "Safari.app", "version": "15.6.1", "foreground": 292, "open": 0 } { "name": "Safari.app", "version": "15.6.1", "foreground": 149, "open": 0 } { "name": "Safari.app", "version": "15.6", "foreground": 207, "open": 0 } { "name": "Safari.app", "version": "15.6", "foreground": 298, "open": 0 }

 

For the 15th, it shows 298m, which in the pretty bar graph is 4h58m. Not the worst, but totally workable for finding out how long an app has been used?

 

#!/bin/bash apiuser='' apipswd='' jamfurl='https://something:8443/JSSResource' objctid() { idsdat=$(/usr/bin/curl -sS -X GET -H 'accept: application/xml' -u "$apiuser:$apipswd" "$jamfurl/$1") arrsiz=$(echo "$idsdat" | /usr/bin/xmllint --xpath "//size/text()" -) for ((i=0;i<=arrsiz;i++)) { echo "$idsdat" | /usr/bin/xmllint --xpath "concat(//$2[$i]/id/text(),' ')" - ; } } id_arr=($(objctid computers computer)) for i in "${id_arr[@]}" do usage="$(curl -LsS -X GET -H 'Accept: application/json' -u "$apiuser:$apipswd" "$jamfurl/computerapplicationusage/id/$i/2022-08-15_2022-08-15" | jq -c '.[] | .[] | .apps | .[] | select(.name == "Safari.app")')" if [ -n "$usage" ] then echo "{\\"computer\\":\\"$(curl -LsS -X GET -H 'Accept: application/json' -u "$apiuser:$apipswd" "$jamfurl/computers/id/$i/subset/General" | jq -r '.[] | .[].name')\\",\\"id\\":$i,\\"usage\\":$usage}" | jq '.' fi unset i done

 

That creates a new json object for each user that used Safari on the 15th either in foreground or background with computer name & object ID & it skips users that had 0 time with Safari open (the endpoint kind of just does that naturally I am taking advantage of it...)


Forum|alt.badge.img+1
  • New Contributor
  • 3 replies
  • May 11, 2025

Try this script on github
https://github.com/omrik/jamf_it/


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings