/proc & xml data
I remember hearing about various debates about the /proc structure. I was wondering if anyone had ever considered storing some of the data in xml format rather than its current format? Things like /proc/meminfo and cpuinfo may work good in this format as then it would be easy to write a generic xml parser that could then be used to parse any of the data. "MemTotal: %8lu kB\n"
In the case of the meminfo it would be a matter of changing the lines in fs/proc/array.c function get_meminfo(char * buffer) from
"MemTotal: %8lu kB\n"
to something like
"<memtotal>%8lu kB</memtotal>\n"
Joe
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 7 lines · Joe
I remember hearing about various debates about the /proc structure. I was wondering if anyone had ever considered storing some of the data in xml format rather than its current format? Things like
/proc/meminfoand cpuinfo may work good in this format as then it would be easy to write a generic xml parser that could then be used to parse any of the data. "MemTotal: %8lu kB\n"
Quoted 8 lines
In the case of the meminfo it would be a matter of changing the lines in
fs/proc/array.cfunctionget_meminfo(char * buffer)from"MemTotal: %8lu kB\n"
to something like
"<memtotal>%8lu kB</memtotal>\n"
The general consensus is that if we have a major reorganization, in proc the rule will be one value per file. And let directories do the grouping.
Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 2 lines · [email protected] (Eric W. Biederman) writes:
The general consensus is that if we have a major reorganization, in proc the rule will be one value per file. And let directories do the grouping.
IIRC some time ago somebody suggested to rename 'proc' to something like 'sys' or 'system', because it contains so many sytem information, not only about processes; or extract all non-process-information from proc to sys. Will this, or something like that, eventually be done while the reorganization?
moritz
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 3 lines
"MemTotal: %8lu kB\n"
to something like
"<memtotal>%8lu kB</memtotal>\n"
The latter form offers no significant advantage over the former at all - there is nothing that can be expressed as
<name>value</name>
which can't also be expressed as
name: value
or
name=value
and the latter format is significantly easier to parse.
The only situation where XML really would be useful would be some need of grouping, and this is done in /proc using directories. (Which are also much easier to parse using existing standard tools.)
Olaf
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/