oss-sec mailing list archives
Re: [patch] proc.5: tell how to parse /proc/*/stat correctly
From: Steffen Nurpmeso <steffen () sdaoden eu>
Date: Thu, 29 Dec 2022 18:44:47 +0100
Alan Coopersmith wrote in <b31213da-5ea2-d1f8-dcb2-2917b787ce89 () oracle com>: |On 12/28/22 08:47, Demi Marie Obenour wrote: |> A binary format would be even better. No risk of ambiguity. | |That is how the Solaris (and now illumos) /proc has always worked - fewer |parsing problems, but you need to use tools to handle the contents, not |just cat/less/etc. | |https://docs.oracle.com/cd/E88353_01/html/E37852/proc-5.html I personally find it highly beneficial to grasp informations meant for human consumption with UNIX text tools. ..And still blinded by Pike's "just make it a string". If you have an FS="\0" compatible awk(1) (not nawk, not busybox awk (yet)) it is very easy to parse such text files. P.S.: CBOR .. if you want JSON. (The NetBSD folks got that long before it was hip, where i saw it first.) --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)
Current thread:
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly, (continued)
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly Demi Marie Obenour (Dec 28)
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly Jan Engelhardt (Dec 28)
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly Shawn Webb (Dec 28)
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly Demi Marie Obenour (Dec 28)
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly John Helmert III (Dec 28)
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly Shawn Webb (Dec 28)
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly Alejandro Colomar (Dec 28)
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly Theodore Ts'o (Dec 29)
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly Demi Marie Obenour (Dec 29)
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly Alan Coopersmith (Dec 29)
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly Steffen Nurpmeso (Dec 29)
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly David A. Wheeler (Dec 29)
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly Jeffrey Walton (Dec 29)
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly Steffen Nurpmeso (Dec 29)
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly Steffen Nurpmeso (Dec 28)
- RE: [patch] proc.5: tell how to parse /proc/*/stat correctly David Laight (Dec 31)
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly Solar Designer (Dec 31)
- Message not available
- Re: [patch] proc.5: tell how to parse /proc/*/stat correctly Jakub Wilk (Dec 30)