apprentice has asked for the wisdom of the Perl Monks concerning the following question:

I need to monitor for potential leaks of various resources (rss, vmem, fd, etc.) for certain processes running on a linux box, monitoring to be handled by a perl script.

I know all about how to get that information.

However, accurately detecting what is and is not a leak based on an array of values could be tricky.

For instance, some processes may be cyclical in use of certain resources, but max could irregularly increase over time and what about when the increase is only at the end of the list of values, etc.

In this case, it would be better to not have to reinvent the wheel, but I have not been able to find any such algorithms or modules via searching the web, cpan, etc.

Can anyone point me to any such algorithm(s) or contribute your thoughts to how to proceed?



"Peace, love, and Perl...well, okay, mostly just Perl!" --me

Apprentice
  • Comment on leak detection in other (non-perl) processes

Replies are listed 'Best First'.
Re: leak detection in other (non-perl) processes
by zentara (Cardinal) on Mar 23, 2012 at 22:14 UTC
Re: leak detection in other (non-perl) processes
by JavaFan (Canon) on Mar 23, 2012 at 18:34 UTC
    In this case, it would be better to not have to reinvent the wheel, but I have not been able to find any such algorithms or modules via searching the web, cpan, etc.
    I'm pretty sure I've used tools in the past that could do exactly like that.
    monitoring to be handled by a perl script.
    Ah, well, that's the killer.

    I'm 100% sure the tools I've used were not written in Perl.

      Yes, even if I can't find something written in perl, I can easily convert from another language.


      "Peace, love, and Perl...well, okay, mostly just Perl!" --me

      Apprentice

        I'm not exactly sure I understand what you want to achieve (finding out there are leaks vs. what exactly they are caused by), but as you're talking about non-Perl processes, it sounds like you're looking for generic tools like valgrind.

        Due to the complexity of the tool, however, it's beyond me why you would want to rewrite it in Perl (not to mention the ensuing performance issues...).