[lkml]   [1997]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Machine friendly format for /proc files
Date said:
} That sounds fairly good; I'm not sure whether we want 2D tables like /
} proc/net/dev to stay line-per-device, or be line-per-parameter; their
} 2D format does mean you'll have to keep track of both rows and columns
} anyway, and doesn't succumb to any compact 1D format...

Another thing to watch is that some of the (potentially) long tabular
files, such as /proc/net/route and /proc/net/ip_masquerade, use fixed
length records (they are padded up to 128 bytes per line), this allows
seeking into the data easily. That may not sound like a big advantage,
however the proc drivers only pass back a particular size chunk of data at
a time, so a sequential read of a large proc file actually results in a
series of calls to the proc file generating function, and with changing
data (such as the ip_masquerade timestamps) can mean that the chunks don't
"fit together" unless you are very careful (hence the use of fixed length

In any case the thing you read is not necessarily a snap shot of any
particular point in the kernel state... the first bit may come from one
point in time, the rest from another... and they need not be self
consistent :-(.



[ - Systems Software Engineer ]
[ Tel : +44 113 251 6012 Fax : +44 113 224 0003 ]
[ Dedicated to the replacement of sendmail! ]

 \ /
  Last update: 2005-03-22 13:38    [W:0.044 / U:5.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site