Posted on 03-01-2016 11:48 AM
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.
Posted on 03-01-2016 11:52 AM
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.
Posted on 03-01-2016 11:59 AM
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.
Posted on 03-01-2016 12:03 PM
du seems to go wandering off inside the pkg
du -d1 -h /Volumes/YOURCASPERSHARE/Packages
-d is depth and -h is human readable.
Posted on 03-01-2016 12:43 PM
Does the size of the package really matter though? I've been told it doesn't
Posted on 03-02-2016 04:33 AM
@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!