pcp
[Top] [All Lists]

Re: [pcp] Hotproc fixes

To: Nathan Scott <nathans@xxxxxxxxxx>
Subject: Re: [pcp] Hotproc fixes
From: Martins Innus <minnus@xxxxxxxxxxx>
Date: Wed, 29 Apr 2015 14:53:53 -0400
Cc: myllynen@xxxxxxxxxx, pcp@xxxxxxxxxxx
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <806884984.5885784.1429839438565.JavaMail.zimbra@xxxxxxxxxx>
References: <5536A934.8040002@xxxxxxxxxxx> <5537A154.2090803@xxxxxxxxxx> <5537A3F3.5060204@xxxxxxxxxxx> <233739221.5258413.1429764654377.JavaMail.zimbra@xxxxxxxxxx> <55392BAB.3060101@xxxxxxxxxxx> <806884984.5885784.1429839438565.JavaMail.zimbra@xxxxxxxxxx>
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0
Nathan,

On 4/23/2015 9:37 PM, Nathan Scott wrote:
I've updated the QA a little in my tree (please review), then found another
small issue I think, in the store handler, where it ignores an empty string.

I had expected to be able to use that to switch off the monitoring - is that
not right?

$ sudo pmstore hotproc.control.config ""
hotproc.control.config old value="(fname == "pmdaproc")" new value=""
$ sudo pmstore hotproc.control.config ""
hotproc.control.config old value="(fname == "pmdaproc")" new value=""
$ sudo pmstore hotproc.control.config ""
hotproc.control.config old value="(fname == "pmdaproc")" new value=""


This should be all done here:

https://github.com/ubccr/pcp/tree/hotproc_cleanups

Also included some other cleanup suggestions from Marko, the ability to reload the config file, updated qa hopefully for all the changes, merged the manpage into procpmda, and added a new error code. Feel free to drop that last one if you think its unnecessary. It should be its own commit.

Also, my lex/yacc knowledge is pretty basic so let me know if those changes should be done differently.

Martins



commit 4cef14619b682c91f982b103e4751416e354e3d1
Author: Martins Innus <minnus@xxxxxxxxxxx>
Date:   Wed Apr 29 18:46:09 2015 +0000

    hotproc - add a new error code for malformed pmstore input

 qa/006.out                  | 2 +-
 qa/982.out                  | 2 +-
 src/include/pcp/pmapi.h     | 1 +
 src/libpcp/src/err.c        | 2 ++
 src/pmdas/linux_proc/pmda.c | 2 +-
 5 files changed, 6 insertions(+), 3 deletions(-)

commit e20343ea9ae4dc228d3250a9019c08fb60ddbffc
Author: Martins Innus <minnus@xxxxxxxxxxx>
Date:   Wed Apr 29 17:39:03 2015 +0000

    hotproc - update the pmdaproc manpage with hotproc information

src/pmdas/linux_proc/pmdaproc.1 | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 163 insertions(+)

commit 6dcab33eed485c0f534c7b52700664b82520b250
Author: Martins Innus <minnus@xxxxxxxxxxx>
Date:   Wed Apr 29 17:29:30 2015 +0000

    hotproc - Allow config file reload

    By using: pmstore hotproc.control.reload_config "1"
    the config file can be forced to be reloaded.

    Also cleaned up some duplicated code.

 src/pmdas/linux_proc/hotproc.h     |  1 +
 src/pmdas/linux_proc/pmda.c        | 13 +++++++++++++
 src/pmdas/linux_proc/pmdahotproc.1 |  3 +++
 src/pmdas/linux_proc/proc_pid.c    | 13 +++++++------
 src/pmdas/linux_proc/root_proc     |  1 +
 5 files changed, 25 insertions(+), 6 deletions(-)

commit a00be8d350ab4eac1ce900dcbf2e737a0d79e4a3
Author: Martins Innus <minnus@xxxxxxxxxxx>
Date:   Wed Apr 29 16:46:57 2015 +0000

    hotproc - disallow hotproc.conf with global write mode

 src/pmdas/linux_proc/config.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

commit c61371d39aec7e4d3df3d4bf03ba5d1879bf3b44
Author: Martins Innus <minnus@xxxxxxxxxxx>
Date:   Wed Apr 29 16:32:55 2015 +0000

    hotproc - update qa for recent config changes

    Test hotproc disable and bad input

 qa/982     | 5 +++++
 qa/982.out | 6 ++++++
 2 files changed, 11 insertions(+)

commit 288421ef56a8402aab0a2f0e7d033720443ed7dd
Author: Martins Innus <minnus@xxxxxxxxxxx>
Date:   Wed Apr 29 15:30:04 2015 +0000

    hotproc - support disabling via pmstore

    Support: pmstore hotproc.control.config ""
    to disable hotproc.

    Also, some comments and other cleanups

 src/pmdas/linux_proc/config.c   | 20 ++++++++++++++------
 src/pmdas/linux_proc/error.c    |  6 +++---
 src/pmdas/linux_proc/gram.y     | 12 ++++++++----
 src/pmdas/linux_proc/hotproc.c  |  2 +-
 src/pmdas/linux_proc/lex.l      |  8 +++++++-
 src/pmdas/linux_proc/pmda.c     | 10 +++++++++-
 src/pmdas/linux_proc/proc_pid.c | 10 ++++++++++
 src/pmdas/linux_proc/proc_pid.h | 12 ++++++++++--
 8 files changed, 62 insertions(+), 18 deletions(-)

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