Sun Management Center 3.6 使用者指南

物件屬性延伸指令

有四個延伸指令可用來管理物件屬性及屬性值。

物件屬性指令的參數

下列參數可被物件屬性指令所用:如需關於 am 參數的詳細資訊,請參閱預先定義的參數和旗標

mgtObj

mgtObj 參數的值是已設定或擷取其屬性與特性之受管理物件的名稱。

property

property 參數的值是已設定或擷取其屬性與值之特性的名稱。

propInst

propInst 參數的值是已設定或擷取其屬性和值之特性的實例名稱。

rowValues

rowValues 參數的值是以逗號分隔之一組名稱值的清單。name 是列中的欄名。value 是該欄中的值。

attribute

attribute 參數的值是以逗號分隔之已設定或擷取其屬性和值之特性的屬性名稱清單。當與 setAttributes 指令配合使用時,attribute 參數中的每個屬性名稱在 value 參數中均必須具有對應的值。

value

value 參數的值是以逗號分隔並對應於 attributes 參數中指定屬性的值清單。當與 setAttributes 指令配合使用時,每個指定的屬性均必須有值。

物件屬性指令

您可以使用下列指令來設定與擷取物件屬性和屬性值:

addRow

說明

addRow 指令會新增指定值的列到表格中。

語法

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

參數

ammgtObjpropertypropInstrowValues

delRow

說明

delRow 指令會從表格刪除指定值的列。

語法

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

參數

ammgtObjpropertypropInstrowValues

getAttributes

說明

getAttributes 指令會擷取特性資訊,或從代理程式或代理程式清單擷取指定屬性。

語法

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

參數

ammgtObjpropertypropInstattribute

setAttributes

說明

setAttributes 指令會設定特性,或者為代理程式的指定屬性設定值。

語法

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

參數

ammgtObjpropertypropInstattributevalue

對於在 attribute 參數中指定的每個屬性,value 參數中必須有對應的值。

物件屬性指令的範例

以下指令可擷取主機 haiku 連接埠 1161 上的 agent-stats 模組中 totalstats 受管理物件之 size 特性的全部屬性:


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

以下指令可將先前範例中指定的 size 特性中的屬性 alarmlimits.error-gt 的值設為 2


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

以下指令可從 mgtObj 中指定的受管理物件中刪除在 rowValues 中指定的列:


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