[linux-cifs-client] mountstats

Steve French smfltc at us.ibm.com
Tue Aug 8 22:21:44 GMT 2006


Why are mountstats per process (e.g. "cat /proc/1/mountstats")?

The only fs which exports these appears to be nfs.   Although it is 
probably a good idea to export them for cases like nfs (and cifs and 
some clusterfs) by calling show_stats in fs/namespace.c etc.    These 
stats appear to have nothing to do with per-process data and are rather 
per-superblock.

NFS for example shows:
device localhost:/test-share mounted on /mnt with fstype nfs statvers=1.0
        opts:   
rw,vers=3,rsize=32768,wsize=32768,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,hard,proto=tcp,timeo=600,retrans=3,sec=sys 
age: 2436
        caps:   caps=0x9,wtmult=4096,dtsize=4096,bsize=0,namelen=255
        sec:    flavor=1,pseudoflavor=1
        events: 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
        bytes:  0 0 0 0 0 0 0 0
        RPC iostats version: 1.0  p/v: 100003/3 (nfs)
        xprt:   tcp 721 0 2 0 0 6 6 0 6 0
        per-op statistics
                NULL: 1 1 0 44 24 0 0 0
             GETATTR: 1 1 0 100 112 0 0 0
             SETATTR: 0 0 0 0 0 0 0 0
              LOOKUP: 1 1 0 128 116 0 0 0
              ACCESS: 1 1 0 112 120 0 0 0
            READLINK: 0 0 0 0 0 0 0 0
                READ: 0 0 0 0 0 0 0 0
               WRITE: 0 0 0 0 0 0 0 0
              CREATE: 0 0 0 0 0 0 0 0
               MKDIR: 0 0 0 0 0 0 0 0
             SYMLINK: 0 0 0 0 0 0 0 0
               MKNOD: 0 0 0 0 0 0 0 0
              REMOVE: 0 0 0 0 0 0 0 0
               RMDIR: 0 0 0 0 0 0 0 0
              RENAME: 0 0 0 0 0 0 0 0
                LINK: 0 0 0 0 0 0 0 0
             READDIR: 0 0 0 0 0 0 0 0
         READDIRPLUS: 0 0 0 0 0 0 0 0
              FSSTAT: 0 0 0 0 0 0 0 0
              FSINFO: 1 1 0 100 80 0 4 4
            PATHCONF: 0 0 0 0 0 0 0 0
              COMMIT: 0 0 0 0 0 0 0 0

Is there another path (other than read of /proc/<pid>/mounstats) which 
ends up in s_op->show_stats?

Seems logical to map cifs's /proc/fs/cifs/Stats to this as well as that 
already does per-mounted share (close enough to per-mount)
stats including:

SMBs: 6 Oplock Breaks: 0
Reads:  0 Bytes: 0
Writes: 0 Bytes: 0
Locks: 0 HardLinks: 0 Symlinks: 0
Opens: 0 Closes: 0 Deletes: 0
Mkdirs: 0 Rmdirs: 0
Renames: 0 T2 Renames 0


More information about the linux-cifs-client mailing list