OpenQNX :: The QNX Community Portal

Jul 19, 2008 - 03:30 PM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 36 unlogged users and 1 registered user online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
kushalkoolwal
Post subject: Know which drivers are being used by QNX6?  PostPosted: Apr 15, 2008 - 06:26 PM
Active Member


Joined: Sep 01, 2006
Posts: 23

Hi,

I have been reading manuals (User Guides, utility reference) but I was not able to find anything which tells me what hard ware driver my system is using currently.

For example, if I want to know the name of the driver being used by io-net, how can I do it? Similarly for my PCMCIA card, Graphics Card, etc?

I know I can look it up at on QNX Hardware support site
but it is very cumbersome as first I will have to find out the hardware name and version and then check against the database in the above link.

Is there anything like lsmod (in Unix, Linux) on QNX6?

Thanks
 
 View user's profile Send private message  
Reply with quote Back to top
rgallen
Post subject: Re: Know which drivers are being used by QNX6?  PostPosted: Apr 15, 2008 - 07:51 PM
QNX Master


Joined: Jul 11, 2002
Posts: 600

kushalkoolwal wrote:
Hi,

I have been reading manuals (User Guides, utility reference) but I was not able to find anything which tells me what hard ware driver my system is using currently.

For example, if I want to know the name of the driver being used by io-net, how can I do it? Similarly for my PCMCIA card, Graphics Card, etc?

I know I can look it up at on QNX Hardware support site
but it is very cumbersome as first I will have to find out the hardware name and version and then check against the database in the above link.

Is there anything like lsmod (in Unix, Linux) on QNX6?

Thanks


This is QNX, drivers are not in the kernel, they are regular processes (or libraries in regular processes).

Thus, there is no need for a special command like lsmod, which has to dig into the kernel via a special interface to determine what drivers are installed.

In QNX you query for drivers, exactly as you would for processes, using pidin (you could use ps, but it has a yucky UI).

So, if the driver is a process:

# pidin

If the driver is a shared library (DLL) then:

# pidin mem (to see DLLs that are mapped into the process)

For example, on my system (QNX running on VMware), I just ran:

Code:

# pidin -pio-net mem                                                           
     pid tid name               prio STATE           code  data         stack 
   81935   1 sbin/io-net         10o SIGWAITINFO       64K  480K  8192(516K)* 
   81935   2 sbin/io-net         20o RECEIVE           64K  480K  4096(132K)   
   81935   3 sbin/io-net         10o RECEIVE           64K  480K   4096(68K)   
   81935   4 sbin/io-net         10o RECEIVE           64K  480K   4096(68K)   
   81935   5 sbin/io-net         10o RECEIVE           64K  480K   4096(68K)   
   81935   6 sbin/io-net         21r RECEIVE           64K  480K  4096(132K)   
            libc.so.2          @b0300000             360K   12K               
            npm-tcpip.so       @b8200000             276K   24K               
            devn-pcnet.so      @b824d000              40K  4096               
            sbin/io-net        @ 8046000 (       0)        8192               
            sbin/io-net        @b035d000 (       0)        4096               


Sure, enough VMware emulates the AMD pcnet NIC, and that is the driver that is loaded (as a shared library) into io-net. What could be simpler?
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
mario
Post subject: RE: Re: Know which drivers are being used by QNX6?  PostPosted: Apr 15, 2008 - 08:05 PM
QNX Master


Joined: Sep 01, 2002
Posts: 2773

I could be simpler if I could know the arguments passed to each driver Wink
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
rgallen
Post subject: Re: RE: Re: Know which drivers are being used by QNX6?  PostPosted: Apr 15, 2008 - 08:14 PM
QNX Master


Joined: Jul 11, 2002
Posts: 600

mario wrote:
I could be simpler if I could know the arguments passed to each driver Wink


I assume you are referring to the case whether the driver is mounted?

Well, since you are volunteering, the source is on F27, so you can add the ability for the mount() handler to stuff the args away somewhere (in a thread_key, might be a good place), and then define an interface by which pidin can retrieve them (a generic ability for pidin to extract arbitrary thread key data would be very useful actually Wink
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
kushalkoolwal
Post subject: Re: Know which drivers are being used by QNX6?  PostPosted: Apr 15, 2008 - 08:40 PM
Active Member


Joined: Sep 01, 2006
Posts: 23

rgallen wrote:
kushalkoolwal wrote:
Hi,

I have been reading manuals (User Guides, utility reference) but I was not able to find anything which tells me what hard ware driver my system is using currently.

For example, if I want to know the name of the driver being used by io-net, how can I do it? Similarly for my PCMCIA card, Graphics Card, etc?

I know I can look it up at on QNX Hardware support site
but it is very cumbersome as first I will have to find out the hardware name and version and then check against the database in the above link.

Is there anything like lsmod (in Unix, Linux) on QNX6?

Thanks


This is QNX, drivers are not in the kernel, they are regular processes (or libraries in regular processes).

Thus, there is no need for a special command like lsmod, which has to dig into the kernel via a special interface to determine what drivers are installed.

In QNX you query for drivers, exactly as you would for processes, using pidin (you could use ps, but it has a yucky UI).

So, if the driver is a process:

# pidin

If the driver is a shared library (DLL) then:

# pidin mem (to see DLLs that are mapped into the process)

For example, on my system (QNX running on VMware), I just ran:

Code:

# pidin -pio-net mem                                                           
     pid tid name               prio STATE           code  data         stack 
   81935   1 sbin/io-net         10o SIGWAITINFO       64K  480K  8192(516K)* 
   81935   2 sbin/io-net         20o RECEIVE           64K  480K  4096(132K)   
   81935   3 sbin/io-net         10o RECEIVE           64K  480K   4096(68K)   
   81935   4 sbin/io-net         10o RECEIVE           64K  480K   4096(68K)   
   81935   5 sbin/io-net         10o RECEIVE           64K  480K   4096(68K)   
   81935   6 sbin/io-net         21r RECEIVE           64K  480K  4096(132K)   
            libc.so.2          @b0300000             360K   12K               
            npm-tcpip.so       @b8200000             276K   24K               
            devn-pcnet.so      @b824d000              40K  4096               
            sbin/io-net        @ 8046000 (       0)        8192               
            sbin/io-net        @b035d000 (       0)        4096               


Sure, enough VMware emulates the AMD pcnet NIC, and that is the driver that is loaded (as a shared library) into io-net. What could be simpler?


Thanks rgallen for the detailed explanation. That was helpful.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.