From: Glynn Clements Subject: Re: Monitoring file usage Date: Thu, 15 Jul 2004 10:04:06 +0100 Sender: linux-admin-owner@vger.kernel.org Message-ID: <16630.18566.977668.15466@cerise.nosuchdomain.co.uk> References: <1089880077.6633.8.camel@zebra.vil.ite.mee.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1089880077.6633.8.camel@zebra.vil.ite.mee.com> List-Id: Content-Type: text/plain; charset="us-ascii" To: Paul Furness Cc: linux-admin@vger.kernel.org Paul Furness wrote: > Can anyone give me any pointers to info about monitoring file access on > a linux file server? > > I am fairly easily able to monitor how much space is used, how many > files there are, who owns them and so on, but what I really need is a > log of who accessed what file, the time they did it and how long they > had it open for. > The file systems are shared using nfs and samba, so users could use > either of those methods to access the file. I guess that I could > probably get somewhere by turning up the debug level on the daemons, but > I feel that would put a big load on the server and log a lot of other > information that I don't want. Logging all file access would probably impose a significant load however you do it. If the daemons provide an option to log file accesses, that's likely to be the best solution. Otherwise, I suspect that the alternative is to modify the kernel, i.e. add some printk() calls to the filesystem code. -- Glynn Clements