Tuesday, May 31, 2016

weblogic.Admin utility

The weblogic.Admin utility is a command-line interface that we can use to administer, configure, and monitor WebLogic Server.
 Like the Administration Console, for most commands this utility assumes the role of client that invokes administrative operations on the Administration Server, which is the central management point for all servers in a domain. (All Managed Servers retrieve configuration data from the Administration Server, and the Administration Server can access runtime data from all Managed Servers.)

While the Administration Console interacts only with the Administration Server, the weblogic.Admin utility can access the Administration Server as well as all active server instances directly.

If the Administration Server is down, you can still use the weblogic.Admin utility to retrieve runtime information from Managed Servers and invoke some administrative commands.

However, you can save configuration changes to the domain's config.xml file only when you access the Administration Server.

To use the weblogic.Admin utility, firstly set the environments,

[sami@ed-olfmwlin1 ~]$ . /u01/fmwtrainingapp/mw/wlserver_10.3/server/bin/setWLSEnv.sh


Your environment has been set.
To get the help on weblogic.Admin use the below command,

[sami@ed-olfmwlin1 ~]$  java weblogic.Admin HELP

OUTPUT: weblogic.Admin is a command-line utility for managing WebLogic Server.
        weblogic.Admin help LIFECYCLE   Starting, stopping, discovering servers
        weblogic.Admin help INFO                    Retrieving info about WebLogic Server
        weblogic.Admin help JDBC                   Working with JDBC connection pools
        weblogic.Admin help MBEAN              Working with WebLogic Server MBeans
        weblogic.Admin help CLUSTER           Working with clusters
        weblogic.Admin help ADMINCONFIG Managing Admin configuration
        weblogic.Admin help ALL                      Help for all commands

Usage: java [<SSL trust options>] weblogic.Admin
        [ [-url | -adminurl] [<protocol>://]<listen-address>:<port>]
        -username <username> [-password <password>]

1. Check AdminServer Status

[sami@ed-olfmwlin1~]$ java weblogic.Admin -url t3://ed-olfmwlin1:7001 -username weblogic -password welcome1 GETSTATE
 Current state of "AdminServer" : RUNNING

2. Check the Managed Server Status
[sami@ed-olfmwlin1~]$ java weblogic.Admin -url t3://ed-olfmwlin1:7001 -username weblogic -password welcome1 GETSTATE ebs_server1
Current state of "ebs_server1" : RUNNING

3. Check the Cluster Status
[sami@ed-olfmwlin1~]$ java weblogic.Admin -url t3://ed-olfmwlin1:7001 -username weblogic -password welcome1 CLUSTERSTATE -clustername myProdCluster
There are 2 server(s) in cluster: myProdCluster
The alive servers and their respective states are listed below:


To get full help on weblogic.Admin use the below command, and the output has all details,
[sami@ed-olfmwlin1 ~]$  java weblogic.Admin HELP ALL
For any further help, contact me on samiappsdba@gmail.com