Friday, October 24, 2008

Browsing Runtime MBeans

Similar to the configuration information, WebLogic Server runtime MBeans are arranged in a hierarchical data structure. When connected to an Administration Server, you access the runtime MBean hierarchy by entering the serverRuntime or the domainRuntime command. The serverRuntime command places WLST at the root of the server runtime management objects, ServerRuntimeMBean; the domainRuntime command, at the root of the domain-wide runtime management objects, DomainRuntimeMBean. When connected to a Managed Server, the root of the runtime MBeans is ServerRuntimeMBean. The domain runtime MBean hierarchy exists on the Administration Server only; you cannot use the domainRuntime command when connected to a Managed Server.

For more information, see ServerRuntimeMBean and DomainRuntimeMBean in the WebLogic Server MBean Reference.

Using the cd command, WLST can navigate to any of the runtime child MBeans. The navigation model for runtime MBeans is the same as the navigation model for configuration MBeans. However, runtime MBeans exist only on the same server instance as their underlying managed resources (except for the domain-wide runtime MBeans on the Administration Server) and they are all un-editable.
Navigating and Displaying Runtime MBeans Example

The commands in Listing 5-3 instruct WLST to connect to an Administration Server instance, navigate, and display server and domain runtime MBeans.
Listing 5-3 Navigating and Displaying Runtime MBeans

wls:/(offline) > connect('username','password')
wls:/mydomain/serverConfig> serverRuntime()
Location changed to serverRuntime tree. This is a read-only tree with ServerRuntimeMBean as the root.
For more help, use help('serverRuntime')
wls:/mydomain/serverRuntime> ls()
dr-- ApplicationRuntimes
dr-- ClusterRuntime
dr-- ConnectorServiceRuntime
...
dr-- JDBCServiceRuntime
dr-- JMSRuntime
dr-- JTARuntime
dr-- JVMRuntime
dr-- LibraryRuntimes
dr-- MailSessionRuntimes
dr-- RequestClassRuntimes
dr-- ServerChannelRuntimes
dr-- ServerSecurityRuntime
dr-- ServerServices
dr-- ThreadPoolRuntime
dr-- WLDFAccessRuntime
dr-- WLDFRuntime
dr-- WTCRuntime
dr-- WorkManagerRuntimes

-r-- ActivationTime 1093958848908
-r-- AdminServer true
-r-- AdminServerHost
-r-- AdminServerListenPort 7001
-r-- AdminServerListenPortSecure false
-r-- AdministrationPort 9002
-r-- AdministrationPortEnabled false
...
wls:/mydomain/serverRuntime> domainRuntime()
Location changed to domainRuntime tree. This is a read-only tree with DomainRuntimeMBean as the root.
For more help, use help('domainRuntime')
wls:/mydomain/domainRuntime> ls()
dr-- DeployerRuntime
...
dr-- ServerLifecycleRuntimes
dr-- ServerRuntimes

-r-- ActivationTime Tue Aug 31 09:27:22 EDT 2004

-r-- Clusters null
-rw- CurrentClusterDeploymentTarget null
-rw- CurrentClusterDeploymentTimeout 0
-rw- Name mydomain
-rw- Parent null
-r-- Type DomainRuntime

-r-x lookupServerLifecycleRuntime javax.management.ObjectName

: java.lang.String
wls:/mydomain/domainRuntime>

The commands in Listing 5-4 instruct WLST to navigate and display runtime MBeans on a Managed Server instance.
Listing 5-4 Navigating and Displaying Runtime MBeans on a Managed Server

wls:/offline> connect('username','password',‘t3://localhost:7701’)
Connecting to weblogic server instance running at t3://localhost:7701 as username weblogic ...
Successfully connected to managed Server 'managed1' that belongs to domain 'mydomain'.
Warning: An insecure protocol was used to connect to the server.
To ensure on-the-wire security, the SSL port or Admin port should be used instead.
wls:/mydomain/serverConfig> serverRuntime()
wls:/mydomain/serverRuntime> ls()
dr-- ApplicationRuntimes
dr-- ClusterRuntime
...
dr-- JMSRuntime
dr-- JTARuntime
dr-- JVMRuntime
dr-- LibraryRuntimes
dr-- MailSessionRuntimes
dr-- RequestClassRuntimes
dr-- ServerChannelRuntimes
dr-- ServerSecurityRuntime
dr-- ThreadPoolRuntime
dr-- WLDFAccessRuntime
dr-- WLDFRuntime
dr-- WTCRuntime
dr-- WorkManagerRuntimes

-r-- ActivationTime 1093980388931
-r-- AdminServer false
-r-- AdminServerHost localhost
-r-- AdminServerListenPort 7001
-r-- AdminServerListenPortSecure false
-r-- AdministrationPort 9002
-r-- AdministrationPortEnabled false
...
wls:/mydomain/serverRuntime>

No comments: