<SeedDef> element
The <SeedDef> element defines a seed that can be used in a profile by using a <Seed> element.
Syntax
Parent element: <Catalog>
Attribute | Required | Type | Description |
---|---|---|---|
name | yes | string | Specifies the name of the seed. This name must be unique for each catalog. |
Child element | Required | Description |
---|---|---|
<Discover> | yes | Specifies the command that is used to discover parameters. |
Usage
Seeds are used to discover parameters dynamically during a get operation.
When the artexget command is issued, each <Seed> element in the input profile is expanded into one or more <Parameter> elements, based on the rules defined in the matching <SeedDef> element of the catalog file. This process is called parameter discovery. The artexget command then proceeds as usual with the expanded profile.
The <SeedDef> element contains only a <Discover> subelement, that defines a command to run, and a mask to extract parameter names, catalog names (as colon-separated lists, without the .xml extension), and optionally targets from the output of the command (by using the class1=instance1;class2=instance2;... format). For each line of the output, the first catalog from the colon-separated list that is found on the system is loaded. If a parameter definition is found in this catalog, then a parameter is created in the output profile that has the targets that were extracted from the line. Lines from the command output that do not match the mask, or for which no catalog file is found, or that have no parameter definition if found in the catalog file, are ignored.
Examples
- The following catalog defines a <SeedDef> element called vmoTunables that
discovers all the nonrestricted vmo tunables seed
supported by AIX® Runtime Expert:
<?xml version="1.0" encoding="UTF-8"?> <Catalog id="vmoSeed"> <SeedDef name="vmoTunables"> <Discover> <Command>/usr/sbin/vmo -x | /usr/bin/awk -F, '{ print "vmoParam:" $1 }'</Command> <Mask catalog="1" name="2">(.*):(.*)/Mask> </Discover> </SeedDef> </Catalog>
The discovery command prints each tunable on a separate line, preceded by the name of the catalog that defines the tunables:... vmoParam:enhanced_affinity_vmpool_limit vmoParam:esid_allocator vmoParam:force_relalias_lite vmoParam:kernel_heap_psize ...
The following profile uses the vmo tunables seed to capture all the nonrestricted vmo tunables seed supported by AIX Runtime Expert:<?xml version="1.0" encoding="UTF-8"?> <Profile> <Catalog id="vmoSeed"> <Seed name="vmoTunables"/> </Catalog> </Profile>
When the artexget –r command is run on the profile, the command generates a profile similar to the following example:<?xml version="1.0" encoding="UTF-8"?> <Profile> <Catalog id="vmoParam"> ... <Parameter name="enhanced_affinity_vmpool_limit" value="10"/> <Parameter name="esid_allocator" value="0"/> <Parameter name="force_relalias_lite" value="0"/> <Parameter name="kernel_heap_psize" value="65536" applyType="nextboot" reboot="true"/> ... </Catalog> </Profile>
The following <SeedDef> element defines a seed that is used to discover all attributes of all devices. The element uses a target seed to designate the device they operate on:
<SeedDef name="devAttr"> <Discover> <Command> /usr/sbin/lsdev -F 'name class subclass type' | while read DEV CLASS SUBCLASS TYPE do /usr/sbin/lsattr -F attribute -l $DEV | while read PAR do echo device=$DEV devParam.$CLASS.$SUBCLASS.$TYPE:devParam.$CLASS .$SUBCLASS:devParam.$CLASS $PAR done done </Command> <Mask target="1" catalog="2" name="3">(.*) (.*) (.*)</Mask> </Discover> </SeedDef>
The discovery command prints each discovered device attribute on a separate line, by using the following format:
For example:device=DeviceName devParam.Class.Subclass.Type:devParam.Class.Subclass:devParam.Class AttributeName
device=en0 devParam.if.EN.en:devParam.if.EN:devParam.if tcp_recvspace device=en0 devParam.if.EN.en:devParam.if.EN:devParam.if tcp_sendspace device=ent0 devParam.adapter.vdevice.IBM,l-lan:devParam.adapter.vdevice:devParam.adapter alt_addr device=ent0 devParam.adapter.vdevice.IBM,l-lan:devParam.adapter.vdevice:devParam.adapter chksum_offload