pcp
[Top] [All Lists]

Re: [pcp] JSON PMDA with indom cache changes

To: pcp@xxxxxxxxxxx
Subject: Re: [pcp] JSON PMDA with indom cache changes
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Fri, 05 Jun 2015 19:43:11 +1000
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <54437433.12427793.1433465221723.JavaMail.zimbra@xxxxxxxxxx>
References: <555DEF05.7030108@xxxxxxxxxx> <461406362.3814890.1432280874168.JavaMail.zimbra@xxxxxxxxxx> <55677BB7.3060805@xxxxxxxxxx> <1432466455.9615965.1433146915880.JavaMail.zimbra@xxxxxxxxxx> <2105731158.10292085.1433231032998.JavaMail.zimbra@xxxxxxxxxx> <55709952.9070209@xxxxxxxxxx> <54437433.12427793.1433465221723.JavaMail.zimbra@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
On 05/06/15 10:47, Nathan Scott wrote:
...
Hmm. Since we have fairly full control over commands here, we could do
something like the following (untested) patch. Basically we sort the
output of only the 'children json' dbpmda command


*nod* - this is what Ken's suggesting too.

I was thinking of using awk as a FSA to split the output stream into alternating no sort and sort pieces, then processing the sort pieces and then stitching the output back together.

I think this is simpler (easier to understand) than the read -u ... solution that is not portable (as per earlier mail) and could be a template that can be applied in the other places where this is an issue.

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