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 <[email protected]> on behalf of
"[email protected]" <[email protected]>
Date: Monday, 28 November 2016 at 22:33
To: mono-devel-list <[email protected]>
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
[email protected]
http://lists.dot.net/mailman/listinfo/mono-devel-list