Peter,
A program called "venusmon" has been contributed which takes advantage
of the "fs monitor" instrumentation to provide a line of output every
time a file is stored or fetched. I believe this may be the program
you're trying to write. You may obtain the sources by AFS from:
/afs/transarc.com/public/afs-contrib/tools/venusmon/vmon.c
Anonymous FTP access is available from:
grand.central.org (192.54.226.100)
/pub/afs-contrib/tools/venusmon
Since there is only one source file and a short Makefile, I can also
send the sources to the list if there is sufficient interest.
Joe Jackson,
AFS Product Support,
Transarc Corp.