Veritas™ File System 5.0.1 Programmer's Reference Guide

Sample application setup
1
Open the FCL file.
vxfs_fcl_open(mntpt, 0, &fh);
2
Set up the time to perform the seek.
3
Get current time using gettimeofday.
4
Fabricate the fcl_time_t for the time an hour before.
5
Seek to the record in the FCL file at that time.
gettimeofday(&tm, NULL);
tm.sec -= 3600
vxfs_fcl_seektime(fh, tm);
6
Read the file with the appropriate event masks until the end of file is reached.
The application is interested in only the file open records and the access
information.
7
Check if the file inode number and generation count are same as the ones
being sought for each FCL record.
8
Print information about the user who has accessed the file, if applicable.
vxfs_fcl_read(fh, buf, BUFSZ, VX_FCL_FILEOPEN_MASK |
\VX_FCL_ACCESSINFO_MASK, &nentries);
Off host processing
In some scenarios, a user application may choose to save the bandwidth of the
actual production server and outsource the job of processing the FCL to a different
system. For off-host processing, the FCL file needs to be shipped to the off-host
system. Since the FCL file is not a regular file, a command such as cp or ftp does
not work.
To be shippable, the FCL file must first be dumped into a regular file using the
fcladm dump command. The file can then be sent to the off-host system using
normal file transfer programs. See the following example.
$ fcladm -s savefile dump mntpt$ rcp savefile offhost-path
On the off-host system, the FCL file must be then restored using the restore
option through the fcladm command. Unlike the original FCL file, the restored
file is a regular file.
$ fcladm -s savefile restore restorefile
File Change Log
Application programming interface for File Change Log
46