AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  where does lscfg get the information from?

    Posted Mon December 26, 2022 06:28 PM
    Hi guys...

    I've been trying to get information like that from the lscfg command... (I thought it could all be gotten from the ODM but it doesn't seem to)
    for example...
         # lscfg -vl fcs0
    It gives us information about it WWN and others....

    But WWN information does not exist in either /etc/objrepos or /usr/lib/objrepos ODM...
    So where does lscfg get that information from?... does it uses other commands like fcstat to get the data?

    I realize that many other devices do not store their information in the ODM, such as models, types or ids...
    Any ideas?


    ------------------------------
    Luis Alberto Rojas Kramer
    ------------------------------


  • 2.  RE: where does lscfg get the information from?

    Posted Tue December 27, 2022 01:52 AM

    Hi Luis Alberto Rojas Kramer!

     

    Lscfg get info from Customized VPD (CuVPD) Object Class and from VPD card.

    You can read about lscfg and cuvpd here

    https://www.ibm.com/docs/en/aix/7.1?topic=l-lscfg-command

    https://www.ibm.com/docs/en/aix/7.2?topic=subsystem-customized-vpd-cuvpd-object-class#customized_vpd

    WBR Alex M






  • 3.  RE: where does lscfg get the information from?

    Posted Tue December 27, 2022 10:28 AM

    Hi Alex...

     

    Yes, I thought just that, but I couldn't get any information from CuVPD (for example, from the fcs0 adapter).

     

    # odmget -q name=fcs0 CuVPD

     

    CuVPD:

            name = "fcs0"

            vpd_type = 2

            vpd = "*YLU9040.MR9.78F327X-V48-C2-T1"

     

    CuVPD:

            name = "fcs0"

            vpd_type = 0

            vpd = "*NA▒Pv

                         f▒"

     

    But these is the info we can get from ODM high level commands:

     

    # lsdev -Cc adapter | grep fcs

    fcs0   Available C2-T1 Virtual Fibre Channel Client Adapter

    fcs1   Available C3-T1 Virtual Fibre Channel Client Adapter

     

    # lscfg -vpsl fcs0

      fcs0             U9040.MR9.78F327X-V48-C2-T1

            Virtual Fibre Channel Client Adapter

     

            Network Address.............C050760B66B70008

            Device Specific.(Z0)........

            Device Specific.(Z1)........

            Device Specific.(Z2)........

            Device Specific.(Z3)........

            Device Specific.(Z4)........

            Device Specific.(Z5)........

            Device Specific.(Z6)........

            Device Specific.(Z7)........

            Device Specific.(Z8)........C050760B66B70008

            Device Specific.(Z9)........

            Hardware Location Code......U9040.MR9.78F327X-V48-C2-T1

     

      PLATFORM SPECIFIC

     

      Name:  vfc-client

        Node:  vfc-client@30000002

        Device Type:  fcp

        Physical Location: U9040.MR9.78F327X-V48-C2-T1

     

    Other data like that from lsattr command is also not found in Cu* files..

     

    # lsattr -EHl fcs0

    attribute       value      description                                user_settable

     

    bus_mem_addr    0x01000000 Bus memory address                         False

    intr_priority   3          Interrupt priority                         False

    io_dma          256        I/O DMA size in Mega Bytes                 False

    label                      User defined label                         True

    lg_term_dma     0x1000000  Long term DMA                              True

    max_xfer_size   0x100000   Maximum Transfer Size                      True

    num_cmd_elems   1024       Maximum Number of COMMAND Elements         True

    num_io_queues   8          Desired number of I/O queues               True

    num_sp_cmd_elem 512        Maximum number of special command elements True

    sw_fc_class     2          FC Class for Fabric                        False

     

    /etc/objrepos # for FILE in $(ls Cu*)

    do

         odmget -q name=fcs0 $FILE

    done

     

    0518-506 odmget: Cannot open object class CuAt.vc

            Check path name and permissions.

    0518-507 odmget: Could not retrieve object for CuAtDef, ODM error number 5904

    0518-506 odmget: Cannot open object class CuAtDef.vc

            Check path name and permissions.

    0518-506 odmget: Cannot open object class CuAtSav.vc

            Check path name and permissions.

    0518-506 odmget: Cannot open object class CuData.vc

            Check path name and permissions.

     

    CuDv:

            name = "fcs0"

            status = 1

            chgstatus = 2

            ddins = "vfcdd"

            location = "C2-T1"

            parent = "vio0"

            connwhere = "30000002"

            PdDvLn = "adapter/vdevice/IBM,vfc-client"

    0518-507 odmget: Could not retrieve object for CuDvDr, ODM error number 5904

    0518-506 odmget: Cannot open object class CuLk.vc

            Check path name and permissions.

    0518-506 odmget: Cannot open object class CuPath.vc

            Check path name and permissions.

    0518-506 odmget: Cannot open object class CuPathAt.vc

            Check path name and permissions.

     

    CuVPD:

            name = "fcs0"

            vpd_type = 2

            vpd = "*YLU9040.MR9.78F327X-V48-C2-T1"

     

    CuVPD:

            name = "fcs0"

            vpd_type = 0

            vpd = "*NA▒Pv

                         f▒"

     

    Regards

     

    Luis Rojas






  • 4.  RE: where does lscfg get the information from?

    Posted Wed December 28, 2022 05:53 AM

    Hi,
    well for the NPIV Adapter it is a bit different than for the physical FC Adapter. The NPIV Adapter has no real VPD Data. You will only see the location information for the virtual FC Adapter and the initial WWPN in the lscfg output. The actually used/active WWPN is only shown in the fcstat output. So when you see a different WWPN in the lscfg output than in the fcstat output it means, that this LPAR was moved via LPM. 
    There is also a Technote about that:

    https://www.ibm.com/support/pages/active-wwpn-virtual-fiber-channel-adapter

    Real Adapter VPD Data is only seen for example on a hosting VIO Partition or on a the Client LPAR has some physical Adapters assigned (or when the LPAR is just a plain AIX LPAR, no VIO).

    Greetings
    Marc-Eric Kahle



    ------------------------------
    Marc-Eric Kahle
    ------------------------------



  • 5.  RE: where does lscfg get the information from?

    Posted Mon July 24, 2023 06:17 AM

    Also note that attributes that are at their default values, may be retrieved from PdAt instead of CuAt.



    ------------------------------
    José Pina Coelho
    IT Specialist at Kyndryl
    ------------------------------



  • 6.  RE: where does lscfg get the information from?

    Posted Tue December 27, 2022 08:49 AM
    If you truss lscfg command you can grep all the open() calls to see what lscfg accesses :

    # truss -deaf lscfg -vl fcs0 2>&1 | grep open

    Besides the odm files it does also acces /dev/nvram.

    Part of the device data is retrieved from the open firmware device tree stored in nvram.

    the snap command uses the following command to dump this from nvram to the file general/devtree.out 

    /usr/lib/boot/bin/dmpdt_chrp -i

    The network address is part of these  sections :

    /pci@800000020000020/fibre-channel@0 

    -=Geert Oost - SME AIX Development Support Performance=-


    ------------------------------
    GEERT OOST
    ------------------------------



  • 7.  RE: where does lscfg get the information from?

    Posted Tue December 27, 2022 10:31 AM

    Thank you GEERT OOST

     

    Luis Rojas






  • 8.  RE: where does lscfg get the information from?

    Posted Tue July 18, 2023 04:04 PM

    The 'lscfg' utility, also known as the Logical System Configuration (lscfg) command, is a powerful tool commonly used in the field of system administration, particularly on UNIX-like operating systems. This command is designed to retrieve detailed information regarding the hardware configuration of a computer system.

    In order to obtain the information it presents, 'lscfg' primarily relies on the data provided by the system's device configuration database. This database contains a comprehensive collection of hardware-related records, including device attributes, vendor information, firmware details, and connectivity specifications.

    By accessing the system's device configuration database, 'lscfg' is able to extract pertinent information pertaining to the various components of the computer system. This includes but is not limited to details about processors, memory modules, disks, buses, network interfaces, and other hardware devices connected to the system.

    It is worth noting that 'lscfg' interacts directly with the underlying operating system kernel and leverages system calls and low-level mechanisms to access the device configuration database. By querying this database, 'lscfg' is able to retrieve accurate and up-to-date information about the system's hardware configuration, which can be crucial for troubleshooting, system analysis, and inventory management purposes.

    Overall, the 'lscfg' utility serves as an essential tool in the arsenal of system administrators, allowing them to effectively gather detailed hardware information from the system's device configuration database, enabling them to make informed decisions and perform necessary tasks to ensure optimal system performance and reliability.



    ------------------------------
    flex harm
    ------------------------------