1.Dd December 3, 2003 \" DATE 2.Dt db_stat 1 \" Program name and manual section number 3.Os Darwin 4.Sh NAME \" Section Header - required - don't modify 5.Nm db_stat 6.\" The following lines are read in generating the apropos(man -k) database. Use only key 7.\" words here as the database is built based on the words here and in the .ND line. 8.\" Use .Nm macro to designate other names for the documented program. 9.Sh SYNOPSIS \" Section Header - required - don't modify 10.Nm Fl d Ar file 11.Op Fl fN 12.Op Fl h Ar home 13.Op Fl P Ar password 14.Op Fl s Ar database 15.Nm 16.Op Fl celmNrtVZ 17.Op Fl C Ar Aclmop 18.Op Fl h Ar home 19.Op Fl M Ar Ahm 20.Op Fl P Ar password 21.Sh DESCRIPTION \" Section Header - required - don't modify 22The 23.Nm 24utility utility displays statistics for Berkeley DB environments. 25.Pp 26The options are as follows: 27.Bl -tag -width 28.It Fl C 29Display internal information about the lock region. (The output from this option is often both voluminous and meaningless, and is intended only for debugging.) 30.Bl -tag -width 31.It A 32Display all information. 33.It c 34Display lock conflict matrix. 35.It l 36Display lockers within hash chains. 37.It m 38Display region memory information. 39.It o 40Display objects within hash chains. 41.It p 42Display lock region parameters. 43.El 44.It Fl c 45Display lock region statistics, as described in DB_ENV->lock_stat. 46.It Fl d 47Display database statistics for the specified file, as described in DB->stat. 48.Pp 49If 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. 50.It Fl e 51Display current environment statistics. 52.It Fl f 53Display only those database statistics that can be acquired without traversing the database. 54.It Fl h 55Specify a home directory for the database environment; by default, the current working directory is used. 56.It Fl l 57Display log region statistics, as described in DB_ENV->log_stat. 58.It Fl M 59Display 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.) 60.Bl -tag -width 61.It A 62Display all information. 63.It h 64Display buffers within hash chains. 65.It m 66Display region memory information. 67.El 68.It Fl m 69Display shared memory buffer pool statistics, as described in DB_ENV->memp_stat. 70.It Fl N 71Do not acquire shared region mutexes 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. 72.It Fl P 73Specify an environment password. Although Berkeley DB utilities overwrite password strings as soon as possible, be aware there may be a window of vulnerability on systems where unprivileged users can see command-line arguments or where utilities are not able to overwrite the memory containing the command-line arguments. 74.It Fl r 75Display replication statistics, as described in DB_ENV->rep_stat. 76.It Fl s 77Display statistics for the specified database contained in the file specified with the -d flag. 78.It Fl t 79Display transaction region statistics, as described in DB_ENV->txn_stat. 80.It Fl V 81Write the library version number to the standard output, and exit. 82.It Fl Z 83Reset the statistics after reporting them; valid only with the -c, -e, -l, -m, and -t options. 84.El 85.Pp 86Values normally displayed in quantities of bytes are displayed as a combination of gigabytes (GB), megabytes (MB), kilobytes (KB), and bytes (B). Otherwise, values smaller than 10 million are displayed without any special notation, and values larger than 10 million are displayed as a number followed by "M". 87.Pp 88The 89.Nm 90utility 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, 91.Nm 92should always be given the chance to detach from the environment and exit gracefully. To cause 93.Nm 94to release all environment resources and exit cleanly, send it an interrupt signal (SIGINT). 95.Pp 96The 97.Nm 98utility exits 0 on success, and >0 if an error occurs. 99.Pp 100.Sh ENVIRONMENT \" May not be needed 101.Bl -tag -width "DB_HOME" \" ENV_VAR_1 is width of the string ENV_VAR_1 102.It Ev DB_HOME 103If 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_ENV->open. 104.El 105.\" .Sh FILES \" File used or created by the topic of the man page 106.\" .Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact 107.\" .It Pa /usr/share/file_name 108.\" FILE_1description 109.\" .It Pa /Users/joeuser/Library/really_long_file_name 110.\" FILE_2 description 111.\" .Sh DIAGNOSTICS \" May not be needed 112.\" .Bl -diag 113.\" .It Diagnostic Tag 114.\" Diagnostic informtion here. 115.\" .It Diagnostic Tag 116.\" Diagnostic informtion here. 117.\" .El 118.Sh SEE ALSO 119.Xr db_archive 1 , 120.Xr db_checkpoint 1 , 121.Xr db_deadlock 1 , 122.Xr db_dump 1 , 123.Xr db_load 1 , 124.Xr db_printlog 1 , 125.Xr db_recover 1 , 126.Xr db_upgrade 1 , 127.Xr db_verify 1 128.\" .Sh BUGS \" Document known, unremedied bugs 129.\" .Sh HISTORY \" Document history if command behaves in a unique manner 130