$ 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]
Utility for inspecting queues and running general statistics against a MogileFS database. Some of these stats can take a very long time to run against a large instance, so the utility can be pointed at a read slave or special account.
The DSN to use for connecting to the MogileFS database server.
A database user for connecting to the database.
An optional password for the database user.
An explicit config file to use. By default /etc/mogilefs/mogilefs.conf and ~/.mogilefs.conf are checked.
Print some extra text during processing. Mostly notes about what stats are starting or finishing.
A list of which statistics to calculate. Notes on some of them are listed below, see --help for full list. A value of “all” fetches all possible stats.
List usage info and supported statistics.
Contains notes on which stats may be fast or slow.
Lists count of files and current database status per-device. Can be very slow.
Lists the current highest file id. Should be fast.
Gives a breakdown of where files are by domain and class. Displays the size of all stored files pre-replication, as well as post-replication size. The latter being closer to the actual storage amount. Can be very slow.
Shows a simple count of where files are by domain and class. Faster than using “files” but displays less information.
Displays a breakdown of devcount per domain/class combo. Shows 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.
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.
Similar to replication-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 have configured MogileFS to queue many fids at once.
Licensed for use and redistribution under the same terms as Perl itself.