Topics |
|
The VBD index file utility is a console-based program used to analyze VBD index files created by the B-tree class. Index files are used by an application to store the location of objects in a data file. This program will not rebuild damaged index files. Every index file is unique and must be rebuilt by the application that created it. This utility is supplied for in-depth troubleshooting and development purposes only.
To use the utility enter the name of the program followed by the name of the index file:
ix_debug grocery.btx
To open a file, perform a single operation, and exit the program enter the name of the program followed by the name of the index file followed by the letter of the command you wish to perform:
ix_debug grocery.btx s
If no command is giving after the index file name the utility program will display a menu and give you a ">" prompt. At the prompt enter the single letter of the command you wish to perform.
(D) Dump the B-tree nodes (F) Find a key in the B-tree index file (H) Help (prints this menu) (Q) Quit (R) Dump the B-tree nodes recursively (S) Sort the entry keys (T) Display B-tree stats (V) Display VBD file stats (W) Walk the tree
Enter "D" to dump all the B-tree nodes to the stdout using a specified traversal.
Enter "F" to find a specified B-tree entry key in the index file:
Enter Key Name: Bread Found: Bread Entry Key Name: Bread Object's data file address: 105 Object's class ID: 1001
Enter "H" to display this menu again, after the program processes your selection.
Enter "Q" to exit this program.
Enter "R" to recursively dump the contents of B-tree node by node.
Enter "S" to sort the entry keys in alphabetical order.
Enter "T" to display the B-tree statistics.
---- Btree Statistics ---- Tree stats: 188 entries, 52 nodes, 1 levels Root FAU = 20704 Fast binds/hits/misses: 376 / 160 / 52 (91%) Reservations: 588 Buckets in use: 0 / 1024
Fast Binds:
Fast binds take place when a cache pointer references or binds to a cache bucket that previously existed, was unbound, and did not change its state in memory or on disk. When a fast bind occurs the bucket is simply locked by the cache pointer without having to reserve another bucket in the cache.
Hits:
Hits represent the number of cache buckets that did not have to be acquired because the bucket for the file address already existed in the cache.
Misses:
Misses represent the number of cache buckets that had to be acquired because a bucket for the file address did not already exist in the cache.
Reservations:
Reservations represent the total number of the Fast Binds, Hits, and Misses.
Buckets In Use:
Buckets in use represent the number of buckets that are currently locked. The number of buckets represents the size of the cache. The cache size in bytes is equal to the total number of buckets multiplied by the size of a B-tree entry key.
Enter "V" to display detailed file information about this file. This information is used to analyze and troubleshoot VBD files.
Enter "W" to traverse the tree using a specified B-tree traversal.
Console Base Utility Program:
Four makefiles are provided in the "utils" directory to compile the source code on one of four different compilers.
"msvc40.mak" - Makefile for Microsoft visual C/C++ 4.2 "djgpp.mak" - Makefile for DJGPP gcc 2.7.2.1 "gnu_gcc.mak" - Makefile for GNU g++ 2.7.2.1 "hpux10.mak" - Makefile for HPUX C++ A.10.24
Building the Executable:
To compile use the "make -f" option followed by the makefile name. To compile using MSVC use the "nmake -f" option. The resulting executable will be named after the name set by the PROJECT macro in the makefile. By default the program will be named "ix_debug" under UNIX or "ix_debug.exe" under Windows 95/DOS.
Installing:
Execute a "make -f (makefile name) install" to move the executable to the "bin" directory.
Removing the Object Files and the Executable:
To remove the object files and the executable use the "make -f" option followed by the makefile name, followed by "clean": make -f hpux10.mak clean
Under MSVC use the "nmake -f" option followed by the makefile name, followed by "clean": nmake -f msvc40.mak clean