pcp
[Top] [All Lists]

Log Import files not closed

To: pcp developers <pcp@xxxxxxxxxxx>
Subject: Log Import files not closed
From: Martins Innus <minnus@xxxxxxxxxxx>
Date: Fri, 19 Aug 2016 08:51:18 -0400
Delivered-to: pcp@xxxxxxxxxxx
Hi,
        Hopefully this is an easy thing Iâm missing.ÂIâm using the python Log 
Import api in a loop. ÂBasically:


log = pmi.pmiLogImport( incrementing_file_name )

âdo all the stuffâ

log.pmiWrite(seconds, useconds)
del log


Over and over again. ÂAfter a while, I hit an open file descriptor limit. ÂAnd 
using lsof, shows all the files I had ever opened, still being open. I tried a 
log.pmiEnd() in addition to the âdel logâ with no success.


Looking through the code, it seems I need to getÂ__pmLogClose called somehow, 
but I canât seem to figure out how to do it from python.

Thanks for any suggestions on how to make this work.

Thanks

Martins

<Prev in Thread] Current Thread [Next in Thread>