<div dir="ltr">I was extending the virt plugin.<div>It already collects similar data (about VMs) using Libvirt's API, but lacks disk usage information.</div><div><br><div><div>I went through some hoops to link libguestfs correctly to collectd.</div><div>Is it okay to just include fork(), waitpid() example? It does reproduce the issue.</div><div><br clear="all"><div><div dir="ltr" class="m_-8880466956463280130gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Best Regards,<br>Peter</div></div></div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 13, 2018 at 1:34 PM Richard W.M. Jones <<a href="mailto:rjones@redhat.com" target="_blank">rjones@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Nov 13, 2018 at 12:00:19PM +0100, Florian Forster wrote:<br>
> Hi,<br>
> <br>
> thank you very much for reporting this! Sounds like a bug in the exec plugin –<br>
> it never ceases to amaze me how many issues a single plugin can have ;)<br>
> <br>
> > > > This means that any plugin that does the usual pattern of:<br>
> > > > <br>
> > > >   pid = fork ();<br>
> <br>
> Note that the exec plugin is the *only* plugin that does this. All other<br>
> plugins are forbidden to fork(), popen() or create new processes in any other<br>
> way. The only plugin doing that, the exec plugin, has had enough issues over<br>
> the years for me to feel justified in that decision. ;-)<br>
> <br>
> As mentioned before, a Github issue would be appreciated so we can properly<br>
> track this problem.<br>
<br>
I don't know if Peter is using the exec plugin or is trying to write<br>
an ordinary plugin.  However the library he is using (libguestfs)<br>
certainly does fork subprocess(es).<br>
<br>
Rich.<br>
<br>
-- <br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones" rel="noreferrer" target="_blank">http://people.redhat.com/~rjones</a><br>
Read my programming and virtualization blog: <a href="http://rwmj.wordpress.com" rel="noreferrer" target="_blank">http://rwmj.wordpress.com</a><br>
virt-builder quickly builds VMs from scratch<br>
<a href="http://libguestfs.org/virt-builder.1.html" rel="noreferrer" target="_blank">http://libguestfs.org/virt-builder.1.html</a><br>
</blockquote></div>