check subcommand

The check subcommand runs consistency checkers on kernel data structures.

Format

check

check ? | -?

check -h CheckerName

check [ -v ] [ -l level ] [ -n count ] CheckerName [ .SuffixName ] [ EffectiveAddress ]

check -e [ -v ] [ -l level ] CheckerName [ .SuffixName ] EffectiveAddress

Parameters

Item Description
CheckerName Specifies the name of the checker to run. Run the check command with no parameters to display the list of known checkers.
SuffixName Specifies which of the suffixes of the given checker to run. Run the check command with the -h parameter to display the list of known suffixes for a given checker.
Effective Address Specifies the effective address of the element to be validated or the effective address of the first element to be validated for lists. Symbols, hexadecimal values, or hexadecimal expressions can be used to specify the effective address.
-e Specifies that only one element should be checked. This is equivalent to -n 1. An effective address must be specified if the -e parameter is specified.
-h Displays help for each suffix of the specified checker.
-l level Specifies the checking level the checker should use. This is a decimal value between 0 and 9. A value of 9 specifies the most detailed checking level and a value of 0 specifies no checking. The default value is 3 (light level) unless the -e flag is specified, in which case the default value is 7 (detailed level).
-n count Specifies the number of elements (count is a decimal value) to validate.
-v Specifies that the checker should run in verbose mode and display additional information if the checker supports this option.

Other

No aliases.

Examples

  1. To display the list of known checkers, type the following:
    check

    Output similar to the following displays:

    Please specify a checker name:
     
    Kernel Checkers         Description
    --------------------------------------------------------------------------------
    proc                    Validate proc and pvproc structures
    thread                  Validate thread and pvthread structures
     
    Kernext Checkers        Description
    --------------------------------------------------------------------------------
  2. To display detailed help for a specified checker, type the following:
    check -h proc

    Output similar to the following displays:

    Checker 'proc' is used to validate pvproc and proc structures:
    proc                    check the global pvproc process table
    proc <addr>             check a single pvproc
    proc.pv_db <addr>       check a list of pvproc linked by pv_dbnext
    proc.pv_sched <addr>    check a list of pvproc linked by pv_sched_next/back
    proc.pv_siblings <addr> check a list of pvproc linked by pv_siblings
    proc.pv_pgrp <addr>     check a list of pvproc linked by pv_pgrpl/pv_pgrpb
    proc.pv_ttyl <addr>     check a list of pvproc linked by pv_ttyl
    proc.pv_crid <addr>     check a list of pvproc linked by pv_cridnext
    For each element, both pvproc and associated proc structure are validated
            <addr> shoud be the address of a pvproc structure (not a proc structure)
  3. To run proc checker to validate the entire process table, type the following:
    check -l 7 proc

    Output similar to the following displays. In this example, a corruption is found in a flag.

    Corruption found in pvproc.pv_flag: F100020E0000A400+0100 | RASCHK_BAD_BITMASK | Invalid flags
  4. To run proc checker to perform a detailed check on a single process, type the following:
    check -e -l 7 proc pvproc+006800
  5. To run proc checker to validate the first five elements of a list of processes linked by the pv_siblings field starting at pvproc+00AC00 in verbose mode, type the following:
    check -l 7 -n 5 -v proc.pv_siblings pvproc+00AC00

    Output similar to the following displays:

    Last element checked: F100020E0000AC00 <pvproc+00AC00>
    Last element checked: F100020E0000C000 <pvproc+00C000>
    Last element checked: F100020E0000BC00 <pvproc+00A400>
    Corruption found in pvproc.pv_flag: F100020E0000A400+0100 | RASCHK_BAD_BITMASK | Invalid flags
    Last element checked: F100020E0000B000 <pvproc+00BC00>
    Last element checked: F100020E0000B000 <pvproc+00B000>