cancel
Showing results for 
Search instead for 
Did you mean: 

linux

sandeep mathur
Respected Contributor

linux

what is the command used to find i/o devices in linux and the commnd used to find all file systems in linux.
3 REPLIES
Maaz
Valued Contributor

Re: linux

I thinks there is no single command that lets you know all the i/o devices attached to a linux box.

siga(it comes out of the box with SUSE), and hwinfo will help you

> but you may find
run the following command
# df -hT



Justin_99
Valued Contributor

Re: linux

Try cat /proc/scsi/scsi this will show you scsi attached devices. You can also cat /proc/partitions and see disk partitions that the system sees.

Example below shows storage and tape drives.

# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: LSI Model: INF-01-00 Rev: 0612
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 00 Lun: 01
Vendor: LSI Model: INF-01-00 Rev: 0612
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 00 Lun: 02
Vendor: LSI Model: INF-01-00 Rev: 0612
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 00 Lun: 03
Vendor: LSI Model: INF-01-00 Rev: 0612
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 00 Lun: 04
Vendor: LSI Model: INF-01-00 Rev: 0612
<<>>
Host: scsi0 Channel: 00 Id: 02 Lun: 01
Vendor: IBM Model: ULT3580-TD3 Rev: 69U2
Type: Sequential-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 02 Lun: 02
Vendor: IBM Model: ULTRIUM-TD3 Rev: 5CM0
Type: Sequential-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 02 Lun: 03
Vendor: ADIC Model: SNC Invl Rev: 42dG
Type: Unknown ANSI SCSI revision: 03

#cat /proc/partitions
major minor #blocks name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq

66 0 978321408 sdag 23 66 178 100 0 0 0 0 0 100 100
66 1 21511003 sdag1 1 3 8 0 0 0 0 0 0 0 0
66 2 21511035 sdag2 1 3 8 10 0 0 0 0 0 10 10
66 3 102406342 sdag3 1 3 8 10 0 0 0 0 0 10 10
66 4 1 sdag4 1 0 2 0 0 0 0 0 0 0 0
66 5 2048256 sdag5 0 0 0 0 0 0 0 0 0 0 0
66 6 2048256 sdag6 0 0 0 0 0 0 0 0 0 0 0
66 7 2048256 sdag7 0 0 0 0 0 0 0 0 0 0 0
66 8 2048256 sdag8 0 0 0 0 0 0 0 0 0 0 0
66 9 2048256 sdag9 0 0 0 0 0 0 0 0 0 0 0
66 10 2048256 sdag10 0 0 0 0 0 0 0 0 0 0 0
66 11 820600168 sdag11 0 0 0 0 0 0 0 0 0 0 0
66 16 978416640 sdah 6 18 48 20 0 0 0 0 0 20 20
66 17 978414696 sdah1 1 3 8 10 0 0 0 0 0 10 10
66 32 1060110336 sdai 6 18 48 20 0 0 0 0 0 20 20
66 33 1060105221 sdai1 1 3 8 0 0 0 0 0 0 0 0
66 48 1060110336 sdaj 6 18 48 10 0 0 0 0 0 10 10
66 49 1060105221 sdaj1 1 3 8 0 0 0 0 0 0 0 0
66 64 1059425536 sdak 6 18 48 20 0 0 0 0 0 20 20
66 65 1059422458 sdak1 1 3 8 0 0 0 0 0 0 0 0
8 0 978321408 sda 174579 3036932 25689432 904410 198393 1925418 16844106 2158390 0 733390 3063560
8 1 21511003 sda1 26159 152021 1425269 476110 80375 82379 1245382 125090 0 255740 601190
8 2 21511035 sda2 17579 82020 796628 99000 11568 19602 249363 106020 0 88250 205040
<>>

Possibly use something as simple as fdisk to check a device.
# fdisk -l /dev/sde

Disk /dev/sde: 255 heads, 63 sectors, 131892 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/sde1 1 131892 1059422458+ 83 Linux


~sesh
Esteemed Contributor

Re: linux

Rightly said, there is no single command to get all hardware information.

However, you can use the CFG2HTML utility to extract the information (hardware & logs) and display it in a single web page.

Check it at:
http://www.cfg2html.com/