Re: Getting system info from the kernel

Doug Alcorn (doug@lathi.net)
15 Nov 1999 20:00:46 -0500


"Jeff Buckey" <jbuckey@earthlink.net> writes:

> I'm very sorry to post this question here but I can't seem to find this info
> anywhere else. I would like to know if there are (I presume there will be)
> any system calls in the Linux kernel to access information on the memory of
> the current system, such as amount of memory used, free, used swap, free
> swap...etc. Much like can be achieved by reading the /proc/meminfo
> file.

I am a newbie to the linux-kernel mailing list; however, I don't think
that system calls to the kernel for status info will be developed.
The point of /proc is to provide user space access to this information
without having to make syscalls to the kernel.

> Also what are the thoughts of people on this list as to using /proc/meminfo
> for this kind of task? I've been seeing some negative posts in other
> mailing lists as to using proc at all, although I think it's quite a nice
> feature.

Granted there is some "overhead" in creating the filehandles, but I
think /proc is the preferred way to go.

-- 
 (__)  Doug Alcorn           | program == list of computer instructions
 oo /  doug@lathi.net        | firmware == program that is not user modifiable
 |_/   http://www.lathi.net  | software == program that a user can modify
       Cincinnati, OH        | "If you don't have the source, it's not software"

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/