Re: Monitor 'perf dump' stats in Mgr module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 17, 2018 at 8:05 AM, Wido den Hollander <wido@xxxxxxxx> wrote:
> On 04/16/2018 02:12 PM, John Spray wrote:
>> On Mon, Apr 16, 2018 at 12:51 PM, Wido den Hollander <wido@xxxxxxxx> wrote:
>>> Hi,
>>>
>>> While working on another Mgr Module I was looking for this information:
>>>
>>> root@alpha:~# ceph daemon mon.alpha perf dump|jq '.cluster'
>>> {
>>>   "num_mon": 3,
>>>   "num_mon_quorum": 3,
>>>   "num_osd": 3,
>>>   "num_osd_up": 3,
>>>   "num_osd_in": 3,
>>>   "osd_epoch": 73,
>>>   "osd_bytes": 32199671808,
>>>   "osd_bytes_used": 3390619648,
>>>   "osd_bytes_avail": 28809052160,
>>>   "num_pool": 7,
>>>   "num_pg": 160,
>>>   "num_pg_active_clean": 160,
>>>   "num_pg_active": 160,
>>>   "num_pg_peering": 0,
>>>   "num_object": 209,
>>>   "num_object_degraded": 0,
>>>   "num_object_misplaced": 0,
>>>   "num_object_unfound": 0,
>>>   "num_bytes": 4984,
>>>   "num_mds_up": 1,
>>>   "num_mds_in": 1,
>>>   "num_mds_failed": 0,
>>>   "mds_epoch": 27
>>> }
>>> root@alpha:~#
>>>
>>> I can easily fetch this information from the Mons using perf dump, but
>>> is there a easy way to fetch it in a Mgr module?
>>
>> The monitor has a MgrClient, which should be sending perf counters
>> over the to the mgr, where they'd be visible via the
>> MgrModule.get_counter interface.  Counters are filtered by priority
>> before they get sent to the mgr though, and I don't know if I've ever
>> actually looked at the mon ones, so can't guarantee anything's
>> actually being sent!
>>
>
> The mon does send data, but things like 'num_pg_peering' and
> 'num_mds_up' are not easily consumeable.
>
> Such a high level cluster overview would be great to have as it contains
> very interesting information.
>
> All this information can be fetched and queried from various maps, but
> you would have to count all the PG statuses manually, etc, etc.

My preferred approach would be to ensure that the map objects (and
their dump methods) give you the summaries you need.  It's a bit
convoluted to pre-compute the sums on the monitors and then send them
over as separate perf counters, even if some of those counters happen
to already exist for historical reasons.

By the way, some of those counters (the MDS ones) are already gone
completely from the monitor, because they stopped making sense at the
point we had multiple filesystems.

John

>
> Wido
>
>> John
>>
>>> I think I can fetch most information using:
>>>
>>> - df
>>> - health
>>> - pg_status
>>> - pg_summary
>>> - osd_map
>>>
>>> The Mgr seems to get this information in src/mon/MgrStatMonitor.cc where
>>> MgrStatMonitor::update_logger() send these statistics to the Mgr.
>>>
>>> What would be the way to fetch this information from the Mgr?
>>>
>>> Wido
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux