Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How can I list scsi device ids under Linux?

share|improve this question
3  
Please take my previous comment about how to ask good questions seriously! Drop the "hi" and "thanks", make sure the first few lines or the question introduce the question instead of being meta data so that the home page summaries are useful, and always show what attempts you have made to solve problems yourself. I answered this question by copy and pasting a bit of it into google and copy and pasting a bit from the result summaries back to you (after checking it in my terminal). –  Caleb Jun 17 '11 at 11:04
add comment

2 Answers

up vote 1 down vote accepted

cat /proc/scsi/scsi
share|improve this answer
    
Is that it? ok:O –  LanceBaynes Jun 17 '11 at 11:04
add comment

I don't have /proc/scsi/scsi on my system with 2.6.39.1 kernel. I would use 'lsscsi' command:

~> lsscsi -v
[0:0:0:0]    disk    ATA      ST3500418AS      CC38  /dev/sda
  dir: /sys/bus/scsi/devices/0:0:0:0  [/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0]
[1:0:0:0]    disk    ATA      WDC WD2500KS-00M 02.0  /dev/sdb
  dir: /sys/bus/scsi/devices/1:0:0:0  [/sys/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0]
share|improve this answer
    
2.6.38.6 here and I do have it. I wonder if there is a kernel config option for providing that interface. The reference I found to using that proc entry was as old as the hills. Also my distro doesn't have lsscsi by default although I see there is an optional package for it. –  Caleb Jun 17 '11 at 19:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.