Sun Management Center 3.6.1 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 and m 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.

attribute

The value of the attribute 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 attribute parameter must have a corresponding value in the value parameter.

value

The value of the value parameter is a comma-separated list of values that correspond to the attributes that are specified in the attribute 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

Description

The addRow command adds a row with the specified values to a table.

Syntax

addRow a=host[:port][,host[:port]]* m=module[+instance] mgtObj=managedObject [property=property] [propInst=propertyInstance] rowValues=name=value[,name=value]

Parameters

a, m, mgtObj, property, propInst, and rowValues.

delRow

Description

The delRow command deletes a row with the specified values from a table.

Syntax

delRow a=host[:port][,host[:port]]* m=module[+instance] mgtObj=managedObject [property=property] [propInst=propertyInstance] rowValues=name=value[,name=value]

Parameters

a, m, mgtObj, property, propInst, and rowValues.

getAttributes

Description

The getAttributes command retrieves the information for a property or retrieves specified attributes from an agent or a list of agents.

Syntax

getAttributes a=host[:port][,host[:port]]* m=module[+instance] mgtObj=managedObject property=property [propInst=propertyInstance] [attribute=attribute[,attribute]*]

Parameters

a, m, mgtObj, property, propInst, and attribute.

setAttributes

Description

The setAttributes command sets a property or sets values to the specified attributes in an agent or a list of agents. You can also reset the value of a specified attribute to null.

Syntax

setAttributes a=host[:port][,host[:port]]* m=module[+instance] mgtObj=managedObject property=property [propInst=propertyInstance] [attribute=attribute[,attribute]*] value=value[,value]*

Parameters

a, m, mgtObj, property, propInst, attribute, and value.

For each attribute specified in the attribute parameter, there must be a corresponding value in the value 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 attribute=alarmlimits.error-gt value=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"