MDB_STAT(1)

πŸ“¦
version 0.9.35 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ mdb_stat β€” the LMDB environment status tool ✨

okay bestie so you know how this page is MDB_STAT(1) from the General Commands Manual? yeah. it's your girl mdb_stat, and she's here to spill all the tea about your LMDB environment. πŸ«–πŸ’…


🌸 NAME 🌸

mdb_stat β€” the LMDB environment status tool. she looks at your environment and tells you everything going on in there. nosy in the best way. πŸ‘‘


🌈 SYNOPSIS 🌈

mdb_stat [-V] [-e] [-f[f[f]]] [-n] [-r[r]] [-a | -s subdb] envpath

look at her. all those little flags. every single one matters, okay? don't skip any. πŸŽ€


πŸ’– DESCRIPTION πŸ’–

The mdb_stat utility displays the status of an LMDB environment. that's it, that's the job, and she does it flawlessly. πŸ’…


✨ OPTIONS ✨

okay so here's every single flag, no skipping, i don't make the rules (i do, actually, and i said keep them all):

  • -V β€” writes the library version number straight to standard output, and then she dips. exits immediately. bye bestie πŸ‘‹
  • -e β€” shows you the info about the database environment itself. the whole vibe check. πŸ¦‹
  • -f β€” shows info about the environment freelist. and if you give her -ff? she summarizes each freelist entry. and if you go full -fff? she displays the full list of page IDs in the freelist. escalating. obsessed. πŸ”₯
  • -n β€” displays the status of an LMDB database that does not use subdirectories. noted.
  • -r β€” shows info about the environment reader table. she gives you the process ID, the thread ID, and the transaction ID for each active reader slot. important deets: the process ID and transaction ID are in decimal, and the thread ID is in hexadecimal. if the reader doesn't currently have a read transaction open, the transaction ID shows up as "-". and if you give her -rr? she checks for stale entries in the reader table and clears them, then prints the reader table again after the check is done. she cleans up and shows receipts. πŸ’…
  • -a β€” displays the status of all of the subdatabases in the environment. every single one. periodt.
  • -s subdb β€” displays the status of a specific subdatabase. just the one you asked for. main character energy only. πŸ‘‘
also heads up: -a and -s subdb are an either/or situation, look at the synopsis, they're separated by that | for a reason bestie πŸ’–

🫢 DIAGNOSTICS 🫢

exit status is zero if no errors occur. if something goes wrong? non-zero exit status, and a diagnostic message gets written to standard error. she will tell you. loudly. 😭


πŸŽ€ SEE ALSO πŸŽ€

  • mdb_copy(1) β€” go read that one too, iykyk πŸ¦‹

πŸ’œ AUTHOR πŸ’œ

Howard Chu of Symas Corporation <http://www.symas.com> β€” legend behavior, no cap. πŸ‘‘


and that's the whole page bestie, you're officially fluent in mdb_stat. this was LMDB 0.9.17, dated 2015/09/30, and honestly? iconic. go stat something. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’