---
name: "db_stat"
section: "1db"
platform: "linux"
package: "libdb2-util"
version: "2:2.4.14-2.7.7.1.c"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/db_stat/1db"
---

# db\_stat(1db)

display DB statistics

## NAME

db\_stat - display DB statistics

## SYNOPSIS

**db\_stat** \[**-clmNt**\] \[**-C Acfhlmo**\] \[**-d file**\] \[**-h home**\] \[**-M Ahlm**\]

## DESCRIPTION

The *db\_stat* utility displays statistics for 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 *db\_lock*(3).

- **-d**

  Display database statistics for the specified database, as described in *db\_open*(3).

- **-h**

  Specify a home directory for the database.

- **-l**

  Display log region statistics as described in *db\_log*(3).

- **-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 *db\_mpool*(3).

- **-N**

  Don't acquire locks while displaying the statistics. This option is intended only for debugging corrupt regions and should not be used under any other circumstances.

- **-t**

  Display transaction region statistics as described in *db\_txn*(3).

The *db\_stat* utility attaches to DB shared memory regions. In order to avoid region corruption, it should always be given the chance to detach and exit gracefully. To cause *db\_stat* to clean up after itself and exit, send it an interrupt signal (SIGINT).

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 exits 0 on success, and \>0 if an error occurs.

## ENVIRONMENT VARIABLES

The following environment variables affect the execution of *db\_stat*:

- 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 *db\_appinit*(3).

## SEE ALSO

The DB library is a family of groups of functions that provides a modular programming interface to transactions and record-oriented file access. The library includes support for transactions, locking, logging and file page caching, as well as various indexed access methods. Many of the functional groups (e.g., the file page caching functions) are useful independent of the other DB functions, although some functional groups are explicitly based on other functional groups (e.g., transactions and logging). For a general description of the DB package, see *db\_intro*(3).

[*db\_archive*(1)](/db_archive/1.md), [*db\_checkpoint*(1)](/db_checkpoint/1.md), [*db\_deadlock*(1)](/db_deadlock/1.md), [*db\_dump*(1)](/db_dump/1.md), [*db\_load*(1)](/db_load/1.md), [*db\_recover*(1)](/db_recover/1.md), [*db\_stat*(1)](/db_stat/1.md),
