TigerLogic.com
Products    |    Solutions    |    Support & Services    |    Education    |    Partners    |    Corporate    |    Events    |    Contact Us

Tech Tip:
What is this 'file-of-files' ??

The “file-of-files” file contains statistical information for each file on the system. Whenever a file is created, restored or deleted, this file is updated. The “file-of-files” items are created when a file is restored or created.

The item-ids are sequential file numbers assigned as the file is created. File number one (1) is always the “files-of-file” and file number two (2) is always the “mds” file. The numbers of the other files are determined by the order in which they are restored or created.

The “file-save’ is typically followed by a “t-dump” of the “file-of-files” from which the file statistics report is generated.

On D3 7.0 and above, the item "restored" in the dict of the "file-of-files" contains the time in attribute 1, and the date in attribute 2 of the last full restore. This item should not be deleted or modified.

The attributes of the “file-of-files” file are:

 
1
  Name of md owning file
2
  File name stored in the master dictionary of the account
3
  One dictionary may have many subsidiary data files each with its own unique name. The default data section name is identical to the file name as stored in the md.
4
  Modulo of the file concatenated to the base FID of the file
5
  Number of items in the file
6
  Number of pointer items saved during the last file save
7
  Number of items which were partially or wholly stored in the secondary file space during the last file save
8
  Total number of bytes in the file as of the last file save
9
  Total number of bytes in all pointer items as of last file save
10
  Total number of frames used by the file as of the last file save
11
  Total number of frames used by pointers items as of last file save
12
  Date when file was last saved
13
  Reel number in a multi-reel file save where this file begins
14
  Decimal sequence number indicating the order in which the file was saved on the file save media
15
  Date when this file was last opened
16
  Number of last file save on which this file was saved
17
  Masks desired operations from being logged in attributes 18-20 (D3 7.0 and above only). Currently supported masks are: "c" clear file; and "d" delete-file.
18
  File status:Null – File LoadC – clearedD – deletedN – new fileR – renamed fileT – restored from tapeThe attribute is multivalued and controls attributes 19 & 20
19
  Time-date when file activity occurred.The attribute is multivalued and dependent on attribute 18
20
  User id concatenated with port numberThe attribute is multivalued and dependent on attribute 18
21
  Date when dx/dy file was skipped on save
25
  Contains list of specific items to be saved for this file
29
  Contains the date when the file access statistics were last cleared
30
  Number of READU operations on the file
31
  Number of blocked READU operations on the file.
32
  Number of READU LOCKED operations on the file
33
  Number of blocked READU LOCKED operations on the file
34
  Number of pointer items read
35
  Total number of READs on the file
36
  Number of WRITEU operations to the file
37
  Number of blocked WRITEs to the file
38
  Number of pointer items written
39
  Total number of WRITEs to the file
40
  Total number of SELECTs on the file
41
  Total number of DELETEs to the file
42
  Total number of CLEAR-FILEs done on the file
43
  Total number of OPENs on the file
44
  READ overflow group accesses
45
  WRITE overflow group accesses
46
  Last date the file was read (D3 7.0 & above)
47
  Last date the file was written (D3 7.0.2 and above)

For example, each time a file is cleared, a set of multi-values are logged to the file-of-files item updating attributes 18, 19 and 20. Attribute 18 will have a ‘c’ (cleared), attribute 19 will contain an internal time and date, and attribute 20 will have the user*port.

Some application software use files that are cleared and repopulated frequently. These “scratch pad” file-of-files items can grow large causing performance problems especially for the file save process and other processes that needs to reference the file-of-files file.

To turn off the ‘clear file’ logging of these “scratch pad” file-of-files items, place a ‘c’ in attribute 17:

:select file-of-files with a3 = filename

[404] 1 items selected out of xxx items.

>u file-of-files
file-of-files 'nnn' size = nnn
01 account
02 filename
03 filename
04 mod*base

17 C

If you do not care about the ‘clear file’ history in attribute 18 –20 clear it as well.

December 20, 2007
September 7, 2006
Volume 1, 2005
Volume 1, 2004
Spring/Summer, 2003
Winter, 2003
Fall, 2002
Summer, 2002
Spring, 2002
Tech Tips
   
Copyright 2009. TigerLogic. All Rights Reserved