From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9225 invoked by alias); 19 Apr 2011 09:02:23 -0000 Received: (qmail 9216 invoked by uid 22791); 19 Apr 2011 09:02:21 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.aconex.com (HELO postoffice2.aconex.com) (203.166.49.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 Apr 2011 09:02:06 +0000 X-ASG-Debug-ID: 1303203723-0157b44186100ec0001-Ms21ry Received: from postoffice.aconex.com (postoffice.yarra.acx [192.168.35.100]) by postoffice2.aconex.com with ESMTP id CHhwtbVBJtbIkCTe; Tue, 19 Apr 2011 19:02:03 +1000 (EST) X-Barracuda-Envelope-From: nscott@aconex.com Received: from gatekeeper.aconex.com (gatekeeper.yarra.acx [192.168.35.102]) by postoffice.aconex.com (Postfix) with ESMTP id 10ADFA502B1; Tue, 19 Apr 2011 19:02:03 +1000 (EST) Received: from localhost (localhost.localdomain [127.0.0.1]) by gatekeeper.aconex.com (Postfix) with ESMTP id D971AA00005; Tue, 19 Apr 2011 18:42:44 +1000 (EST) Received: from gatekeeper.aconex.com ([127.0.0.1]) by localhost (gatekeeper.aconex.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dvzz0Xpat4Zz; Tue, 19 Apr 2011 18:42:44 +1000 (EST) Received: from acxmail-au2.aconex.com (acxmail-au2.aconex.com [192.168.35.104]) by gatekeeper.aconex.com (Postfix) with ESMTP id 491EAA00004; Tue, 19 Apr 2011 18:42:44 +1000 (EST) Received: from localhost (localhost.localdomain [127.0.0.1]) by acxmail-au2.aconex.com (Postfix) with ESMTP id 5D0753B20002; Tue, 19 Apr 2011 19:02:02 +1000 (EST) Received: from acxmail-au2.aconex.com ([127.0.0.1]) by localhost (acxmail-au2.aconex.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QOlxmnNRckVO; Tue, 19 Apr 2011 19:02:02 +1000 (EST) Received: from acxmail-au2.aconex.com (acxmail-au2.aconex.com [192.168.35.104]) by acxmail-au2.aconex.com (Postfix) with ESMTP id 3CD4D3B20001; Tue, 19 Apr 2011 19:02:02 +1000 (EST) Date: Tue, 19 Apr 2011 09:02:00 -0000 From: Nathan Scott To: David Smith Cc: Systemtap List , pcp Message-ID: <312866935.22345.1303203722126.JavaMail.root@acxmail-au2.aconex.com> In-Reply-To: <4DAC81F3.5050400@redhat.com> Subject: Re: logger PMDA review MIME-Version: 1.0 X-ASG-Orig-Subj: Re: logger PMDA review Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Barracuda-Connect: postoffice.yarra.acx[192.168.35.100] X-Barracuda-Start-Time: 1303203723 X-Barracuda-URL: http://postoffice2.aconex.com:8000/cgi-mod/mark.cgi X-Barracuda-Bayes: INNOCENT GLOBAL 0.2235 1.0000 -0.7064 X-Barracuda-Spam-Score: -0.71 X-Barracuda-Spam-Status: No, SCORE=-0.71 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.61296 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2011-q2/txt/msg00109.txt.bz2 ----- Original Message ----- > On 04/17/2011 06:21 PM, Nathan Scott wrote: > ... > 'Install' could certainly check for valid PMNS names, but there is > also > nothing from keeping a user from editing the config file by hand so > the code will still have to check. *nod* > Isn't an '_' a valid PMNS name character > (as long as it isn't the 1st char)? Yep, good point, sure is. > > - add a counter metric with nevents seen? > > Hmm. That's tricky since the number of events seen would be client > specific. I meant more the number of (e.g.) lines read in the log file, which would be more of a global event count (count since the pmda started) ... as an example, we've had to diagnose issues recently where an app was meant to be writing to syslog but if misconfigured was not ... it might have been helpful to have such a counter in this scenario. And while at it, a counter for the number of bytes seen would help tracking how much log traffic is being sent at any time (also would've helped us recently, and still would be useful actually). > > > - use of gettimeofday() - might be better to have option of > > parsing a timestamp from the line(s) of file and using that? > > I'll probably leave that one for now, until we get a bit further down > the road of figuring out exactly how we will use this. > OK, no problem. Depending on how the file-read/select loop ends up, this timestamp could easily be several seconds after the event, and the log file might have a high resolution timestamp just waiting to be parsed. > > util.c > > - start_cmd should be popen(2)? more portable (works on Windows) > > (maybe not, due to need to kill it? -- __pmProcessCreate?) > > Right, the need to kill the subprocess on exit is why I didn't use > popen(). I see __pmProcessCreate() now, but it also doesn't return the > pid. Wow, that was short-sighted of me ... that can be fixed though using the existing API, just nothing needed the PID so far. Will take a look. > > percontext.c > > - wonder if some of this should become generic libpcp_pmda code, > > similarities with pmdasample's needs. > > It is possible. I certainly started with the sample PMDA percontext.c, > and tried to make it a bit more generic. Once we get one or two more real PMDAs, might be worth revisiting - yeah, noticed yours was a bit more generic than pmdasample & looked like a move in the right direction. cheers. -- Nathan