Sun Management Center 3.5 User's Guide

Object Attribute Extended Commands

There are four extended commands for managing object attributes and attribute values.

Parameters for the Object Attribute Command

The following parameters can be used by the object attribute commands. For details about the a, m, f, and columns parameters, refer to Predefined Parameters and Flags.

mgtObj

The value of the mgtObj parameter is the name of the managed object whose attributes and properties are being set or retrieved.

property

The value of the property parameter is the name of the property whose attributes and values are being set or retrieved.

propInst

The value of the propInst parameter is the name of the instance of the property whose attributes and values are being set or retrieved.

rowValues

The value of the rowValues parameter is a comma-separated list of name-value pairs. name is the name of a column in the row. value is the value in that column.

attributes

The value of the attributes parameter is a comma-separated list of attribute names that belong to the property whose attributes and values are being set or retrieved. When used with the setAttributes command, each attribute name in the attributes parameter must have a corresponding value in the values parameter.

values

The value of the values parameter is a comma-separated list of values that correspond to the attributes that are specified in the attributes parameter. When used with the setAttributes command, there must be a value for each attribute specified.

Object Attribute Commands

You can set and retrieve object attributes and attribute values with the following commands:

addRow

The addRow command adds a row to a table. The addRow command takes the following parameters: a, m, mgtObj, property, propInst, and rowValues.

delRow

The delRow command deletes a row from a table. The delRow command takes the following parameters: a, m, mgtObj, property, propInst, and rowValues.

getAttributes

The getAttributes command retrieves the specified attributes from an agent or a list of agents. The getAttributes command takes the following parameters: a, f, m, columns, mgtObj, property, propInst, and attributes.

setAttributes

The setAttributes command assigns values to the specified attributes in an agent or a list of agents. The setAttributes command takes the following parameters: a, m, mgtObj, property, propInst, attributes, and values.

For each attribute specified in the attributes parameter, there must be a corresponding value in the values parameter.

Examples for the Object Attribute Command

The following command retrieves all attributes for the size property in the totalstats managed object in the agent-stats module at port 1161 on host haiku:


> getAttributes a=haiku:1161 m=agent-stats mgtObj=totalstats \
property=size

The following command sets the attribute alarmlimits.error-gt to the value of 2 in the size property specified in the previous example:


> setAttributes a=haiku:1161 m=agent-stats mgtObj=totalstats \
property=size attributes=alarmlimits.error-gt values=2

The following command deletes the row that is specified in rowValues from the managed object that is specified in mgtObj:


> delRow a=haiku:1161 \
m=filemon mgtObj=filemonstats/filemonTable/filemonEntry \
rowValues="name=test,desc=this,filename=/etc/passwd"