Best way to check disk space on /Volumes/Data?

bkvines
New Contributor III

Hi Folks,

We've gone to using three partitions for our machines: Restore, Macintosh HD, and Data.

Restore contains the Casper Restore partition. Macintosh HD contains the OS and applications. Data contains the User home folders.

I know I can track free space on Macintosh HD in the JSS, but what's the best way to check the space on the Data partition?

I've gotten as far as writing an AppleScript to test the free space on the Data partition. I have an arbitrary threshhold of 90% full as my warning level. The script will return TRUE if the Data partition is 90% full or greater, it returns FALSE otherwise.

Where I'm running into a problem is figuring out how to take this information and create a Smart Group containing machines whose Data partition is 90% full or better.

I've seen some references to installing dummy packages, then creating Smart Groups based on whether a particular package is installed.

Is this the way to go, or is there a better way? And if this is the right way, is there a good reference on doing this?

--
Bryan Vines
bkvines at wgclawfirm.com

1 REPLY 1

tlarkin
Honored Contributor

You can use the du command, but mind you it takes a while to scan the whole drive. You can option out for it to only show the top level directories and their files sizes and such.

A much lighter load would be the df command which would just display the volume names and the total size, where as the du command would be more in depth. A while ago I wrote a script for basic diagnostics and published it on OSXhints.com which had a command or two to check disk space, you could take my code and rewrite it if you wanted to.

http://www.macosxhints.com/article.php?story070831171105304 ( http://www.macosxhints.com/article.php?story070831171105304 )



Thomas Larkin
TIS Department
KCKPS USD500
tlarki at kckps.org
blackberry: 913-449-7589
office: 913-627-0351