Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Aug 2025 13:29:29 +0300
From:      Anthony Pankov <anthony.pankov@yahoo.com>
To:        "Isaac (.ike) Levy" <ike@blackskyresearch.net>
Cc:        Tomoaki AOKI <junchoon@dec.sakura.ne.jp>,  Poul-Henning Kamp <phk@phk.freebsd.dk>,  Vadim Goncharov <vadimnuclight@gmail.com>,  David Chisnall <theraven@FreeBSD.org>,  Konstantin Belousov <kostikbel@gmail.com>, hackers@freebsd.org
Subject:   Re: My experiences with Rust
Message-ID:  <277027377.20250825132929@yahoo.com>
In-Reply-To: <A56F576C-6748-47E1-91AA-8A33D20DFD19@blackskyresearch.net>
References:  <aKiWZ1I3pqZSOsfk@kib.kiev.ua> <202508221712.57MHCPDl008201@critter.freebsd.dk>  <E04D6E14-8EA1-446B-8C9C-762C9956F6D5@FreeBSD.org> <20250822214848.25569826@nuclight.lan> <202508221937.57MJbBtK008806@critter.freebsd.dk> <20250823002942.305119b2@nuclight.lan> <202508222133.57MLXtAA009189@critter.freebsd.dk> <20250823073225.ecf498cc3e7a6dcb68ccc3c8@dec.sakura.ne.jp> <1614139543.20250823141311@yahoo.com> <A56F576C-6748-47E1-91AA-8A33D20DFD19@blackskyresearch.net>

next in thread | previous in thread | raw e-mail | index | archive | help



>> On Aug 23, 2025, at 7:13 AM, Anthony Pankov <anthony.pankov@yahoo.com> wrote:
>> On 23 августа 2025 г., 1:32:25 you wrote:
>> ..
>>> For output-only data from kernel TO BE LOGGED, text-only format would be
>>> strictly wanted to read/process using oldies-but-goodies tools like
>>> less, grep, awk, sed and any other thing to handle texts.
>> 
>> I have a conceptual question. How to ensure reliability of recognizing
>> events    coded    in    log    string?   There is no information of all
>> mutations   which  log string can take. 'grep "\d+ dropped"' will
>> do  the job well for "200 dropped" till log string has a form "dropped
>> 100" or "150\s\sdropped". In latter cases event will be missed.

> Great question.  I'm not savvy to that '\d+' (egrep thing?), but
> the problem you presented hits right at the core of this "text v binary output" conversation.

> Certainly, utilities may return data whose structure is not ideal
> for every case, (even as "structure"), but depending on what needs
> to accomplish, there are 50 years of UNIX utilites which can solve a
> diverse number of problems users may face.

> Expanding the case you provided, lets say "myprogram" returns the
> following "structured" output lines:

> $ myprogram
> foo dropped 1/2 foo
> bar sortof double! dropped bar
> baz dropped 2/2 baz
> bang sortof last bang
> $

The spot point of this case  is "myprogram" with well known source . What about "outerprogram"
or any tool from base system?
How  to guarantee that I'll get all events of something "dropped"? Can
I  be sure that "outerprogram" will always preserve output format and
never write line like

 "fatal: dropping all"

 In this case my parser pipeline will completely miss this.


-- 
Best regards,
 Anthony  Pankov                        mailto:anthony.pankov@yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?277027377.20250825132929>