[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <88be2564-c5cf-58f5-b35c-d61e1db504de@chandergovind.org>
Date: Wed, 12 Jul 2023 10:39:54 +0530
From: Chander Govindarajan <mail@...ndergovind.org>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH iproute2] misc/ifstat: ignore json_output when run using
"-d"
Hi,
So, this does solve the problem correctly, in the sense:
1. First you should start ifstat in daemon mode (without -j, with the
patch, it will anyway be ignored)
2. Then, you can run ifstat in normal or in json mode; where it will
connect to the daemon, get back results and then print it in the
required format (table or json).
So, this patch only ensures that the communication between the daemon
and other instances happen correctly (not in json).
PS: in the process of testing this, I figured out a bug in the -j mode,
I will submit a separate patch. :-)
Regards,
Chander
On 7/12/23 02:00, Stephen Hemminger wrote:
> On Mon, 10 Jul 2023 16:15:22 +0530
> Chander Govindarajan <mail@...ndergovind.org> wrote:
>
>> If ifstat is run with a command like:
>> ifstat -d 5 -j
>>
>> subsequent commands (with or without the "-j" flag) fail with:
>> Aborted (core dumped)
>>
>> Unsets json_ouput when using the "-d" flag. Also, since the "-d"
>> daemon behaviour is not immediately obvious, add a 1 line
>> description in the man page.
>>
>> Signed-off-by: ChanderG <mail@...ndergovind.org>
>
> Rather than avoiding the problem, why not have ifstat support json in daemon mode?
Powered by blists - more mailing lists