Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / June 2007



Tip: Looking for answers? Try searching our database.

Get Percent of Disk Used in a C/C++ program

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Feanor - 18 Jun 2007 21:32 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?
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;
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.