PATCH: add stats command to mogadm

Brad Fitzpatrick brad at danga.com
Thu Apr 19 18:19:09 UTC 2007


Wonderful, thanks!  (I didn't even know MogileFS::Admin had a stats
command.. :))

I committed the patch with a few changes:

  -- trailing whitespace removed
  -- %10s to %20s for domain column width (my domains were longer)
  -- fail() if stats can't be grabbed (no tracker)
  -- advertise command in @topcmds list


On Thu, 19 Apr 2007, Leon Brocard wrote:

> MogileFS::Admin exposes some nice stats. mogadm does not have an
> interface to it. This patch rectifies the situation. On my two-node
> test cluster it shows:
>
> $  ./mymogadm --trackers=localhost:6001 stats
>
> Fetching statistics...
>
>
>
> Statistics for devices...
>
>   device     host            files     status
>
>   ---------- ----------- ---------- ----------
>
>   dev1       cluster10       99890      alive
>
>   dev5       cluster9        99889      alive
>
>   ---------- ----------- ---------- ----------
>
>
>
> Statistics for file ids...
>
>   Max file id: 227138
>
>
>
> Statistics for files...
>
>   domain     class           files
>
>   ---------- ----------- ----------
>
>   resources  normal          99889
>
>   ---------- ----------- ----------
>
>
>
> Statistics for replication...
>
>   domain     class        devcount      files
>
>   ---------- ----------- ---------- ----------
>
>   resources  normal              1          1
>
>   resources  normal              2      99888
>
>   ---------- ----------- ---------- ----------
>
>
> What do you think?
>
> Enjoy, Leon
>


More information about the mogilefs mailing list