/etc/nfs/nfslog.conf
File
This file defines the path, file names, and type of logging to be used by
nfslogd
. Each definition is associated with a tag. Starting NFS server
logging requires that you identify the tag for each file system. The global tag defines the
default values.
Note:
NFS Version 4 does not support NFS server logging.You can use the following parameters with each tag as needed.
-
defaultdir=
path -
Specifies the default directory path for the logging files. Unless you specify differently, the default directory is
/var/nfs
. -
log=
path/filename -
Sets the path and file name for the log files. The default is
/var/nfs/nfslog
. -
fhtable=
path/filename -
Selects the path and file name for the file-handle-to-path database files. The default is
/var/nfs/fhtable
. -
buffer=
path/filename -
Determines the path and file name for the buffer files. The default is
/var/nfs/nfslog_workbuffer
. -
logformat=
basic|extended -
Selects the format to be used when creating user-readable log files. The basic format produces a log file that is similar to some
ftpd
daemons. The extended format gives a more detailed view.
If the path is not specified, the path that is defined by defaultdir
is used. Also, you can override defaultdir
by using an absolute
path.
To identify the files more easily, place the files in separate directories. The following example shows the changes that are needed.
Example 7-1 Sample NFS Server Logging Configuration File
# cat /etc/nfs/nfslog.conf
#ident "@(#)nfslog.conf 1.5 99/02/21 SMI"
#
.
.
# NFS server log configuration file.
#
global defaultdir=/var/nfs \
log=nfslog fhtable=fhtable buffer=nfslog_workbuffer
publicftp log=logs/nfslog fhtable=fh/fhtables buffer=buffers/workbuffer
The example shows a file system that is shared with
log=publicftp
. A file system that is shared with
log=publicftp
uses the following values:
-
The default directory is
/var/nfs
. -
Log files are stored in
/var/nfs/logs/nfslog*
. -
File-handle-to-path database tables are stored in
/var/nfs/fh/fhtables
. -
Buffer files are stored in
/var/nfs/buffers/workbuffer
.
For information about enabling NFS server logging, refer to How to Enable NFS Server Logging.