AIX触ってて思うのは、デバイスの親子関係がよくわからんなぁ・・・
Linuxだったら、色々調べる方法あるのに・・・・・。
って思うことが度々ありました(単にスキル不足なんですが)
で、ちょっと調べてたら面白いスクリプトが見つかったのでご紹介します。
出展はこちら(いつものようにリンク消えちゃうかもなので、スクリプトは転載しました)
#!/usr/bin/ksh for class in `lsdev -r class`; do printf "|---%-19s (Class)\n" $class for subclass in `lsdev -c $class -r subclass`; do printf " |---%-15s (Subclass)\n" $subclass lsdev -c $class -s $subclass -F name | while read device; do device2=`lsdev | grep "^$device "` printf " |---$device2\n"; done done done
出力結果については、こんなかんじでした。
|---adapter (Class) |---pci (Subclass) |---ent0 Available 02-08 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902) |---ent1 Available 02-09 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902) |---ide0 Defined 03-08 ATA/IDE Controller Device |---sisscsia0 Available 04-08 PCI-X Dual Channel Ultra320 SCSI Adapter |---pseudo (Subclass) |---ent3 Available Shared Ethernet Adapter |---vdevice (Subclass) |---ent2 Available Virtual I/O Ethernet Adapter (l-lan) |---vhost0 Available Virtual SCSI Server Adapter |---vhost1 Available Virtual SCSI Server Adapter |---vhost2 Available Virtual SCSI Server Adapter |---vhost3 Available Virtual SCSI Server Adapter |---vsa0 Available LPAR Virtual Serial Adapter |---bus (Class) |---chrp (Subclass) |---pci0 Available PCI Bus |---pci1 Available PCI Bus |---vio0 Available Virtual I/O Bus |---pci (Subclass) |---pci2 Available 01-14 PCI Bus |---pci3 Defined 00-13 PCI Bus |---pci4 Available 00-14 PCI Bus |---cdrom (Class) |---ide (Subclass) |---cd0 Defined 03-08-00 IDE DVD-ROM Drive |---container (Class) |---scsi (Subclass) |---ses0 Available 04-08-00-15,0 SCSI Enclosure Services Device |---disk (Class) |---scsi (Subclass) |---hdisk0 Available 04-08-00-3,0 16 Bit LVD SCSI Disk Drive |---hdisk1 Available 04-08-00-4,0 16 Bit LVD SCSI Disk Drive |---hdisk2 Available 04-08-00-5,0 16 Bit LVD SCSI Disk Drive |---hdisk3 Available 04-08-00-8,0 16 Bit LVD SCSI Disk Drive |---driver (Class) |---node (Subclass) |---iscsi0 Available iSCSI Protocol Device |---scsi_bus (Subclass) |---scsi0 Available 04-08-00 PCI-X Dual Channel Ultra320 SCSI Adapter bus |---scsi1 Available 04-08-01 PCI-X Dual Channel Ultra320 SCSI Adapter bus |---storfwork (Subclass) |---sfw0 Available Storage Framework Module |---if (Class) |---EN (Subclass) |---en0 Defined 02-08 Standard Ethernet Network Interface |---en1 Defined 02-09 Standard Ethernet Network Interface |---en2 Defined Standard Ethernet Network Interface |---en3 Available Standard Ethernet Network Interface |---et0 Defined 02-08 IEEE 802.3 Ethernet Network Interface |---et1 Defined 02-09 IEEE 802.3 Ethernet Network Interface |---et2 Defined IEEE 802.3 Ethernet Network Interface |---et3 Defined IEEE 802.3 Ethernet Network Interface |---LO (Subclass) |---lo0 Available Loopback Network Interface |---iocp (Class) |---node (Subclass) |---iocp0 Defined I/O Completion Ports |---logical_volume (Class) |---lvsubclass (Subclass) |---VMLibrary Defined Logical volume |---aix1_data1 Defined Logical volume |---aix1_data2 Defined Logical volume |---aix1_data3 Defined Logical volume |---aix1_data4 Defined Logical volume |---aix1_data5 Defined Logical volume |---aix1_data6 Defined Logical volume |---aix1_data7 Defined Logical volume |---aix1_data8 Defined Logical volume |---aix1_data9 Defined Logical volume |---aix1_data10 Defined Logical volume |---aix1_rootvg Defined Logical volume |---aix2_rootvg Defined Logical volume |---hd1 Defined Logical volume |---hd2 Defined Logical volume |---hd3 Defined Logical volume |---hd4 Defined Logical volume |---hd5 Defined Logical volume |---hd6 Defined Logical volume |---hd8 Defined Logical volume |---hd10opt Defined Logical volume |---hd11admin Defined Logical volume |---hd9var Defined Logical volume |---lg_dumplv Defined Logical volume |---linux1_root Defined Logical volume |---livedump Defined Logical volume |---paging00 Defined Logical volume |---vgsubclass (Subclass) |---rootvg Defined Volume group |---vsc Defined Volume group |---lvm (Class) |---lvm (Subclass) |---lvdd Available LVM Device Driver |---memory (Class) |---sys (Subclass) |---L2cache0 Available L2 Cache |---mem0 Available Memory |---mover (Class) |---MOVER (Subclass) |---mover0 Available Mover Kernel Extension |---planar (Class) |---sys (Subclass) |---sysplanar0 Available System Planar |---processor (Class) |---sys (Subclass) |---proc0 Available 00-00 Processor |---proc2 Available 00-02 Processor |---pseudo (Class) |---node (Subclass) |---cluster0 Available Cluster Node |---vios (Subclass) |---suspended0 Available VIOS Suspend Device |---vios0 Available VIO Server |---vlogrepo0 Available VIOS Virtual Log Repository |---pty (Class) |---pty (Subclass) |---pty0 Available Asynchronous Pseudo-Terminal |---rcm (Class) |---node (Subclass) |---rcm0 Defined Rendering Context Manager Subsystem |---sys (Class) |---node (Subclass) |---sys0 Available System Object |---tcpip (Class) |---TCPIP (Subclass) |---inet0 Available Internet Network Extension |---tty (Class) |---vcon (Subclass) |---vty0 Available Asynchronous Terminal |---virtual_target (Class) |---vtdev (Subclass) |---aix1_cd Available Virtual Target Device - File-backed Optical |---aix2_cd Available Virtual Target Device - File-backed Optical |---linux1_cd Available Virtual Target Device - File-backed Optical |---vio2_root Available Virtual Target Device - Disk |---vtscsi0 Available Virtual Target Device - Logical Volume |---vtscsi1 Available Virtual Target Device - Logical Volume |---vtscsi2 Available Virtual Target Device - Logical Volume |---vtscsi3 Available Virtual Target Device - Logical Volume |---vtscsi4 Available Virtual Target Device - Logical Volume |---vtscsi5 Available Virtual Target Device - Logical Volume |---vtscsi6 Available Virtual Target Device - Logical Volume |---vtscsi7 Available Virtual Target Device - Logical Volume |---vtscsi8 Available Virtual Target Device - Logical Volume |---vtscsi9 Available Virtual Target Device - Logical Volume |---vtscsi10 Available Virtual Target Device - Logical Volume |---vtscsi11 Available Virtual Target Device - Logical Volume |---vtscsi12 Available Virtual Target Device - Logical Volume
コメント