[Mono-dev] Print GC counters from a daemon

Greg Young gregoryyoung1 at gmail.com
Wed Nov 30 20:40:32 UTC 2016


Miguel,

If you have someone wanting to do realtime visualizations privateeye
exposes a .net event (or observable) for gcstarted/ended/completed
(with full information). It can be configured to only raise that one
event so is very lightweight.

Here is an example if someone wants to give it a whirl using F# api
https://github.com/PrivateEye/PrivateEye/wiki/Using-Observables

Cheers,

Greg

On Wed, Nov 30, 2016 at 8:23 PM, Miguel de Icaza via Mono-devel-list
<mono-devel-list at lists.dot.net> wrote:
> Hello,
>
>
>
> Would love to write a small script that visualizes the GC pauses like this
> blog post shows for Go:
>
>
>
> https://dave.cheney.net/2014/07/11/visualising-the-go-garbage-collector
>
>
>
> From: Mono-devel-list <mono-devel-list-bounces at lists.dot.net> on behalf of
> Vlad Brezae via Mono-devel-list <mono-devel-list at lists.dot.net>
> Reply-To: Vlad Brezae <vlbrez at microsoft.com>
> Date: Monday, November 28, 2016 at 6:33 PM
> To: "psantosl at codicesoftware.com" <psantosl at codicesoftware.com>,
> mono-devel-list <mono-devel-list at lists.ximian.com>
> Subject: Re: [Mono-dev] Print GC counters from a daemon
>
>
>
> Hello Pablo,
>
>
>
>         Normally, logging gc activity in real time is done by passing
> MONO_LOG_LEVEL=debug and MONO_LOG_MASK=gc. This will output time and memory
> information about each collection (minor + major). Another option, if you
> want to force your application to log the standard counters (obtained with
> --stats, that you mentioned) also on the run, and not only when the app
> stops, I guess you could pinvoke into the runtime (mono_counters_dump,
> __Internal as DllImport).
>
>
>
> Vlad
>
>
>
> From: Mono-devel-list <mono-devel-list-bounces at lists.dot.net> on behalf of
> "psantosl at codicesoftware.com" <psantosl at codicesoftware.com>
> Date: Monday, 28 November 2016 at 22:33
> To: mono-devel-list <mono-devel-list at lists.ximian.com>
> Subject: [Mono-dev] Print GC counters from a daemon
>
>
>
> Hi,
>
> We need to regularly log some GC counters from a running application. We now
> enabling log on DEBUG will print it when the app stops, but we need to track
> it on a production server.
>
> The following counters would help:
>
> Minor GC time
> Major GC time
> Major GC time concurrent
>
> Basically we would like to understand if we are forcing too much time in GC.
>
> Any hints on how to print it, in case it is doable?
>
> Thanks,
>
> pablo
>
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.dot.net
> http://lists.dot.net/mailman/listinfo/mono-devel-list
>



-- 
Studying for the Turing test


More information about the Mono-devel-list mailing list