System Administration Guide, Volume 1

CacheFS Logging

This section describes how to set up and view CacheFS logging.

How to Set Up the Logging Process

  1. Set up the logging process with the cachefslog command.

    $ cachefslog -f log-file-path mount-point


    Sets up the logging process. 


    Specifies the location of the log file. The log file is a standard file you create with an editor, such as vi. 


    Designates the mount point (cached file system) for which statistics are being collected.  

  2. Verify that you set up the log file correctly by using the cachefslog command, as follows:

    $ cachefslog mount-point

Example--Setting Up the Logging Process

The following example sets up the log file samlog to collect statistics about /home/sam. The location of samlog is /var/tmp/samlog.

$ cachefslog -f /var/tmp/samlog /home/sam
  /var/tmp/samlog: /home/sam

How to Locate the Log File

You can also use the cachefslog(1M) command with no options to locate a log file for a particular mount point.

$ cachefslog mount-point


Specifies the cached file system for which you want to view the statistics. 

Examples--Locating the Log File

The following example shows what you would see if a log file has been set up. The location of the log file is /var/tmp/stufflog.

$ cachefslog /home/stuff
	 /var/tmp/stufflog: /home/stuff

The following example shows that no log file has been set up for the specified file system.

$ cachefslog /home/zap
	not logged: /home/zap 

How to Stop the Logging Process

Use the -h option of the cachefslog(1M) command to stop the logging process.

$ cachefslog -h mount-point

Example--Stopping the Logging Process

The following example halts logging on /home/stuff.

$ cachefslog -h /home/stuff
not logged: /home/stuff

If you get a system response other than the one specified in the above example, you did not successfully stop the logging process. Check to see if you are using the correct log file name and mount point.