[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

[LI] Re : can't read /proc/meminfo



Hi,
  Well, you should not have any problem open()ing and read()ing from
the /proc file. Use a fairly large buffer and check the no. of bytes
returned, and use offsets into the buffer to parse and convert to
integer instead of lseek(). The /proc files usually show a size of
zero since the read(), write() are to kernel-level functions and not
to actual *physical* files. Well, how about the sysinfo() lib. call
instead of all this parsing business? Libraries are for making your
life simpler....
Bye
- --vml
Model Engg. College
Cochin


_______________________________________________________
Are you a Techie? Get Your Free Tech Email Address Now!
Many to choose from! Visit http://www.TechEmail.com
- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/
The Linux India mailing list does not accept postings in HTML format.

------------------------------