Skip to main content
Question

Casper Admin - Package Size

  • March 1, 2016
  • 5 replies
  • 10 views

Forum|alt.badge.img+12

I noticed that in Casper Admin all of my packages show "n/a" for the package size. Is this normal?

Our JSS is on a Windows server and we are running JSS 9.81.
I'm looking for a way to get the a package size with API or some way through script.

5 replies

mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • March 1, 2016

The size of packages is not stored in the API unfortunately. You'd likely need to grab the sizes with a script that mounts the DP and gets the size with du for every item in the "Packages" directory or something. Its going to be a slow script if you have an even moderate amount of packages.


Forum|alt.badge.img+16
  • Valued Contributor
  • March 1, 2016

Just use "ls -l /Volumes/YOURCASPERSHARE/Packages" in our environment at least it appears to return pretty useful results in one of the columns and it's very fast.
du seems to go wandering off inside the pkg and dmg files which is probably way more info than you need.


Forum|alt.badge.img+15
  • Contributor
  • March 1, 2016
du seems to go wandering off inside the pkg
du -d1 -h /Volumes/YOURCASPERSHARE/Packages

-d is depth and -h is human readable.


Forum|alt.badge.img+12
  • Contributor
  • March 1, 2016

Does the size of the package really matter though? I've been told it doesn't


AVmcclint
Forum|alt.badge.img+21
  • Esteemed Contributor
  • March 2, 2016

@Kedgar A package that's too big can cause problems and delay delivery of the package's contents. Packages that are smaller than expected may indicate something is wrong with how they were built. If the package you were given is all you have then make the most of it!