From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve French Subject: mountstats Date: Tue, 08 Aug 2006 17:21:44 -0500 Message-ID: <44D90E78.4060006@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-cifs-client@lists.samba.org Return-path: Received: from e1.ny.us.ibm.com ([32.97.182.141]:22422 "EHLO e1.ny.us.ibm.com") by vger.kernel.org with ESMTP id S1030327AbWHHWVF (ORCPT ); Tue, 8 Aug 2006 18:21:05 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e1.ny.us.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k78ML4mm013835 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 8 Aug 2006 18:21:04 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay02.pok.ibm.com (8.13.6/NCO/VER7.0) with ESMTP id k78ML4wK280026 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 8 Aug 2006 18:21:04 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k78ML4dK017323 for ; Tue, 8 Aug 2006 18:21:04 -0400 To: linux-fsdevel@vger.kernel.org Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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//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