bityard Blog

// Display the AIX devices in a tree format

In AIX there is the proctree (or ps -fT 0) command to display the currently running processes in a tree format. This is very helpful when one is primaryly interested in the parent and child relationship between the individual processes. Unfortunately a similar command for the parent and child relationship of devices is still missing from the stock AIX. There are already several script implementations out on the net to fill that particular gap. As a scripting exercise i wanted to do my own version of a devtree command. It was included in the aaa_base RPM package. The output for e.g. an LPAR with virtual ethernet and virtual SCSI devices looks like this:

|
|-- inet0
|   |-- en1
|   |-- et1
|   |-- lo0
|-- iocp0
|-- lvdd
|-- pty0
|-- rootvg
|   |-- hd1
|   |-- hd2
|   |-- hd3
|   |-- hd4
|   |-- hd5
|   |-- hd6
|   |-- hd8
|   |-- hd10opt
|   |-- hd9var
|   |-- lv_srv
|-- sfw0
|-- sys0
|   |-- sysplanar0
|   |   |-- L2cache0
|   |   |-- mem0
|   |   |-- pci0
|   |   |   |-- pci4
|   |   |   |-- pci5
|   |   |   |-- pci6
|   |   |-- pci1
|   |   |   |-- pci7
|   |   |   |-- pci8
|   |   |-- pci2
|   |   |   |-- pci9
|   |   |   |-- pci10
|   |   |   |-- pci11
|   |   |-- pci3
|   |   |   |-- pci12
|   |   |   |-- pci13
|   |   |-- pci14
|   |   |-- proc0
|   |   |-- proc4
|   |   |-- vio0
|   |   |   |-- ent1
|   |   |   |-- vsa0
|   |   |   |   |-- vty0
|   |   |   |-- vscsi0
|   |   |   |   |-- hdisk0
|   |   |   |-- vscsi1
|
`-- End of the device tree

in the regular mode, or like this:

|
|-- inet0                                         Available                   Internet Network Extension
|   |-- en1                                       Available                   Standard Ethernet Network Interface
|   |-- et1                                         Defined                   IEEE 802.3 Ethernet Network Interface
|   |-- lo0                                       Available                   Loopback Network Interface
|-- iocp0                                           Defined                   I/O Completion Ports
|-- lvdd                                          Available                   LVM Device Driver
|-- pty0                                          Available                   Asynchronous Pseudo-Terminal
|-- rootvg                                          Defined                   Volume group
|   |-- 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
|   |-- hd9var                                      Defined                   Logical volume
|   |-- lv_srv                                      Defined                   Logical volume
|-- sfw0                                          Available                   Storage Framework Module
|-- sys0                                          Available                   System Object
|   |-- sysplanar0                                Available                   System Planar
|   |   |-- L2cache0                              Available                   L2 Cache
|   |   |-- mem0                                  Available                   Memory
|   |   |-- pci0                                    Defined                   PCI Bus
|   |   |   |-- pci4                                Defined            00-10  PCI Bus
|   |   |   |-- pci5                                Defined            00-12  PCI Bus
|   |   |   |-- pci6                                Defined            00-16  PCI Bus
|   |   |-- pci1                                    Defined                   PCI Bus
|   |   |   |-- pci7                                Defined            02-10  PCI Bus
|   |   |   |-- pci8                                Defined            02-12  PCI Bus
|   |   |-- pci2                                    Defined                   PCI Bus
|   |   |   |-- pci9                                Defined            03-10  PCI Bus
|   |   |   |-- pci10                               Defined            03-12  PCI Bus
|   |   |   |-- pci11                               Defined            03-16  PCI Bus
|   |   |-- pci3                                    Defined                   PCI Bus
|   |   |   |-- pci12                               Defined            01-10  PCI Bus
|   |   |   |-- pci13                               Defined            01-12  PCI Bus
|   |   |-- pci14                                   Defined                   PCI Bus
|   |   |-- proc0                                 Available            00-00  Processor
|   |   |-- proc4                                 Available            00-04  Processor
|   |   |-- vio0                                  Available                   Virtual I/O Bus
|   |   |   |-- ent1                              Available                   Virtual I/O Ethernet Adapter (l-lan)
|   |   |   |-- vsa0                              Available                   LPAR Virtual Serial Adapter
|   |   |   |   |-- vty0                          Available                   Asynchronous Terminal
|   |   |   |-- vscsi0                            Available                   Virtual SCSI Client Adapter
|   |   |   |   |-- hdisk0                        Available                   Virtual SCSI Disk Drive
|   |   |   |-- vscsi1                            Available                   Virtual SCSI Client Adapter
|
`-- End of the device tree

in the detailed output mode.

// AIX RPMs: GestioIP, net-snmp and netdisco-mibs

Following up to the previous posts, regarding the topic of AIX RPM packages, here are three new AIX RPM packages related to network and IP adress management (IPAM):

// AIX RPMs: Perl and CPAN Perl Modules

Following up to the previous posts, regarding the topic of AIX RPM packages, here are several new AIX RPM packages related to Perl:

// AIX RPMs: MySQL, percona-ganglia-mysql and phpMyAdmin

Following up to the previous posts, regarding the topic of AIX RPM packages, here are three new AIX RPM packages related to the MySQL database:

// AIX RPMs: AWStats, ganglia-addons-httpd, httpd and mod_perl

Following up to the previous posts, regarding the topic of AIX RPM packages, here are four new AIX RPM packages from the webserver and webserver monitoring category:

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website. More information about cookies