Index File Debug Utility


Topics

Usage

Compiling


Usage

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

After opening the file in read-only mode, the utility program will display a menu and give you a ">" prompt. At the prompt, enter the letter of an operation you wish to perform.

(D) Dump the B-tree index
(F) Find a key in the B-tree index file
(L) List the contents of the B-tree index file
(H) Help (prints this menu)
(P) Print the B-tree node by node
(Q) Quit
(S) Display VBD file stats
(T) Display B-tree stats
(V) Display this program's version number

Enter "D" to dump all the B-tree entry keys to the screen.

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 "L" to list all the B-tree entry keys in order.

Enter "H" to display this menu again, after the program processes your selection.

Enter "P" to print the contents of B-tree node by node.

Enter "Q" to exit this program.

Enter "S" to display detailed file information about this file. This information is used to analyze and troubleshoot VBD files.

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 "Z" to display this program's version number.


Compiling

Console Base Utility Program:
Four makefiles are provided in the "console" 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


End Of Document