Veritas™ File System 5.0.1 Programmer's Reference Guide

3
Read the FCL file and update the index accordingly.
$ vxfs_fcl_read(fh, buf, BUFSZ, FCL_ALL_v4_EVENTS, &nentries)
4
Get the cookie and store it back in the file.
$ vxfs_fcl_getcookie(fh, &cookie)
$ write(fd, cookie, sizeof(struct fcl_cookie));
Computing a usage profile
This sample application computes the usage profile of a particular file, that is,
the users who have accessed a particular file in the last hour.
Initial setup
This sample application needs additional information such as tracking file opens
and access information, which are available only with FCL Version 4. Be sure to
enable the correct FCL version.
The following steps perform the required initial setup.
To setup up the application
1
Switch on the FCL with Version 4.
$ fcladm —o version=4 on mntpt
If this step fails, use fcladm print to check for an existing FCL Version 3
file. If present, remove it with fcladm rm and then try switching on FCL with
Version 4.
In VxFS 5.0, the default FCL version is 4. If there is no existing FCL file, the
fcladm on mntpt command automatically creates a Version 4 FCL.
2
Enable tracking of access information, file-opens, and I/O statistics as needed.
$ fcladm set fileopen,accessinfo mntpt
3
Set tunables fcl_keeptime, fcl_maxalloc, and fcl_ointerval as required.
For example:
$ vxtunefs fcl_ointerval=value
Sample steps
The following provides sample steps for possible application use.
45File Change Log
Application programming interface for File Change Log