Sun Java System Portal Server 7 Command-Line Reference

psadmin set-monitoring-attributes

Description

Sets MBean attribute values for Portal Server MBeans. A set of MBeans is first determined based on given type and name key properties, or given JMX ObjectName pattern.

This command fetches MBean ObjectNames from either a Portal Server instance or a Portal Server Secure Remote Access instance. Two options, --portal and -proxy-type, determine whether Portal Server instance or Portal Server Secure Remote Access instance names are fetched. If both --portal and -proxy-type options are specified, portal option is ignored.

If no option values or operand are specified, then the command returns ObjectNames of all MBeans registered with the Portal Server instance or the Portal Server Secure Remote Access instance. If the --type and --name-properties, --object-name options are specified, only the object-name option is considered for the operation.

Be careful when you set UseJavaPlatformMBeanServer attribute of MBean with type MonitoringConfiguration. Toggling this boolean attribute may result in unregistering all MBeans in Portal Server instance or Portal Server Secure Remote Access instance, and the command might show an error message as a result.

Syntax

Long Format

psadmin set-monitoring-attributes --adminuser uid --passwordfile password-filename [--portal portal-ID] | [--proxy-type sra-proxy-type ] --instance instance-ID [--type type-name-property[--name-properties mbean-name-properties] | [--object-name mbean-object-name] [--interactive] [--output output-filename ] [--verbose] attribute1Name attribute1-value [[attribute2-Name attribute2-value]...]

Short Format

psadmin set-monitoring-attributes -u user -f password-filename [ -p portal-ID] | -x sra-proxy-type] [-i instance-ID ] [[-t type-name-property [--name-properties mbean-name-properties ] | [--object-name mbean-object-name ]] -o output-filename [-v] attribute1Name attribute1-value [[attribute2-Name attribute2-value]...]

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name.

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

[--instance | -i] instance-ID

Specifies the Portal Server instance or Portal Server Secure Remote Access instance for this command. Portal Server Secure Remote Access instance is also known by Portal Server Secure Remote Access profile name.

The following options are not required:

[--portal | -p] portal-ID

Specifies the portal ID.

[--proxy-type | -x ] sra-proxy-type

Identifies Portal Server Secure Remote Access Proxy type: Gateway, Rewriter Proxy, or Netlet Proxy. sra-proxy-type can begateway, rwp, or nlp respectively.

[--type | -t] type-name-property

Specifies the unique identity of the MBean ObjectName.

--name-properties "key1=value1,key2=value2,..."

If ObjectName property 'type' is not unique, MBean ObjectName may have additional name-properties to uniquely identify it. You can locate such MBean specifying additional name-properties using this option, along with the -–type option.

--object-name mbean-object-name

Specifies a valid JMX ObjectName pattern to select monitoring MBeans.

--interactive

Prompts for user confirmation to confirm setting attribute values for the selected MBean.

[--output | -o ] output-filename

Names the output file.

[--verbose | -v]

Shows progression of command.

The following operand is available:

attribute1Name attribute1Value [[attribute2Name attribute2Value]...]

Specifies attribute name value pairs that set attributes on identified MBeans.

Examples


Example 5–16 psadmin set-monitoring-attributes

The following command lines show how to enable JMX HTML Adaptor for a portal instance. Note that enabling JMX HTML Adaptor may compromize security, is an un-supported feature, and to be used only for debugging. Using this CLI (monitoring subcommands of psadmin) and portal AdminConsole are recommended ways to monitor a portal instance.


./psadmin get-monitoring-attributes -u amadmin -f ./password -p portal1
 -i nicp104_80 -t MonitoringConfiguration
com.sun.portal:type=MonitoringConfiguration
        ConnectorServerPort = 49156
        Disable = false
        HtmlAdaptorPort = 0
        UseJavaPlatformMBeanServer = false
./psadmin set-monitoring-attributes -u amadmin -f ./password -p portal1
 -i nicp104_80 --interactive -t MonitoringConfiguration HtmlAdaptorPort 49182
Do you want to continue operation with <com.sun.portal:type=MonitoringConfiguration>? [y/n]
y
com.sun.portal:type=MonitoringConfiguration
        Attribute <HtmlAdaptorPort> value set as <49,182>
./psadmin get-monitoring-attributes -u amadmin -f ./password -p portal1
 -i nicp104_80 -t MonitoringConfiguration
com.sun.portal:type=MonitoringConfiguration
        ConnectorServerPort = 49156
        Disable = false
        HtmlAdaptorPort = 49182
        UseJavaPlatformMBeanServer = false