body { margin:0px; background-color:#fff } img { margin:0px; border-style:none } button { margin:0px; border-style:none; padding:0px; background-color:transparent; vertical-align:top } p:first-child { margin-top:0px } table { empty-cells:hide } .f-sp { font-size:1px; visibility:hidden } .f-lp { margin-bottom:0px } .f-x1 { } .f-x2 { } .f-x3 { } a:visited { color:#8b0000; text-decoration:underline } .capsub { color:#808080; font-weight:bold; text-transform:uppercase; letter-spacing:2.4px } .bulletlist { margin-left:0px; margin-right:0px; margin-top:0px; margin-bottom:0.1px } .bold { color:#00f; font-weight:bold } .fixed { color:#000; font-family:monospace } .rightaligned { margin-left:0px; margin-right:0px; text-align:right; margin-top:0px; margin-bottom:0.1px } .footer { color:#808080; font-size:90% } .FWExtra { } .FWExtra a:link { text-decoration: none; } .FWExtra a:active { text-decoration: none; } .FWExtra a:visited { text-decoration: none; } .FWExtra a:hover { text-decoration: underline; } -->
Equi4 Softwaremetakit

top pages

 

Metakit
Tclkit
Starkit
CatFish

 

Soapbox

 

Blog
Musings

Tclers' Wiki
The SAX

Company

 

About
Services
Contact info
Support

 

Site map

datafile statistics and verification

Metakit datafiles are failsafe, in that failures at any point, even power failures, will not lead to damaged datafiles. This is due to a technique called "stable storage".

Still, there may be cases when datafiles do get damaged:

  • hard disk failures which actually damage block (or write incomplete ones)
  • stray writes in the app damaging buffered changes which MK writes to file
  • opening files for writing more than once
  • file server caching problems
  • bugs in the Metakit code
  • bugs in lower system levels (compiler, libraries, o/s)

The Mkstats utility helps verify datafiles, in that it checks the most likely form of damage: allocated/free space use in the file which are incorrect and have overlap. Note that there is no free space list on file: free space is defined implicitly as the space which is not in use. This means free space need never be reclaimed - its reuse is automatic. The one error is if byte ranges used on file show any overlap.

As a side benefit, "mkstats" also displays some basic file usage statistics.

Mkstats currently works on Windows, Mac OS X, and Linux (x86). It's packaged as a Starkit and requires Tclkit to run.

Windows

  • download mkstats.kit
  • download Tclkit for Windows (cmdline), and rename it to "tclkitsh.exe"
  • run mkstats by typing:
    tclkitsh mkstats.kit <suspectdatafile>
  • as a side effect, a small "mku.exe" utility needed by mkstats will be created

Linux and mac os x

  • download mkstats.kit
  • download Tclkit for Linux or Mac OS X, unpack/rename to "tclkit", and type:
    chmod +x tclkit
  • run mkstats by typing:
    ./tclkit mkstats.kit <suspectdatafile>
  • as a side effect, a small "mku.linux" (resp. "mku.macosx") utility needed by mkstats will be created

Mkstats can deal with datafiles created on any platform.

Note: please remove the mku.* utility created by mkstats when updating, to make sure the latest versions is used after the update.

latest news

  • Version ID: 2004/05/16 09:11:43 22552-34246 - download - browse.
  • mku.linux: new build, to get rid of glibc 2.3 dep
  • mkstats.tcl: adjusted to also accept new MKC-based output of mku.linux

See the change log for further details, and the feedback forum in case of trouble.

metakit index

Intro / News

Overview

Documentation

Licensing

Download

Mailing lists

To-do list

Acknowledgements

Quotes

Links