[ceph-users] Ceph-mgr summarize recovery counters

John Spray jspray at redhat.com
Tue Oct 10 07:54:58 PDT 2017


On Tue, Oct 10, 2017 at 3:50 PM, Benjeman Meekhof <bmeekhof at umich.edu> wrote:
> Hi John,
>
> Thanks for the guidance!  Is pg_status something we should expect to
> find in Luminous (12.2.1)?  It doesn't seem to exist.  We do have a
> 'pg_summary' object which contains a list of every PG and current
> state (active, etc) but nothing about I/O.
>
> Calls to self.get('pg_status') in our module log:  mgr get_python
> Python module requested unknown data 'pg_status'

Yes, it's new in master.

When modules like influx & prometheus are using those calls in master
though, we can backport things like the pg_status implementation at
the same time as backporting the modules if we do that.

John


>
> thanks,
> Ben
>
> On Thu, Oct 5, 2017 at 8:42 AM, John Spray <jspray at redhat.com> wrote:
>> On Wed, Oct 4, 2017 at 7:14 PM, Gregory Farnum <gfarnum at redhat.com> wrote:
>>> On Wed, Oct 4, 2017 at 9:14 AM, Benjeman Meekhof <bmeekhof at umich.edu> wrote:
>>>> Wondering if anyone can tell me how to summarize recovery
>>>> bytes/ops/objects from counters available in the ceph-mgr python
>>>> interface?  To put another way, how does the ceph -s command put
>>>> together that infomation and can I access that information from a
>>>> counter queryable by the ceph-mgr python module api?
>>>>
>>>> I want info like the 'recovery' part of the status output.  I have a
>>>> ceph-mgr module that feeds influxdb but I'm not sure what counters
>>>> from ceph-mgr to summarize to create this information.  OSD have
>>>> available a recovery_ops counter which is not quite the same.  Maybe
>>>> the various 'subop_..' counters encompass recovery ops?  It's not
>>>> clear to me but I'm hoping it is obvious to someone more familiar with
>>>> the internals.
>>>>
>>>> io:
>>>>     client:   2034 B/s wr, 0 op/s rd, 0 op/s wr
>>>>     recovery: 1173 MB/s, 8 keys/s, 682 objects/s
>>>
>>>
>>> You'll need to run queries against the PGMap. I'm not sure how that
>>> works in the python interfaces but I'm led to believe it's possible.
>>> Documentation is probably all in the PGMap.h header; you can look at
>>> functions like the "recovery_rate_summary" to see what they're doing.
>>
>> Try get("pg_status") from a python module, that should contain the
>> recovery/client IO amongst other things.
>>
>> You may find that the fields only appear when they're nonzero, I would
>> be happy to see a change that fixed the underlying functions to always
>> output the fields (e.g. in PGMapDigest::recovery_rate_summary) when
>> writing to a Formatter.  Skipping the irrelevant stuff is only useful
>> when doing plain text output.
>>
>> John
>>
>>> -Greg
>>> _______________________________________________
>>> ceph-users mailing list
>>> ceph-users at lists.ceph.com
>>> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com


More information about the ceph-users mailing list