Would it be possible to log file and directory access through nfs to a database, in a way similar to smbaudit?
The idea is to generate data that can assist in assessing what to clean up / archive and what to give a more prominent space on my fast drives. Most users access my server through nfs exports, and smbaudit of course can’t help there.
> Would it be possible to log file and directory access through nfs to a
> database, in a way similar to smbaudit?
>
> The idea is to generate data that can assist in assessing what to clean
> up / archive and what to give a more prominent space on my fast drives.
> Most users access my server through nfs exports, and smbaudit of course
> can’t help there.
You could probably use find with the -mtime or -atime (modification time
or access time) switches to look for files that are older than a certain
amount of time. Check the ‘find’ manpage for details and examples.
That won’t register files that are read and doesn’t log access frequency (for example “12x today”, “2371x last month” etc) either, I’m afraid. Was hoping for a way to log file access (read and write) to an SQL database that you can use to generate various stats.
> That won’t register files that are read and doesn’t log access frequency
> (for example “12x today”, “2371x last month” etc) either, I’m afraid.
> Was hoping for a way to log file access (read and write) to an SQL
> database that you can use to generate various stats.
Didn’t realize you were interested in access frequency (I’m not familiar
with the smb tool you referenced) - something that uses inotify would be
able to monitor file accesses and log them, but inotify itself is just an
API.
But from a standpoint of searching for a tool, looking for something that
uses inotify would probably be a good starting point.