MOGSTATS(1)

πŸ“¦
version 2.30 Β· 2 versions
, in fedora 43

πŸ’– MOGSTATS(1) πŸ’–

okay bestie, so this is a page from the User Contributed Perl Documentation manual set, and it's literally the glow-up guide for mogstats πŸ’…


✨ NAME ✨

mogstats β€” a whole utility for calculating slow stats directly against a MogileFS DB. yes, directly. no middleman. she's bold like that 🫢


🌸 SYNOPSIS 🌸

$ mogstats --db_dsn="DBI:mysql:mfs:host=mfshost" --db_user="mfs" \
           --db_pass="mfs" --verbose --stats="devices,files"
$ mogstats --stats="all"
$ mogstats [all options in ~/.mogilefs.conf]

πŸ¦‹ DESCRIPTION πŸ¦‹

So the vibe here is: this utility is for inspecting queues and running general statistics against a MogileFS database. that's the whole gig ✨

but here's the tea, bestie: some of these stats can take a very long time to run against a large instance 😭 like, go-touch-grass long. so you can point the utility at a read slave or a special account instead. main character energy: your prod DB doesn't have to take the hit πŸ’œ


πŸŽ€ OPTIONS πŸŽ€

  • --db_dsn=<DBI_dsn> β€” the DSN you use to connect to the MogileFS database server. this is literally the "where is she" of the whole operation πŸ’«
  • --db_user=<username> β€” a database user, for connecting to the database. yes you need one. no, "trust me bro" is not a username.
  • --db_pass=<password> β€” an optional password for that database user. optional!! lowkey iconic of her πŸ™ˆ
  • --config=<file> β€” an explicit config file to use. by default, /etc/mogilefs/mogilefs.conf and ~/.mogilefs.conf are the ones getting checked πŸ‘‘
  • --verbose β€” prints some extra text while it's processing. mostly lil notes about which stats are starting or finishing. it's giving "narrator voice" πŸ—£οΈ
  • --verbose... no wait, moving on β€”
  • --stats=<stats> β€” a list of which statistics to calculate. notes on some of them live below, and --help has the full list. set it to "all" and she fetches every possible stat 🌈
  • --help β€” lists usage info plus the supported statistics. your bestie when you forget a flag name, fr fr

⭐ AVAILABLE STATISTICS ⭐

this section has the notes on which stats are fast and which ones are gonna make you wait 🌸

  • devices β€” lists count of files and current database status per-device. can be very slow 😭
  • fids β€” lists the current highest file id. should be fast ⚑
  • files β€” gives a breakdown of where files are by domain and class. displays the size of all stored files pre-replication, plus the post-replication size too. the post one is closer to the actual storage amount, jsyk. can be very slow πŸ’€
  • domains β€” shows a simple count of where files are by domain and class. faster than using "files" but it displays less info. a lil trade-off, she's efficient πŸŽ€
  • replication β€” displays a breakdown of devcount per domain/class combo. shows the number of files in domain "foo" with class "bar" that have a current devcount of 0, 1, 2, 3, etc. useful for spotting broken files (devcount 0), replication lag, or over replication bugs. can be very slow πŸ”₯
  • replication-queue β€” quick breakdown of how many fids are due for replication. fids listed as "manual" need manual intervention before they can be replicated, and could be broken 😬 will be fast unless there are many files in queue.
  • delete-queue β€” similar to replication-queue. matching energy, different queue πŸ’…
  • general-queue β€” displays a breakdown of what's in the general queue. this includes FSCK, Rebalance, and other temporary queueing systems MogileFS has. should be fast unless you've configured MogileFS to queue many fids at once. you'd know if you did 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Dormando <dormando@rydia.net>


πŸ’€ BUGS πŸ’€

None known.

not me being shocked that a manpage just says "none known" and moves on 😭 periodt.

🌈 LICENSE 🌈

Licensed for use and redistribution under the same terms as Perl itself.


and that's the whole page, bestie!! this gem shipped with perl v5.42.0 and it's dated 2025-07-25 β€” go forth and run your slow stats on a read slave, your prod DB will thank you πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from