Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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:

         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 haven't been able to find any function that reports this same information under Linux. Does anyone here have any suggestions?

    I'd prefer to use a function call (or calls), but if necessary I'm okay with parsing text produced by a command.

  2. #2
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts