Managing NFS and NIS, 2nd Edition - Mike Eisler [221]
#
# # [ log= # [ buffer= global defaultdir=/var/nfs \ log=logs/nfslog \ fhtable=workfiles/fhtable buffer=workfiles/nfslog_workbuffer eng log=/export/eng/logs/nfslog corp defaultdir=/export/corp/logging extended logformat=extended log=extended_logs/nfslog The global tag specifies the default set of values to be used when no tag is specified in the share command. Note that the eng, corp, and extended tags do not specify all possible parameters. The global values are used, unless they are specifically replaced in the tag. Take for example: # share -o log=eng /export/eng where the NFS log file will be named nfslog and located in the /export/eng/logs directory. The work buffer file and filehandle table (explained later) remain under /var/nfs/workfiles. Any of the global values can be overridden by specific tags. The following describes each parameter in the configuration file: defaultdir= Specifies the default directory where all logging files are placed. Every tag can specify its defaultdir and override the value specified by the global tag. This path is prepended to all relative paths specified by the other parameters. defaultdir must be an absolute path, or an error is reported by the share command. In the previous sample configuration, filesystems shared with the global tag will place their work files and NFS log file in /var/nfs. Filesystems shared with the corp tag place their work files in /export/corp/logging. log= Specifies the name and location of the NFS log file. This is the file that actually contains the log of file transfers and the file that the system administrator will be most interested in. defaultdir is prepended to log to determine the full path, except in the case when log already identifies an absolute path. Using the previous sample configuration, filesystems shared with the global tag place the NFS log file in /var/nfs/logs/nfslog. fhtable= Specifies the name and location of the filehandle to path mapping database. NFS operations use filehandles and not filenames to identify the file being worked on. The nfslogd daemon builds a mapping of filehandles and stores it in the location specified by fhtable. This is explained in detail in Section 14.6.5. The path concatenation rules described earlier apply. buffer= Specifies the name and location of the temporary work buffer file, where the kernel will store the raw RPC information to later be consumed by the nfslogd daemon. This file is intended for internal consumption of the nfslogd daemon. The nfslogd daemon wakes up periodically to consume the information stored in this file. The file is backed by permanent storage, to prevent loss of RPC operation information on reboot. The nfslogd daemon will remove the work buffer file once it has processed the information. The path concatenation rules described earlier apply. logformat=basic|extended Specifies the format of the NFS log file. Two values are valid: basic and extended. The basic format is compatible with the log format generated by the Washington University's FTPd utility. The extended format provides more detailed information. Under basic format, only reads and writes are recorded. Under extended format, reads, writes, and directory modification operations (mkdir, rmdir, and remove) are reported, as well as the NFS version and protocol used in the operation. The basic format is assumed when no logformat is specified. Note that the extended format is not compatible with Washington University's FTPd log format. Using the previous sample configuration, filesystems shared with the extended tag will log extended filesystem activity in the /var/nfs/extended_logs/nfslog file. Table 14-3 defines the values for the logging files when filesystems are shared with the various tags. Table 14-3. Logging files under different tags Tag Log fhtable Buffer global /var/nfs/logs/nfslog /var/nfs/workfiles/fhtable