Casper Admin - Package Size

jleomcdo
Contributor

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 5

mm2270
Legendary Contributor III

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.

Look
Valued Contributor III

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.

thoule
Valued Contributor II
du seems to go wandering off inside the pkg
du -d1 -h /Volumes/YOURCASPERSHARE/Packages

-d is depth and -h is human readable.

Kedgar
Contributor

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

AVmcclint
Honored Contributor

@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!