Does anyone know of a way to do this? I am trying to pull information
about the CPU, Memory and Disk. I have the CPU and memory down, but I
can't find info anywhere on how to pull this short of writing a script
for df, which I don't want to do.
Any thoughts?
Reinder Verlinde - 18 Jun 2007 22:09 GMT
> Does anyone know of a way to do this? I am trying to pull information
> about the CPU, Memory and Disk. I have the CPU and memory down, but I
> can't find info anywhere on how to pull this short of writing a script
> for df, which I don't want to do.
>
> Any thoughts?
- Get the source for df, and see what it calls
-
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Clas
ses/NSFileManager_Class/Reference/Reference.html#//apple_ref/occ/instm/NS
FileManager/fileSystemAttributesAtPath:>
Reinder
Gregory Weston - 19 Jun 2007 02:34 GMT
> Does anyone know of a way to do this? I am trying to pull information
> about the CPU, Memory and Disk. I have the CPU and memory down, but I
> can't find info anywhere on how to pull this short of writing a script
> for df, which I don't want to do.
>
> Any thoughts?
FSGetVolumeInfo will fill out a FSVolumeInfo structure. These fields in
that structure are of interest:
UInt32 blockSize;
UInt32 totalBlocks;
UInt32 freeBlocks;