LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 08-01-2008, 10:51 PM   #1
rtrdspok
LQ Newbie
 
Registered: Jul 2008
Posts: 12

Rep: Reputation: 0
lsmod


If lsmod shows 0 in the Used column, does it necessarily mean the module
is not used by any software, or does it mean there is no software
dependent on it?
 
Old 08-01-2008, 10:55 PM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
http://www.linuxquestions.org/questi...ndence-597958/
 
Old 08-01-2008, 11:21 PM   #3
rtrdspok
LQ Newbie
 
Registered: Jul 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for the response Mr. C. I think I'm missing something in that
the link doesn't say if it isn't used for networking/internet or
otherwise. I have a module (ipw2100) which I believe, according to
iwconfig, is in use as eth1. I'm using it to write/send this, and it
is labeled with Used = 0 in lsmod. Can you or someone else straighten me out on this?
 
Old 08-02-2008, 12:19 AM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
I believe it is the number of modules that use or depend upon that module. It is a reference count.

If rmmod lets you remove it, it is not currently in use.

Use

lsof | grep ipw2100

to see which processes are referencing (if 0, there should be none).
 
Old 08-03-2008, 11:11 AM   #5
rtrdspok
LQ Newbie
 
Registered: Jul 2008
Posts: 12

Original Poster
Rep: Reputation: 0
There are three lines at lsof | grepipw2100. All belong to root.
It looks like there are three processes that use ipw2100. Is that
correct?
I looked at http://www.ibm.com/developerworks/ai...y/au-lsof.html
but when I tried several of the examples there I get no returns. I did
get a return for this>
jim@Bravo:~$ sudo lsof | grep ipw2100
[sudo] password for jim:
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/jim/.gvfs
Output information may be incomplete.
ipw2100/0 2977 root cwd DIR 8,1 4096 2 /
ipw2100/0 2977 root rtd DIR 8,1 4096 2 /
ipw2100/0 2977 root txt unknown /proc/2977/exe

Thank you for your help.
 
Old 08-03-2008, 12:08 PM   #6
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
So we can see ipw2100 has a process entry in /proc (PID=2977), it has / open twice. And from your lsmod, there are no modules that depend upon ipw2100 or use ipw2100.

I believe the ref count is for rmmod, which will not remove a module until the ref count is at 0. This prevents rmmod from removing a module that is needed by other modules.
 
Old 08-03-2008, 06:22 PM   #7
rtrdspok
LQ Newbie
 
Registered: Jul 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Thank you Mr. C. I now know that the refcount must be decremented to
zero. I have looked for over 2 hours on google/answers for a way to
decrement the refcount. So far, I haven't found anything that I believe
would apply. It looks like the problem may be that root tried to
remove the driver, twice, but the refcount did not do as it should. Can you point me
in the direction of where to look? Using sudo locate ipw2100 then nano
a lot of files listed after locate... I have tried to find
the place where it increases/decreases but have not. Am I looking in the
right place? Thanks for a response.
 
Old 08-03-2008, 07:26 PM   #8
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
I dont' think I get what you're trying to do?

You can bring down the eth1 interface, and the rmmod the module if you're just trying to learn what happens.
 
Old 08-03-2008, 09:34 PM   #9
rtrdspok
LQ Newbie
 
Registered: Jul 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Mr. C. thanks for the reply. I have had eth1 1 up,down, and around. I am trying to find the reason this computer will connect to a network but not the internet, at one and only one open network. All other open
sites work as they should, the problem site works if wired. Just not in wireless. I think it is in the
ipw2100. At least if I can remove that as a possibility, I am closer to a solution.
 
Old 08-03-2008, 09:43 PM   #10
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
Oh, well that's another matter altogether!

Let me suggest you open a new thread with a subject along the lines of how to get your wireless to work correctly. It may attract more attention that this lsmod thread.
 
  


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
Can't find lsmod da_marius Linux - Newbie 8 06-19-2006 04:46 PM
lsmod show nothing... sesteban Debian 0 07-18-2004 04:46 PM
Why can't I use lsmod rmmod etc JohnSharp Linux - Newbie 4 04-08-2004 11:11 AM
Can't Use lsmod/modprobe... lramos85 Linux - Newbie 2 03-08-2004 09:41 PM
lsmod shoot2kill Linux - General 5 04-29-2002 10:42 PM


All times are GMT -5. The time now is 04:14 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