Giter Club home page Giter Club logo

checkstream's Introduction

Checkstream / Genstream

What are they?

Genstream and checkstream are a pair of utilities which are useful in the diagnosis of file corruption problems, and have proven useful when dealing with several different NFS corruption problems on IRIX and Linux.

They were developed in the Melbourne group at SGI in the early 2000s, used there for testing NFS, XFS and Linux HA, and released as open source in 2009.

How do they work?

The basic theory of operation is as follows.

  • Genstream generates a stream of data, which comprises a sequence of carefully constructed 8 byte records. Each record contains the file offset they're supposed to appear at, and a checksum.

  • Checkstream reads such a stream, uses the information in each record to checks the stream for corruption, and emits a report describing which ranges of records are bad.

Checkstream finds bad records using two criteria.

  1. A record is malformed; the record checksum cannot be verified. (Note that a record that is completely zero, e.g. due to reading holes in the file, will be detected this way).
  2. A well-formed record is mislocated; the file offset encoded in the record does not match the file offset at which the record was read.

Both utilities do IO in configurable ways (blocksize, file open flags, using mmap, etc) which allows various modes of getting IO into the kernel to be tested directly. They also have a mode where the record contains an 8-bit tag, allowing for testing for failure modes involving data being incorrectly moved to the wrong file.

Checkstream also has an option to cause a kernel dump when it detects an error, which is super useful for finding bugs in kernel filesystem implementations.

How do I build them?

The build system is GNU autotools. Read the file INSTALL for details.

The build produces two binaries genstream and checkstream. Their only dependencies are libc, so you can copy these to your test systems and run them directly.

How do I use them?

Read the manual pages for a discussion of some common testing scenarios.

Build Status

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.