[Mono-dev] Print GC counters from a daemon

Miguel de Icaza miguel at microsoft.com
Wed Nov 30 20:23:40 UTC 2016


Would love to write a small script that visualizes the GC pauses like this blog post shows for Go:


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).


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


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?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/mono-devel-list/attachments/20161130/0802b5bf/attachment.html>

More information about the Mono-devel-list mailing list