# Enabling "lsmod" and "lsdev"



## acottag (Apr 7, 2010)

Hello!

Sorry for this basic question, but...

How to enable [CMD=]lsmod[/CMD] and [CMD=]lsdev[/CMD] commands? I have been searching (although not with maximum scope) and I still didn't get to do it; I searched in ports and packages documentation.

Thanks in advance.


----------



## bschmidt (Apr 7, 2010)

I have no clue what `# lsdev` does, but for `# lsmod` you want to use `# kldstat`.


----------



## SirDice (Apr 7, 2010)

lsmod, lsins, lsdev are _linux_ commands. You will not find them on FreeBSD. FreeBSD's equivalents would be kldstat(8), kldload(8) and kldunload(8).


----------



## vermaden (Apr 7, 2010)

acottag said:
			
		

> How to enable [CMD=]lsmod[/CMD] and [CMD=]lsdev[/CMD] commands? I have been searching (although not with maximum scope) and I still didn't get to do it; I searched in ports and packages documentation.



This is not Linux mate, its BSD UNIX, commands are quite different 

[CMD="linux#"]lsdev[/CMD] FreeBSD equivalent is [CMD="freebsd#"]pciconf -l[/CMD] | [CMD="freebsd#"]pciconf -l -v[/CMD]

[CMD="linux#"]lsmod/modprobe/rmmod/insmod[/CMD] FreeBSD equivalents are [CMD="freebsd#"]kldstat/kldload/kldunload[/CMD]

[CMD="linux#"]depmod -a[/CMD] FreeBSD equivalents are [CMD="freebsd#"]kldxref ${MODULESDIR}[/CMD]


----------



## sixtydoses (Apr 7, 2010)

Rosetta Stone for Unix:
http://bhami.com/rosetta.html


----------



## acottag (Apr 7, 2010)

Thank you, thank you...


----------



## phoenix (Apr 7, 2010)

And, to complete the picture:

lsusb --> usbdevs
list SCSI devices --> camcontrol
list ATA/ATAPI devices --> atacontrol


----------



## vermaden (Apr 7, 2010)

phoenix said:
			
		

> [*]list SCSI devices --> camcontrol


This will also list SATA disks and USB devices (something like hda --> sda change in the _Linux_ world).


----------



## phoenix (Apr 8, 2010)

Only if you are using *options ATA_CAM* or *device ataahci* or *device ahci* in your kernel config.  IOW, camcontrol only lists devices controlled by the CAM subsystem, which doesn't include SATA devices by default.

Eventually, all block devices will be accessed via the CAM subsystem ... but we're not there yet.


----------



## vermaden (Apr 9, 2010)

phoenix said:
			
		

> Eventually, all block devices will be accessed via the CAM subsystem ... but we're not there yet.



Unfortunately 

BTW, does 8.1 AHCI work will be stable enoought that they will make it default? Any news on that?


----------



## phoenix (Apr 9, 2010)

I haven't seen any mention of that on the -stable or -hackers mailing list recently.  I would expect that a change like that wouldn't happen in a -STABLE series as it would rename all the disk device nodes and could lead to non-bootable systems and all kinds of panic in some users.  

There's also some issues, still, with CD/DVD drives being accessed via ATA_CAM (although ATA_CAM is a temporary hack).  On my home system, if I enable ATA_CAM, I can't access my DVD burner via cdrtools, cdrecord, burncd, wodim, or even just audio programs.


----------



## vermaden (Apr 9, 2010)

phoenix said:
			
		

> There's also some issues, still, with CD/DVD drives being accessed via ATA_CAM (although ATA_CAM is a temporary hack).  On my home system, if I enable ATA_CAM, I can't access my DVD burner via cdrtools, cdrecord, burncd, wodim, or even just audio programs.



Yes, I also have this problem with DVD burner :/

Hope AHCI work will move on and DVD support will be bring back some time (hope earilier then later).

Thanks for info on AHCI status.


----------

