.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH FNOTIFYSTAT 8 "November 15, 2021" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME fnotifystat \- a tool to show file system activity .br .SH SYNOPSIS .B fnotifystat .RI [options] " [delay " [count]] .br .SH DESCRIPTION fnotifystat is a program that dumps the file system activity in a given period of time. .br Statistics are output every 'delay' seconds. One can use the 'm' (minutes), 'h' (hours), 'd' (days), 'w' (weeks) or 'y' (years) suffix to specify large delay intervals. By default the delay is 1 second. Statistics are output 'count' many times before exiting. If count is not specified then fnotifystat will run until it is stopped. Note that if no file activity has occurred during a sample delay period then no new statistics are output. The \-f option will force output if desired. By default, fnotifystat will display the following statistics every sample 'delay' seconds: .IP \[bu] 2 Average number of opens, closes, reads and writes over the sample period .IP \[bu] Average number of opens over the sample period .IP \[bu] Average number of closes over the sample period .IP \[bu] Average number of reads over the sample period .IP \[bu] Average number of writes over the sample period .IP \[bu] Process ID .IP \[bu] Pathname .br .TP The \-I option will display the device (major, minor) number and inode instead of the filename while the \-I option will just show the device (major, minor) number. .br .TP The \-c option will display the cumulative count of the open, close, read and writes rather than the averages. .SH OPTIONS fnotifystat options are as follow: .TP .B \-c dump cumulative totals over all time rather than totals over each sample period. .TP .B \-d strip full directory path off the filenames. .TP .B \-f force statistics output even if no file activity has occurred during the last sampling period. .TP .B \-D order statistics by unique device. Rather than ordering periodic statistics by unique filename, instead order them by unique device (major, minor) number. This allows one to see file activity on a per device basis. .TP .B \-h show help .TP .B \-i pathnames to include in filename activity. By default, all mounted filesystems are monitored, however, this may produce to much information. The \-i option allows one to provide a comma separated list of just the specific paths to monitor. .TP .B \-I order statistics by unique device and inode. Rather than ordering periodic statistics by unique filename, instead order them by unique device (major, minor) and inode number. .TP .B \-m merge events. The default \-v verbose output will show all new events that fnotifystat detects on a file by a specific process. The \-m option will merge all consecutive events that occur on the same file from the same process to reduce the amount of event output. .TP .B \-n no periodic statistics, just verbose mode only. Do not display periodic file activity statistics, but just show the verbose mode \-v file activity. .TP .B \-p proclist monitor specific processes. proclist is a comma separated list of process IDs or process names to monitor. .TP .B \-P sort stats by pid first, then by totals and filename .TP .B \-s turn off data scaling. By default the read, write, open and close counts are displayed by scaling by multiple of thousands with suffixes of K (thousands), M (millions), B (billions). The \-s option disables this, resulting in less aesthetically pleasing unaligned columns of data. .TP .B \-t N only display the top busiest N files. .TP .B \-T show timestamp .TP .B \-v verbose mode, dump all file activity. This will display the following file access information: .TS l. Date (in DD/MM/YY format) Time (in HH:MM:SS format) Event count Access type, O=Open, C=Close, R=Read, W=Write Process ID Process Name Name of accessed file .TE .br Note that the names of deleted filenames cannot be determined and are flagged by the "(deleted)" tag. .TP .B \-x pathnames to exclude from filename activity. By default, all mounted filesystems are monitored, however, this may produce to much information. The \-x option allows one to provide a comma separated list of pathnames to exclude. Matching is performed on partial pathnames, for example \-x /pro will exclude all paths starting with /pro, such as /proc. Note that excluding a file with \-x takes higher precedence over including a file with \-i. .TP .B SIGUSR1 Sending SIGUSR1 to fnotifystat will toggle the verbose option (\-v) on/off. .SH EXAMPLES .LP Show file activity every second until stopped. .RS 8 sudo fnotifystat .RE .LP Show the top 10 active files every 60 seconds until stopped. .RS 8 sudo fnotifystat \-t 10 60 .RE .LP Show file acivity every 10 seconds just 6 times. .RS 8 sudo fnotifystat 10 6 .RE .LP Show file activity of thunderbird and process ID 1827. .RS 8 sudo fnotifystat \-p thunderbird,1827 .RE .LP Show every file notify event and the top 20 active activity files over a single period of 5 minutes. .RS 8 sudo notifystat \-v \-d \-c 5m 1 .RE .LP Just show every file notify event on /sys and /proc and no periodic statisics. .RS 8 sudo fnotifystat \-n \-i /sys,/proc .RE .SH AUTHOR fnotifystat was written by Colin Ian King .PP This manual page was written by Colin Ian King , for the Ubuntu project (but may be used by others). .SH COPYRIGHT Copyright \(co 2014-2021 Canonical Ltd, Copyright \(co 2021-2022 Colin Ian King. .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.