odmget Command

Purpose

Retrieves objects from the specified object classes into an odmadd input file.

Syntax

odmget-q Criteria ] ObjectClass ...

Description

The odmget command takes as input a search criteria and a list of object classes, retrieves the selected objects from the specified object classes, and writes an ASCII odmadd input file to standard output.

Flags

Item Description
-q Criteria Specifies the search criteria used to select objects from the object class or classes.

Examples

  1. To display information about the Customized Device Drivers (CuDvDr) or the major (value1) and minor (value2) numbers of a device that has a logical name, $logical_name, enter the following command:
    # odmget -q "resource='devno' and value3='$logical_name'" CuDvDr
    The output might be similar to the following example:
    CuDvDr:
            resource = "devno"
            value1 = "19"
            value2 = "8"
            value3 = "hdisk0"
    
  2. To display information about the Customized Devices (CuDv) and the corresponding Predefined Devices (PdDv) of a device that has a logical name, $logical_name, enter the following command:
    # odmget -q uniquetype=$(odmget -q name=$logical_name CuDv | tee /dev/tty | grep PdDvLn | cut -d'"' -f2) PdDv
     
    # logical_name=hdisk0
     
    # odmget -q uniquetype=$(odmget -q name=$logical_name CuDv | tee /dev/tty | grep PdDvLn | cut -d'"' -f2) PdDv
    
    The output might be similar to the following example:
    CuDv:
            name = "hdisk0"
            status = 1
            chgstatus = 2
            ddins = "scsidisk"
            location = "C5-T1-01"
            parent = "fscsi1"
            connwhere = "W_2"
            PdDvLn = "disk/fcp/mpioapdisk"
     
    PdDv:
            type = "mpioapdisk"
            class = "disk"
            subclass = "fcp"
            prefix = "hdisk"
            devid = ""
            base = 1
            has_vpd = 1
            detectable = 1
            chgstatus = 0
            bus_ext = 0
            fru = 1
            led = 1574
            setno = 2
            msgno = 0
            catalog = "scdisk.cat"
            DvDr = "scsidisk"
            Define = "/usr/lib/methods/define"
            Configure = "/usr/lib/methods/cfgscsidisk"
            Change = "/usr/lib/methods/chgdisk"
            Unconfigure = "/usr/lib/methods/ucfgdevice"
            Undefine = "/usr/lib/methods/undefine"
            Start = ""
            Stop = ""
            inventory_only = 0
            uniquetype = "disk/fcp/mpioapdisk"
    
  3. To display information about the CuDv and Customized Attribute (CuAt) of a device that has a logical name, $logical_name, enter the following command:
    # logical_name=vio0
    
    # odmget -q "name='$logical_name'" CuDv CuAt
    
    The system displays the following output:
    CuDv:
            name = "vio0"
            status = 1
            chgstatus = 2
            ddins = "vdev_busdd"
            location = ""
            parent = "sysplanar0"
            connwhere = "vdevice"
            PdDvLn = "bus/chrp/vdevice"
    
    CuAt:
            name = "vio0"
            attribute = "bus_id"
            value = "0x90000340"
            type = "R"
            generic = "D"
            rep = "n"
            nls_index = 5