Results 1 to 2 of 2
I'm porting some FreeBSD code I wrote to Linux and I'm having difficulty with the statfs structure. BSD has additional fields in this structure that I'm interested in collecting in ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-15-2010 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 32
Is there equivalent to missing statfs fields in Linux?
I'm porting some FreeBSD code I wrote to Linux and I'm having difficulty with the statfs structure. BSD has additional fields in this structure that I'm interested in collecting in the Linux port:
I haven't been able to find any function that reports this same information under Linux. Does anyone here have any suggestions?Code:uint64_t f_files; /* total file nodes in filesystem */ uint64_t f_syncwrites; /* count of sync writes since mount */ uint64_t f_asyncwrites; /* count of async writes since mount */ uint64_t f_syncreads; /* count of sync reads since mount */ uint64_t f_asyncreads; /* count of async reads since mount */
I'd prefer to use a function call (or calls), but if necessary I'm okay with parsing text produced by a command.
- 01-13-2011 #2Just Joined!
- Join Date
- May 2008
- Posts
- 9
Are you trying to compare the directory structure of UFS2 to Ext3?
FreeBSD uses UFS2, UFS2+ZFS, or ZFS as the file system. A Linux based distribution may be using Ext2/2/4, Reiser, or some other filing system with different setting and nodes.
Try using the mailing list for Debian/kFreeBSD for help.


Reply With Quote
