LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-05-2009, 09:49 PM   #1
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Rep: Reputation: 31
Diff between /sys/module and /proc/modules


Hello,
May i know what is the difference between /sys/modules and /proc/modules?

I know this /proc/modules is a file and this /sys/module is a directory. But i am confused. why this both is having similar information about currently running driver modules. sorry if i am wrong.
 
Old 12-06-2009, 06:12 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
/proc and /sys are usef for different purposes.

/proc/modules does not actually exist until you call it, at which point it is generated. For instance, if you query lsmod.

/sys/module is a directory which contains other directories. These directories contain files which have information about many things, which may include currently running modules as well as, without burdening you with technical jargon, other stuff. It is used by the kernel to figure out what to do.

eg.

simon@indigo-prime:~$ cat /proc/modules | grep processor
simon@indigo-prime:~$ ls /sys/module/processor
parameters

Here you see that there is information in /sys/module which is not in /proc/modules.

Of course, I can be more specific if I understand what prompted the question.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
/proc/sys/fs/file-nr ?? jharris Linux - General 5 07-27-2009 06:07 PM
Correlation between /proc/devices and /proc/modules ColinLadyka Linux - General 1 02-13-2006 05:25 PM
LM_Sensors proc V sys Weirdname Slackware 5 11-29-2005 08:22 PM
/proc vs /sys alaios Linux - Newbie 1 06-11-2005 11:56 PM
Diff. between f_bavail & f_bfree in statfs sys call??? nraddy AIX 4 07-21-2004 06:17 AM


All times are GMT -5. The time now is 04:00 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration