getdgrp Command

Purpose

Lists device classes that match the specified criteria.

Syntax

getdgrp [ -a ] [ -e ] [ -l ][ Criteria] [ DeviceClassList ]

Description

Lists device classes that contain devices matching the given criteria. The criteria is given in the form of expressions.

Flags

Item Description
-a Indicates that a device must match all criteria of the device class to be included in the report generated by this command. The -a flag has no effect if no criteria are defined.
-e Indicates that thedevices classes specified in the parameter list be excluded from the report generated by this command. The -e flag has no effect if no devices are specified.
-l Indicates that all device classes that are subject to the -e option and the dgroup list, be listed even if they contain no valid device members. This option has no affect if Criteria is specified on the command line.

Parameters

Item Description
Criteria Defines criteria that a device must match before a device class to which it belongs can be included in the generated list. Criteria can be specified as an expression or a list of expressions which a device must meet for its class to be included in the list generated by getdgrp. If no criteria are given, all device classes are included in the list.

Devices must satisfy at least one of the criteria in the list. However, the -a option can be used to specify that a "logical and" operation should be performed. Then, only those classes containing devices that match all of the criteria in a list will be included.

There are four possible expression types which the criteria specified in the Criteria parameter may follow:
Attribute=Value
Fetches all device classes with a member which hasAttribute defined and is equal to Value.
Attribute!=Value
Fetches all device classes with a member which has Attribute defined and does not equal Value.
Attribute:*
Fetches all device classes with a member which has Attribute defined.
Attribute!:*
Fetches all device classes with a member which does not have Attribute defined.
The following are the valid device attributes:
alias
The name by which a device is known.
desc
A description of the device.
type
A token describing the type of the device.
status
The current state of the device.The list of possible values for status are : 1.Defined 2.Available 3.Stopped 4.Diagnose The values for status are not case sensitive.
DeviceClassList Specifies device class name in the Customized Device Configuration database or in the Predefined Device Configuration database.

Exit Status

0
The command completed successfully
1
Command syntax was incorrect, invalid option was used, or an internal error occurred.
2
The Customized Devices object class or the Predefined Devices object class could not be opened for reading.

Examples

  1. To display all device classes, enter:
    getdgrp
    The output looks similar to the following:
    adapter 
    aio 
    bus 
    cdrom 
    disk 
    diskette 
    gxme 
    if 
    keyboard 
    lft 
    logical_volume 
    lvm 
    memory 
    mouse 
    planar 
    processor 
    pty 
    pwrmgt 
    rcm 
    sys 
    tape 
    tcpip 
    tty
  2. To list device classes whose devices are of type "logical_volume", enter:
    getdgrp type=logical_volume
    The output looks like the following:
    logical_volume
  3. To list device classes whose devices are of type "logical_volume" or whose device alias is "sys0", enter:
    getdgrp type=logical_volume alias=sys0
    The output looks like the following:
    logical_volume
    sys
  4. To list device classes whose devices status attribute is defined , enter:
    getdgrp status=defined
    The output looks like the following:
    logical_volume
    posix_aio 
    rcm
  5. To display device classes for whose devices the status attribute is defined and belong to the "processor" device class, enter:
    getdgrp status:* processor 
    The output looks like the following:
    processor 
  6. To display device classes for whose devices the status attribute is not defined, enter:
    getdgrp status!:* processor

Files

Item Description
/usr/sbin/getdgrp Contains the getdgrp command