# db_stat

`

###

    db_stat [-celmNtV]
        [-C Acfhlmo] [-d file [-s database]] [-h home] [-M Ahlm]

# Description

The db_stat utility displays statistics for Berkeley DB environments.

The options are as follows:

-C
  Display internal information about the lock region. (The output from this option is often both voluminous and meaningless, and is intended only for debugging.)

  A
    Display all information.
  c
    Display lock conflict matrix.
  f
    Display lock and object free lists.
  l
    Display lockers within hash chains.
  m
    Display region memory information.
  o
    Display objects within hash chains.

-c
  Display lock region statistics as described in lock_stat.

-d
  Display database statistics for the specified file, as described in DB->stat.

  If the database contains multiple databases and the -s flag is not specified, the statistics are for the internal database that describes the other databases the file contains, and not for the file as a whole.

-e
  Display current environment statistics.

-h
  Specify a home directory for the database environment; by default, the current working directory is used.

-l
  Display log region statistics as described in log_stat.

-M
  Display internal information about the shared memory buffer pool. (The output from this option is often both voluminous and meaningless, and is intended only for debugging.)

  A
    Display all information.
  h
    Display buffers within hash chains.
  l
    Display buffers within LRU chains.
  m
    Display region memory information.

-m
  Display shared memory buffer pool statistics as described in memp_stat.

-N
  Do not acquire shared region locks while running. Other problems such as potentially fatal errors in Berkeley DB will be ignored as well. This option is intended only for debugging errors and should not be used under any other circumstances.

-s
  Display statistics for the specified database contained in the file specified with the -d flag.

-t
  Display transaction region statistics as described in txn_stat.

-V
  Write the version number to the standard output and exit.

Only one set of statistics is displayed for each run, and the last option specifying a set of statistics takes precedence.

Values smaller than 10 million are generally displayed without any special notation. Values larger than 10 million are normally displayed as <number>M.

The db_stat utility may be used with a Berkeley DB environment (as described for the -h option, the environment variable DB_HOME, or, because the utility was run in a directory containing a Berkeley DB environment). In order to avoid environment corruption when using a Berkeley DB environment, db_stat should always be given the chance to detach from the environment and exit gracefully. To cause db_stat to release all environment resources and exit cleanly, send it an interrupt signal (SIGINT).

The db_stat utility exits 0 on success, and >0 if an error occurs.

# Environment Variables

DB_HOME
  If the -h option is not specified and the environment variable DB_HOME is set, it is used as the path of the database home, as described in DBENV->open.

# See Also

berkeley_db_svc, db_archive, db_checkpoint, db_deadlock, db_dump, db_load, db_recover, db_stat, db_upgrade, and db_verify.`

Copyright Sleepycat Software