Alan Kasindorf > MogileFS-Utils-2.26 > mogstats

Download:
MogileFS-Utils-2.26.tar.gz

Annotate this POD

Website

View/Report Bugs
Source   Latest Release: MogileFS-Utils-2.28

NAME ^

mogstats -- Utility for calculating slow stats directly against a MogileFS DB

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 ^

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.

OPTIONS ^

--db_dsn=<DBI_dsn>

The DSN to use for connecting to the MogileFS database server.

--db_user=<username>

A database user for connecting to the database.

--db_pass=<password>

An optional password for the database user.

--config=<file>

An explicit config file to use. By default /etc/mogilefs/mogilefs.conf and ~/.mogilefs.conf are checked.

--verbose

Print some extra text during processing. Mostly notes about what stats are starting or finishing.

--stats=<stats>

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.

--help

List usage info and supported statistics.

AVAILABLE STATISTICS ^

Contains notes on which stats may be fast or slow.

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, as well as post-replication size. The latter being closer to the actual storage amount. Can be very slow.

domains

Shows a simple count of where files are by domain and class. Faster than using "files" but displays less information.

replication

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.

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.

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 have configured MogileFS to queue many fids at once.

AUTHOR ^

Dormando <dormando@rydia.net>

BUGS ^

None known.

LICENSE ^

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

syntax highlighting: