Disk Usage Statistics
Hello,
How do you get the disk usage statistics just like the output of "df"? I want to include this is my application. I was able to extract other information like cpu, memory, load average from the /proc file. Any ideas? thanks ferd |
Hi,
Kind of quick solution would be to just call df from your program and capture the output ... |
Thanks. I'm kind of thinking of that solution but would like to try another solution first. Perhaps a system call?
any other? |
Have a look at busybox's minimalistic implementation of df at www.busybox.net
|
what does df read from? probably /proc/diskstats ? you could parse from there
|
There's also something like statfs, try man statfs.
|
thank you for your replies. statvfs or statfs will do
|
never mind. thanks.
|
All times are GMT -5. The time now is 09:42 AM. |