cachefsstat Command

Purpose

Displays information about a cache file system.

Syntax

cachefsstat [ -z ] [ path... ]

Description

The cachefsstat command displays statistical information about the cache file system mounted on path. The statistical information includes cache hits and misses, consistency checking, and modification operations. If path is not specified, all mounted cache file systems are used. cachefsstat can also be used to reinitialize this information (see -z flag).

The statistical information includes the following:

Item Description
hit rate The percentage of cache hits over the total number of attempts, followed by the actual numbers of hits and misses.
consistency checks The number of consistency checks performed, followed by the number that passed, and the number that failed.
modifies The number of modify operations, including, for example, writes and creates.

Flags

Item Description
-z Reinitializes, zeros, statistics. Execute cachefsstat -z before running cachefsstat again to gather statistics on the cache performance. This flag can only be use by the superuser. The statistics printed reflect those just before the statistics are reinitialized.

Exit Status

The following exit values are returned:

Item Description
0 success
non-zero an error has occurred.

Examples

  1. To display the cache file system statistics of the /home/sam directory, type:
    cachefsstat /home/sam
    The system displays the following:
    cache hit rate: 73% (1234 hits, 450 misses) consistency checks: 700 (650 pass, 50 fail) modifies: 321

Files

Item Description
/usr/sbin/cachefsstat Contains the cachefsstat command.