LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-09-2006, 11:10 PM   #1
arunka
Member
 
Registered: Mar 2005
Posts: 60

Rep: Reputation: 15
A C program to get Memory info


Hi All,

I am new to linux .i want to write a C program to get memory slot information (like no of memory slots on the board,no of slots occupied and size of the each occupied slot and other details) and BIOS information also.

Is there any /proc entries from which i can get these info or any IOCTL calls to retrieve this info from the drivers?

thanks,
Arun
 
Old 02-10-2006, 12:50 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Reading "man proc" will give you explanation of all info shown there.
Running "ls /usr/share/man/man2" will show the available system calls.
 
Old 02-10-2006, 03:33 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Have a look at the source code of lshw :}
It's C++, but you may be able to get some ideas from it ;)


Cheers,
Tink
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory/Disk Info cherukuri_sr Linux - General 3 04-08-2005 10:11 AM
Detailed Memory Info MarkhamNR Linux - Hardware 0 03-22-2005 03:53 PM
Wrong memory info in gnome-system-monitor after 2.6.6 kernel upgrade corezapr Linux - Software 1 06-14-2004 03:57 AM
Memory Leak when using memory debugging C program on SuSE SLES8 babalina Linux - Distributions 0 10-06-2003 09:39 AM
Program to Back-Up info nick Programming 1 01-17-2002 10:26 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration