resource_data_input Information File
Purpose
Describes how to use an input file for passing resource class information, such as resource attribute names and values, to the resource monitoring and control (RMC) command-line interface (CLI).
Description
You can use the -f
flag
with most RMC commands to specify the name of a resource data input
file when you want to pass resource persistent attribute values and
other information to the RMC CLI. This is useful when typing information
about the command line would be too cumbersome or prone to typographical
errors. The data in this file is used for defining resources or for
changing the persistent attribute values of a resource or resource
class. The resource data input file, which must be in POSIX
format, has no set location. It can be a temporary file or a
permanent file, depending on your requirements.
The chrsrc, mkrsrc,
resetrsrc, rmrsrc, runact, startrsrc,
and stoprsrc commands read this file when they
are issued with the -f
flag. The lsactdef, lsrsrc,
and lsrsrcdef commands generate a file with this
format when they are issued with the -i
flag.
- ResourceAction
- Resource action element names and values for the resource action
when starting an action. The runact command reads
in the resource action elements. These elements are ignored if the
input file is read by
runact -c
. - ResourceClassAction
- Resource class action element names and values for the resource class action when starting a class action. The runact command reads in the resource action elements.
- PersistentResourceArguments
- Resource command argument names and values for those commands
that accept them: mkrsrc, resetrsrc, rmrsrc,
startrsrc, and stoprsrc.
Command arguments are optional and are defined by the resource class.
Specify the
-l
option with these commands to see the command arguments for a resource class.
- PersistentResourceAttributes
- Persistent attribute names and values for one or more resources
for a specific resource class used to define a new resource or change
attribute values for an existing resource. The persistent resource
attributes are read in by the commands mkrsrc and chrsrc.
These attributes are ignored if the input file is read by the chrsrc command
that is specified with the
-c
flag. - PersistentResourceClassAttributes
- Persistent attribute names and values for a resource class used
to change the attribute values of an existing resource class. The
persistent resource class attributes are read in by the chrsrc command
only when the
-c
flag is specified.
PersistentResourceAttributes::
# This is a comment
label:
AttrName1 = value
AttrName2 = value
AttrName3 = value
another label:
Name = name
NodeNumber = 1
⋮
::
PersistentResourceClassAttributes::
# This is a comment
label:
SomeSettableAttrName = value
SomeOtherSettableAttrName = value
::
⋮
PersistentResourceArguments::
# This is a comment
label:
ArgName1 = value
ArgName2 = value
ArgName3 = value
::
⋮
See the Examples section
for more details.- The keywords PersistentResourceAttributes, PersistentResourceClassAttributes, and PersistentResourceArguments are followed by two colons (::).
- The order of the keyword stanzas is not significant in the file. For example, PersistentResourceClassAttributes can precede PersistentResourceClass. It does not affect the portion of the data that is read in by the calling CLI.
- Individual stanza headings (beneath the keywords) are followed
by one colon (:), for example:
c175n05 resource info:
. - White space at the beginning of lines is not significant. Tabs or spaces are suggested for readability.
- Any line with a pound sign (#) as the first printable character is a comment.
- Each entry on an individual line is separated by white space (spaces or tabs).
- Blank lines in the file are not significant and are suggested for readability.
- There is no limit to the number of resource attribute stanzas included in a particular PersistentResourceAttributes section.
- There is no limit to the number of resource class attribute stanzas included in a particular PersistentResourceClassAttributes section. Typically, there is only one instance of a resource class. In this case, only one stanza is expected.
- If only one resource attribute stanza is included in a particular PersistentResourceAttributes section, the label: line can be omitted. This also applies to the ResourceAction section.
- If only one resource class attribute stanza is included in a particular PersistentResourceClassAttributes section, the label: line can be omitted. This also applies to the ResourceClassAction section.
- Values that contain spaces must be enclosed in quotation marks.
- A double colon (::) indicates the end of a section. If a terminating double colon is not found, the next Reserved Keyword or end of file signals the end of a section.
- Double quotation marks included within a string that is surrounded
by double quotation marks must be escaped. (\").
Note: Double quotation marks can be nested within single quotation marks.Examples:
"Name == \"testing\""
'Name == "testing"'
This syntax is preferred if your string is a selection string and you are going to cut and paste to the command line.
- Single quotation marks included within a string that is surrounded
by single quotation marks must be escaped. (\').
Note: Single quotation marks can be nested within double quotation marks.Here are some examples:
'Isn\'t that true'
"Isn't that true"
This syntax is preferred if you are going to cut and paste to the command line.
- The format you use to enter data in a resource_data_input file might not be the same format used on the command line. The shell you choose to run the commands in has its own rules regarding quotation marks. Refer to the documentation for your shell for these rules, which determine how to enter data on the command line.
Implementation specifics
This information is part of the rsct.core.rmc fileset for AIX® and rsct.core-3.1.0.0-0.platform.rpm package for Linux®, Solaris, and Windows, where platform is i386, ppc, ppc64, s390, or x86_64.
Location
/opt/rsct/man/resource_data_input.7Examples
- This sample mkrsrc command:
uses the sample input file /tmp/my_resource_data_input_file for the IBM.Example resource class. The contents of the input file look like this:mkrsrc -f /tmp/my_resource_data_input_file IBM.Example
PersistentResourceAttributes:: # Resource 1 - only set required attributes resource 1: Name="c175n04" NodeList = {1} # Resource 2 - setting both required and optional attributes # mkrsrc -e2 IBM.Example displays required and optional # persistent attributes resource 2: Name="c175n05" NodeList = {1} Int32 = -99 Uint32 = 99 Int64 = -123456789123456789 Uint64 = 123456789123456789 Float32 = -9.89 Float64 = 123456789.123456789 String = "testing 123" Binary = 0xaabbccddeeff RH = "0x0000 0x0000 0x00000000 0x00000000 0x00000000 0x00000000" SD = [hello,1,{2,4,6,8}] Int32Array = {-4, -3, -2, -1, 0, 1, 2, 3, 4} Int64Array = {-4,-3,-2,-1,0,1,2,3,4} Uint32Array = {0,1,2,3,4,5,6} Uint64Array = {0,1,2,3,4,5,6} Float32Array = {-3.3, -2.2, -1.2, 0, 1, 2.2, 3.3} Float64Array = {-3.3, -2.2, -1.2, 0, 1, 2.2, 3.3} StringArray = {abc,"do re mi", 123} BinaryArray = {"0x01", "0x02", "0x0304"} RHArray = {"0x0000 0x0000 0x00000000 0x00000000 0x00000000 0x00000000", "0xaaaa 0xaaaa 0xbbbbbbbb 0xcccccccc 0xdddddddd 0xeeeeeeee"} SDArray = {[hello,1,{0,1,2,3}],[hello2,2,{2,4,6,8}]}
- This sample chrsrc command:
uses the sample input file /tmp/Example/ch_resources to change the attribute values of existing IBM.Example resources. The contents of the input file look like this:chrsrc -f /tmp/Example/ch_resources -s 'Name == "c175n05"' IBM.Example
PersistentResourceAttributes:: # Changing resources that match the selection string entered # when running chrsrc command. resource 1: String = "this is a string test" Int32Array = {10,-20,30,-40,50,-60}
- This sample rmrsrc command:
shows the optional command arguments:rmrsrc -l IBM.Examplebar
rmrsrc IBM.Examplebar ExampleInt32=int32 ExampleUint32=uint32
- This sample rmrsrc command:
uses the sample input /tmp/Examplebar/rm_resources file to specify the optional command arguments for rmrsrc command. The contents of the input file look like this:rmrsrc -f /tmp/Examplebar/rm_resources -s 'Name == "c175n05"' IBM.Examplebar
PersistentResourceArguments:: # Specifying command arguments when running rmrsrc command. resource 1: ExampleInt32 = 1 ExampleUint32 = 0