<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>I have found that simply tracing gc time per collector and alerting ( nagios ) if above a threshold to be good enough. what are you trying to accomplish?</div><div><br><br><div>Bill Schwanitz</div><div><br></div><div>If A is a success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut. - Albert Einstein.</div></div><div><br>On Nov 25, 2013, at 3:02 PM, "Franklin, Dave" <<a href="mailto:Dave.Franklin@arrisi.com">Dave.Franklin@arrisi.com</a>> wrote:<br><br></div><blockquote type="cite"><div>

<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->


<div class="WordSection1">
<p class="MsoNormal">Folks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ve been trying to tackle the measurement of an irregular statistic on an embedded platform: embedded JVM garbage collection. During any given “interval” for collectd, I may have no GC activity or I might have a dozen instances where the
 JVM performed garbage collection. I have a file wherein the GC numbers are stored (time of occurrence, JVM heap before, JVM heap after, time required to garbage-collect), so I can write a read plugin to simply read the file. It should be easy enough to keep
 track of the last time it ran, so I can know exactly when/where to index in that file so I can start the file read at the right point (and read to the end). But the fact that I may have multiple values in any one interval is throwing me off.
<o:p></o:p></p>
<p class="MsoNormal"><br>
So if I have a set of N data points (including timestamp), can I simply iterate through a list, calling plugin_dispatch_values( &vl ) where I’ve not only set up the “standard” vl data elements but also the vl.time element also, with the appropriate timestamp?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">E.G. (very psedocode-ish) :<o:p></o:p></p>
<p class="MsoNormal">// Iterate through the N values for heap during this interval<o:p></o:p></p>
<p class="MsoNormal">for iter=0; iter<N; iter++<o:p></o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal">  gcdata = dataArray[iter];<o:p></o:p></p>
<p class="MsoNormal">  vl.values = gcdata.heap;<o:p></o:p></p>
<p class="MsoNormal">  vl.time = gcdata.timestamp;<o:p></o:p></p>
<p class="MsoNormal">  sstrncpy( … host, plugin, type, type_instance, etc ...);<o:p></o:p></p>
<p class="MsoNormal">  plugin_dispatch_values(&vl);<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Other obvious alternatives would be (1) to write the plugin so it would average all values of interest and just report ONE set of data (and perhaps a metric for the number of GCs that occurred during that interval); or (2) to only report
 the most RECENT set of data, or (3) to have the read plugin interval much shorter than how fast I expect the GC to run. But if it’s possible, I’d rather get all of the instances recorded. Have any folks had to deal with such irregular values before?
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Dave <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>


</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>collectd mailing list</span><br><span><a href="mailto:collectd@verplant.org">collectd@verplant.org</a></span><br><span><a href="http://mailman.verplant.org/listinfo/collectd">http://mailman.verplant.org/listinfo/collectd</a></span><br></div></blockquote></body></html>