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:
The following are the valid device attributes:
|
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
- To display all device classes, enter:
The output looks similar to the following:getdgrp
adapter aio bus cdrom disk diskette gxme if keyboard lft logical_volume lvm memory mouse planar processor pty pwrmgt rcm sys tape tcpip tty
- To list device classes whose devices are of type "logical_volume",
enter:
The output looks like the following:getdgrp type=logical_volume
logical_volume
- To list device classes whose devices are of type "logical_volume"
or whose device alias is "sys0", enter:
The output looks like the following:getdgrp type=logical_volume alias=sys0
logical_volume sys
- To list device classes whose devices status attribute is defined
, enter:
The output looks like the following:getdgrp status=defined
logical_volume posix_aio rcm
- To display device classes for whose devices the status attribute
is defined and belong to the "processor" device class, enter:
The output looks like the following:getdgrp status:* processor
processor
- 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 |