lkml.org 
[lkml]   [2001]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] 2.5 PROPOSAL: Replacement for current /proc of shit.
    At 11:12 AM +1100 11/5/01, Rusty Russell wrote:
    >Firstly, do not perpetuate the myth of /proc being "human readable". (Hint:
    >what language do humans speak?) It supposed to be "admin readable" and
    >"machine readable".

    That's the key observation, seems to me. In our development, we've
    adopted a standard of tagged values, where a single-value file is
    tagged by its name, and multiple-value files have a tag:value per
    line (where value might be an n-tuple).

    The result is easy to parse for userland code that needs the values
    and relatively easy (because ASCII and consistent) for admins to
    read. A pretty-printer provides an interface for mere humans.

    I suppose one could add typing information as well, but it seems to
    me that a reader of /proc/stuff is either completely ignorant of the
    content (eg cat), and typing is irrelevant, or it knows what's there
    (eg ps) and typing is redundant, as long as there are unambiguous
    tags.

    I think of the tagged list of n-tuples as a kind of ASCII
    representation of a simple struct. One could of course create a
    general ASCII representation of a C struct, and no doubt it's been
    done innumerable times, but I don't think that helps in this
    application.

    Of course, one tagged value can be "version"....
    --
    /Jonathan Lundell.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:12    [W:0.023 / U:118.928 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site