Device handling

From Stuff!
Jump to: navigation, search

List all devices on a system

lsdev

List all disk devices on a system

lsdev -Cc disk

List all customized (existing) device classes

lsdev -C -r class (-P for complete list)

Remove hdisk

rmdev -dl hdisk5

Get device address of hdisk

getconf DISK DEVNAME hdisk1 (or) bootinfo -o hdisk1

Get the size (in MB) of hdisk

getconf DISK SIZE /dev/hdisk1 (or) bootinfo -s hdisk1

List all disks belonging to scsi

lsdev -Cc disk -p scsi0

Find the slot of a PCI Ethernet adapter

lsslot -c pci -l ent0

Find the (virtual) location of an Ethernet adapter

lscfg -l ent1

Find the location codes of all devices in the system

lscfg

List all MPIO paths for hdisk

lspath -l hdisk0

Find the WWN of the fcs0 HBA adapter

lscfg -vl fcs0 | grep Network

Temporarily change console output to /console.out

swcons /console.out ! (Use swcons to change back.)

Get statistics and extended information on fcs0

fcstat fcs0