rss
SOATUBE
Oracle
Custom Search SOABYTE here

Thursday, April 24, 2014

How to Stop WebLogic Server Scripting Tool (WLST) from Creating Zero-Byte Log Files

SYMPTOMS 
Zero bytes WLST logs are created under Middleware Home/logs directory, when the server is being shut down:
-rw-r----- 1 oracle dba 0 Nov 13 11:56 wlst_20111113115622.log
-rw-r----- 1 oracle dba 0 Nov 13 11:56 wlst_20111113115652.out
-rw-r----- 1 oracle dba 0 Nov 13 11:56 wlst_20111113115652.log
-rw-r----- 1 oracle dba 0 Nov 13 11:57 wlst_20111113115722.out
-rw-r----- 1 oracle dba 0 Nov 13 11:57 wlst_20111113115722.log

CAUSE
 From WebLogic Server 10.3.3, zero-byte log files are created in the logs directory whenever a WebLogic Server Scripting Tool (WLST) command is executed. This issue is caused by stopWeblogic.sh script, which uses WLST internally to shut down the running server:

echo "import os" >"shutdown.py" 
echo "if os.environ.has_key('wlsUserID'):" >>"shutdown.py" 
echo " wlsUserID = os.environ['wlsUserID']" >>"shutdown.py" 
echo "if os.environ.has_key('wlsPassword'):" >>"shutdown.py" 
echo " wlsPassword = os.environ['wlsPassword']" >>"shutdown.py" 
echo "connect(${userID} ${password} url='${ADMIN_URL}', adminServerName='${SERVER_NAME}')" >>"shutdown.py" 
echo "shutdown('${SERVER_NAME}','Server', ignoreSessions='true')" >>"shutdown.py" 
echo "exit()" >>"shutdown.py" 

SOLUTION 
There are straightforward ways either to workaround or to disable this feature.
 1.> By redirecting all log entries to a single file (thus eliminating multiple log files), use the following system property:
java -Dwlst.offline.log=/tmp/file.log weblogic.WLST
This will direct all WLST log entries to /tmp/file.log, rather than generating new log files each time that WLST is started.

 2.> By disabling WLST log entries entirely using the same system property:
java -Dwlst.offline.log=disable weblogic.WLST
This will suppress all WLST log entries and no log file will be created.

 3.> An Alternative solution is to edit the wlst.sh/.cd script, making sure that the WLST_PROPERTIES contains -Dwlst.offline.log=disable.

 (a) In the case of vanilla WebLogic Server installations, the $WL_HOME/common/bin/wlst.sh can be used as the template and the following line editted from
JVM_ARGS="-Dprod.props.file='${WL_HOME}'/.product.properties ${WLST_PROPERTIES} ${JVM_D64} ${MEM_ARGS} ${CONFIG_JVM_ARGS}"
to
JVM_ARGS="-Dwlst.offline.log=disable -Dprod.props.file='${WL_HOME}'/.product.properties ${WLST_PROPERTIES} ${JVM_D64} ${MEM_ARGS} ${CONFIG_JVM_ARGS}"

(b)For Fusion Middleware installations the template should be MWHOME/oracle_common/common/bin/wlst.sh and the edit is to change from
# Some scripts in WLST_HOME reference ORACLE_HOME
WLST_PROPERTIES="${WLST_PROPERTIES} -DORACLE_HOME='${ORACLE_HOME}' -DCOMMON_COMPONENTS_HOME='${COMMON_COMPONENTS_HOME}'"
to
# Some scripts in WLST_HOME reference ORACLE_HOME
WLST_PROPERTIES="${WLST_PROPERTIES} -Dwlst.offline.log=disable  -DORACLE_HOME='${ORACLE_HOME}'  -DCOMMON_COMPONENTS_HOME='${COMMON_COMPONENTS_HOME}'"

Rotate WebLogic Server (WLS) logs to avoid large files using WLST

Weblogic Server Instance in Development Mode
The server automatically renames (rotates) its local server log file as SERVER_NAME.log.n. For the remainder of the server session, log messages accumulate in SERVER_NAME.log until the file grows to a size of 500 kilobytes. Each time the server log file reaches this size, the server renames the log file and creates a new SERVER_NAME.log to store new messages. By default, the rotated log files are numbered in order of creation filenamennnnn, where filename is the name configured for the log file. You can configure a server instance to include a time and date stamp in the file name of rotated log files; for example, server-name-%yyyy%-%mm%-%dd%-%hh%-%mm%.log.

 Weblogic Server Instance in Production Mode
 The server rotates its server log file whenever the file grows to 5000 kilobytes in size. It does not rotate the local server log file when the server is started. We can change these default settings for log file rotation based on a time interval or the maximum number of rotated files that can accumulate. After the number of log files reaches this number, subsequent file rotations delete the oldest log file and create a new log file with the latest suffix.

 Note: WebLogic Server sets a threshold size limit of 500 MB before it forces a hard rotation to prevent excessive log file growth.

To Rotate via WLST:
#invoke WLST
java weblogic.WLST

#connect WLST to an Administration Server
wls:/offline> connect('username','password')

#navigate to the ServerRuntime MBean hierarchy
wls:/mydomain/serverConfig> serverRuntime()
wls:/mydomain/serverRuntime>ls()

#navigate to the server LogRuntimeMBean
wls:/mydomain/serverRuntime> cd('LogRuntime/myserver')
wls:/mydomain/serverRuntime/LogRuntime/myserver> ls()
-r-- Name myserver
-r-- Type LogRuntime
-r-x forceLogRotation java.lang.Void :

#force the immediate rotation of the server log file
wls:/mydomain/serverRuntime/LogRuntime/myserver> cmo.forceLogRotation()
To specify the Location of the archived Log Files
The following command specifies the directory location for the archived log files using the                                -Dweblogic.log.LogFileRotationDir Java startup option:
java -Dweblogic.log.LogFileRotationDir=c:\foo
-Dweblogic.management.username=installadministrator
-Dweblogic.management.password=installadministrator weblogic.Server

Getting JDBC and Connection Pool Data From a WLST or Shell script

Getting JDBC and Connection Pool Data From a WLST or Shell script
 In the script above replace weblogic with your actual username, welcome1 with the actual username's password and localhost:7001 with the actual hostname and password for your WebLogic server.
# monitor.py

attr= {
    "ActiveConnectionsAverageCount": None,
    "ActiveConnectionsCurrentCount": None,
    "ActiveConnectionsHighCount": None,
    "ConnectionDelayTime": None,
    "ConnectionsTotalCount": None,
    "CurrCapacity": None,
    "DeploymentState": None,
    "Enabled": None,
    "FailuresToReconnectCount": None,
    "HighestNumAvailable": None,
    "HighestNumUnavailable": None,
    "LeakedConnectionCount": None,
    "ModuleId": None,
    "Name": None,
    "NumAvailable": None,
    "NumUnavailable": None,
    "Properties": None,
    "State": None,
    "Type": None,
    "VersionJDBCDriver": None,
    "WaitSecondsHighCount": None,
    "WaitingForConnectionCurrentCount": None,
    "WaitingForConnectionHighCount": None
}

connect("weblogic","welcome1","t3://localhost:7001")
pools= adminHome.getMBeansByType( 'JDBCConnectionPoolRuntime' )
for pool in pools:
    for a in attr:
        attr[a]= pool.getAttribute( a )
        # attr has the JDBC and Connection Pool data at this point
    print attr
disconnect()
Using weblogic.Admin Tool
 In the command below replace test_domain with your actual domain name, weblogic with your actual username, welcome1 with the actual username's password, localhost:7001 with the actual hostname and password for your WebLogic server, AdminServer with the server name that your Data Source was targeted to, and JDBCDataSource1 with the actual Data Source name.

$ java weblogic.Admin -adminurl t3://localhost:7001 -username weblogic -password welcome1 GET -pretty -mbean "test_domain:Location=AdminServer,Name=JDBCDataSource1,ServerRuntime=AdminServer,Type=JDBCConnectionPoolRuntime"

Suspend / Resume an MDB from Java code and WLST script

The below scripts are to suspend and resume an MDB.Server settings values need to be modified accordingly. 

Please set up the environment for your domain and then run the command line if you want to suspend the MDB:
java weblogic.WLST suspend.py

WLST Code

suspend.py :

connect('username','password','t3://host:port')
domainRuntime()
cd('/ServerRuntimes/TargetServerName/ApplicationRuntimes/ApplicationDeploymentName/ComponentRuntimes/ApplicationDeploymentName/EJBRuntimes/MDBName_JNDINameoftheQueue')
cmo.suspend()

resume.py

connect('username','password','t3://host:port')
domainRuntime()
cd('/ServerRuntimes/TargetServerName/ApplicationRuntimes/ApplicationDeploymentName/ComponentRuntimes/ApplicationDeploymentName/EJBRuntimes/MDBName_JNDINameoftheQueue')
cmo.resume()

Java Code

JMX is the technology for managing and monitoring WLS server, just like WLST does. The following class changes the state of the MDB to resume or suspend.

import java.util.Hashtable;

import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
import javax.naming.Context;

public class EjbSuspend {

public static void main(String[] args) {
  try {
    String hostname = "127.0.0.1";
    String portString = "7001";
    String username = "weblogic";
    String password = "weblogic";

    String protocol = "t3";
    Integer portInteger = Integer.valueOf(portString);
    int port = portInteger.intValue();
    String jndiroot = "/jndi/";
    String mserver = "weblogic.management.mbeanservers.runtime";

    JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostname, port, jndiroot + mserver);
    Hashtable h = new Hashtable();
    h.put(Context.SECURITY_PRINCIPAL, username);
    h.put(Context.SECURITY_CREDENTIALS, password);
    h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES, "weblogic.management.remote");
    h.put("jmx.remote.x.request.waiting.timeout", new Long(10000));
    JMXConnector connector = JMXConnectorFactory.connect(serviceURL, h);
    MBeanServerConnection connection = connector.getMBeanServerConnection();

    Hashtable prop = new Hashtable();
    // configuration of the server:
    prop.put("Name", "messageDriven_examples-jms!quotes"); //MDBName_JNDINameoftheQueue
    prop.put("Type", "MessageDrivenEJBRuntime");
    prop.put("ServerRuntime", "AdminServer"); // TargetServerName
    prop.put("ApplicationRuntime", "ejb20_message"); // ApplicationDeploymentName
    prop.put("EJBComponentRuntime", "ejb20_message.jar"); // ApplicationDeploymentName.jar
    ObjectName beanName = new ObjectName("com.bea", prop);

    String action = "suspend"; // suspend - resume
    connection.invoke(beanName, action, null, null);

    System.out.println("MDB " + action );
    connector.close();

  } catch (Exception e) {
    e.printStackTrace();
  }
 }

}

Wednesday, April 23, 2014

How to get OS type from WLST script

Following is a wlst script to fetch Platform OS Type.
##########################################################
#Getting Platform OS information through WLST
#Save the following as getOSType.py
#Run $WL_HOME/common/bin/wlst.sh < getPlatform.py to get the OS Name in the standard output.
##########################################################
import java.lang.System
platform=java.lang.System.getProperty('os.name')
print "\n os.name = " + platform + "\n"

Tuesday, April 22, 2014

BRM JCA Adapter Update Automation WLST Script

Place BRMJCAProp.properties file,deployBRMJCATest.py in a folder and run WL_HOME\server\bin\setWLSEnv.cmd or source $WL_HOME/server/bin/setWLSEnv.sh java weblogic.WLST /deployBRMJCATest.py

########################################################################################
# BRM JCA Adapter Update Automation WLST Script                                        #
# @Team Fusion                                                                         #
# Restart the servers after running this script.                                       #
#Do not change the description                                                         #
########################################################################################
#Running the script                                                                    #
########################################################################################
#WL_HOME\server\bin\setWLSEnv.cmd or                                                   #
#source $WL_HOME/server/bin/setWLSEnv.sh                                               #
#java weblogic.WLST <Folder_Loc>/deployBRMJCATest.py                                   #
########################################################################################
from java.io import FileInputStream
import java.lang
import string
import sys

#read properties file
propInputStream = FileInputStream("BRMJCAProp.properties");
configProps = Properties();
configProps.load(propInputStream);

#Connecting to Server
adminusername = configProps.get('ADMIN_USERNAME');
adminpassword = configProps.get('ADMIN_PASSWORD');
adminurl = configProps.get('ADMIN_URL');
clusterName = configProps.get('CLUSTER_NAME');
connect(adminusername, adminpassword, adminurl)
domainName=cmo.getName();
serverList = cmo.getServers();
server1=serverList[1].getName();
appName              = configProps.get('appName');
moduleOverrideName   = appName+'.rar'
moduleDescriptorName = configProps.get('moduleDescriptorName');

def __undeployBRMJCAAdapter():
 edit();
 startEdit();
 print 'Undeploying BRM JCA Adapter'
 undeploy(appName);
 activate();
 planFile = configProps.get('planFile');
 os.remove(planFile)
 
def createDeploymentPlanVariable(wlstPlan, name, value, xpath, origin='planbased'):
#Create a variable in the Plan.
#This method is used to create the variables that are needed in the Plan.xml file
##
 
 try:  
    variableAssignment = wlstPlan.createVariableAssignment(name, moduleOverrideName, moduleDescriptorName)
    variableAssignment.setXpath(xpath)
    variableAssignment.setOrigin(origin)
    wlstPlan.createVariable(name, value)
 except:
    print('--> was not able to create deployment plan variables successfully') 
 
def __deployBRMJCAAdapter():
 eisName = configProps.get('eisName');
 BRMConnectionPoolTimeout = configProps.get('BRMConnectionPoolTimeout')
 ConnectionString = configProps.get('ConnectionString')
 BRMConnectionPoolMaxsize = configProps.get('BRMConnectionPoolMaxsize')
 AverageOpcodeCount = configProps.get('AverageOpcodeCount')
 MultiDB = configProps.get('MultiDB')
 ZeroEpochAsNull = configProps.get('ZeroEpochAsNull')
 BRMConnectionPoolMinsize = configProps.get('BRMConnectionPoolMinsize')
 transactionMode = configProps.get('transactionMode')
 transactionsupport = configProps.get('transactionsupport')
 rarLocation = configProps.get('rarLocation')
 print 'Deploying BRM JCA Adapter'
 cd('Servers')
 edit();
 startEdit();
 deploy(appName, rarLocation, targets=clusterName, createPlan='true')
 activate();
#
# update the deployment plan
#
 print('--> about to update the deployment plan for the Adapter')
 edit();
 startEdit();
 planPath = get('/AppDeployments/'+appName+'/PlanPath')
 appPath = get('/AppDeployments/'+appName+'/SourcePath')
 print('--> Using plan ' + planPath)
 plan = loadApplication(appPath, planPath)
 print('--> adding variables to plan')
 createDeploymentPlanVariable(plan, 'ConfigProperty_BRMConnectionPoolTimeout_Value_1',BRMConnectionPoolTimeout, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="oracle.tip.adapter.api.OracleConnectionFactory"]/connection-instance/[jndi-name="' + eisName + '"]/connection-properties/properties/property/[name="BRMConnectionPoolTimeout"]/value')
 createDeploymentPlanVariable(plan, 'ConfigProperty_ConnectionString_Value_2', ConnectionString, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="oracle.tip.adapter.api.OracleConnectionFactory"]/connection-instance/[jndi-name="' + eisName + '"]/connection-properties/properties/property/[name="ConnectionString"]/value')
 createDeploymentPlanVariable(plan, 'ConfigProperty_BRMConnectionPoolMaxsize_Value_3', BRMConnectionPoolMaxsize, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="oracle.tip.adapter.api.OracleConnectionFactory"]/connection-instance/[jndi-name="' + eisName + '"]/connection-properties/properties/property/[name="BRMConnectionPoolMaxsize"]/value')
 createDeploymentPlanVariable(plan, 'ConfigProperty_AverageOpcodeCount_Value_4', AverageOpcodeCount, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="oracle.tip.adapter.api.OracleConnectionFactory"]/connection-instance/[jndi-name="' + eisName + '"]/connection-properties/properties/property/[name="AverageOpcodeCount"]/value')
 createDeploymentPlanVariable(plan, 'ConfigProperty_MultiDB_Value_5', MultiDB, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="oracle.tip.adapter.api.OracleConnectionFactory"]/connection-instance/[jndi-name="' + eisName + '"]/connection-properties/properties/property/[name="MultiDB"]/value')
 createDeploymentPlanVariable(plan, 'ConfigProperty_ZeroEpochAsNull_Value_6', ZeroEpochAsNull, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="oracle.tip.adapter.api.OracleConnectionFactory"]/connection-instance/[jndi-name="' + eisName + '"]/connection-properties/properties/property/[name="ZeroEpochAsNull"]/value')
 createDeploymentPlanVariable(plan, 'ConfigProperty_BRMConnectionPoolMinsize_Value_7', BRMConnectionPoolMinsize, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="oracle.tip.adapter.api.OracleConnectionFactory"]/connection-instance/[jndi-name="' + eisName + '"]/connection-properties/properties/property/[name="BRMConnectionPoolMinsize"]/value')
 createDeploymentPlanVariable(plan, 'ConfigProperty_transactionMode_Value_8', transactionMode, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="oracle.tip.adapter.api.OracleConnectionFactory"]/connection-instance/[jndi-name="' + eisName + '"]/connection-properties/properties/property/[name="transactionMode"]/value')
 createDeploymentPlanVariable(plan, 'ConnectionDefinitionProperties_TransactionSupport_9', transactionsupport, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="oracle.tip.adapter.api.OracleConnectionFactory"]/connection-instance/[jndi-name="' + eisName + '"]/connection-properties/transaction-support')
 print('--> saving plan')
 plan.save();
 cd('/AppDeployments/'+appName+'/Targets');
 print('--> redeploying the OracleBRMJCA15Adapter')
 updateApplication(appName, planPath);
 print('--> activating changes')
 print('--> done')
 activate(block='true');
 
# MAIN

#****************************************************************************

#

# Calling all the Methods here

print(' ————————– ')

print('Starting the changes')

print('#########################################################################################################################')

print 'Do you want to undeploy BRM JCA Adapter'
input = raw_input("Press y to PROCEED or press n to SKIP ===================================================>                          ");
if input == 'y':
 __undeployBRMJCAAdapter()
  
print 'Do you want to deploy BRM JCA Adapter'
input = raw_input("Press y to PROCEED or press n to SKIP ===================================================>                          ");
if input == 'y':
 __deployBRMJCAAdapter()
else:
 exit();
#*****************************************************
# Environment details
#*****************************************************
ADMIN_USERNAME = weblogic
ADMIN_PASSWORD = welcome1
ADMIN_URL = t3://localhost:7001
CLUSTER_NAME = SOACluster

##*****************************************************
##   BRM JCA Adapter Configurations                   *
##*****************************************************

##Do not change##
rarLocation = /app/oracle/fmw/BRM/OracleBRMJCA15Adapter.rar
planFile = /app/oracle/fmw/BRM/plan.xml
appName = OracleBRMJCA15Adapter
moduleDescriptorName = META-INF/weblogic-ra.xml
eisName = eis/BRM
##Adapter Configuration Properties##
BRMConnectionPoolTimeout = 10000
ConnectionString = ip brmip 11960
BRMConnectionPoolMaxsize = 5000
AverageOpcodeCount = 5
MultiDB = true
ZeroEpochAsNull = true
BRMConnectionPoolMinsize = 0
transactionMode = LOCAL_TRANSACTION
transactionsupport = LocalTransaction

Monday, April 14, 2014

SAF Monitoring Automation WLST Script

Place domainSAF.properties file,SAFMonitoring.py and runSAFMonitoringAutomationWLST.sh inside a folder and execute ./runSAFMonitoringAutomationWLST.sh to run the program.
#*****************************************************
# Environment details                                *
#domainSAF.properties file                           *
#*****************************************************
ADMIN_USERNAME = weblogic
ADMIN_PASSWORD = welcome1
ADMIN_URL = t3://localhost:7001

#*****************************************************
# Sleep Time in millis                               *
#*****************************************************
SleepTime = 5000

#*****************************************************
# Running Servers List in Order Required             *
#*****************************************************
serverRunningNamesArray = AIA_01,AIA_02,AIA_03,AIA_04

#*****************************************************
# SAF Agents List bases on MServers required         *
#*****************************************************
SAFAgents = OSM_SAF_Agent01,OSM_SAF_Agent02,OSM_SAF_Agent03,OSM_SAF_Agent04

#*****************************************************
# SAFRemoteContextName                               *
#*****************************************************
SAFRemoteContextName = OSM_queues

#*****************************************************
# SAF Remote Endpoint Names to Monitor               *
#*****************************************************
SAFQueuesNames = AIA_CRTFO_IN_JMSQ,AIA_UPDBO_IN_JMSQ,AIA_UPDCUST_IN_JMSQ
########################################################################################
# SAF Monitoring Automation WLST Script                                                #
# @Team Fusion                                                                         #             
#Do not change the discription                                                         #
########################################################################################
########################################################################################
#Running the script                                                                    #
#Run runSAFMonitoringAutomationWLST.sh                                                 #
########################################################################################
from java.io import FileInputStream
import java.lang
import string
from java.util import Date
from time import time, sleep
import sys
import os

#read properties file
propInputStream = FileInputStream("domainSAF.properties");
configProps = Properties();
configProps.load(propInputStream);

#Connecting to Server
adminusername = configProps.get('ADMIN_USERNAME');
adminpassword = configProps.get('ADMIN_PASSWORD');
adminurl = configProps.get('ADMIN_URL');
clusterName = configProps.get('CLUSTER_NAME');
connect(adminusername, adminpassword, adminurl)


def SAFMonitoringAutomation():
 domainRuntime();

 SAFRemoteContextName = configProps.get('SAFRemoteContextName')
 SleepTime = int(configProps.get('SleepTime'))
 SAFAgents = configProps.get('SAFAgents')
 SAFQueuesNames = configProps.get('SAFQueuesNames')
 SAFAgent = String(SAFAgents).split(",")
 SAFQueuesName = String(SAFQueuesNames).split(",")
 serverRunningNamesArray = configProps.get('serverRunningNamesArray')
 serversRunningList = String(serverRunningNamesArray).split(",")
 while 1:
  i = 0;
  j = 0;
  java.lang.Thread.sleep(SleepTime)
  while i<len(serversRunningList) and j<len(SAFAgent):
   serverName = serversRunningList[i]
   SafAgent = SAFAgent[j]
   i = i+1
   j = j+1
   print 'Date\t\t\t\tQueueName\t\tMessagesPendingCount\tMessagesCurrentCount\tMessagesHighCount\tMessagesReceivedCount\tLastException\tServerName'
   for k in SAFQueuesName:
      cd('/ServerRuntimes/'+serverName+'/SAFRuntime/'+serverName+'.saf/Agents/'+SafAgent+'/RemoteEndpoints/AIAJMSModule!'+SAFRemoteContextName+'!'+k+'@'+SafAgent+'@'+serverName+'/')
      FailedMessagesTotal = cmo.getFailedMessagesTotal()
      LastException = cmo.getLastException()
      LastTimeConnected = cmo.getLastTimeConnected()
      LastTimeFailedToConnect = cmo.getLastTimeFailedToConnect()
      MessagesCurrentCount = cmo.getMessagesCurrentCount()
      MessagesHighCount = cmo.getMessagesHighCount()
      MessagesPendingCount = cmo.getMessagesPendingCount()
      MessagesReceivedCount = cmo.getMessagesReceivedCount()
      Url = cmo.getURL()
      date = Date()
      print '%s\t%s\t\t%d\t\t\t%d\t\t\t%d\t\t\t%d\t\t\t%s\t%s' % (date,k, MessagesPendingCount, MessagesCurrentCount, MessagesHighCount, MessagesReceivedCount, LastException, serverName)
   
    

# MAIN

#****************************************************************************

#

# Calling all the Methods here

print(' ————————– ')

print('Monitoring SAF Endpoints')

print('#########################################################################################################################')

if __name__== "main":
   SAFMonitoringAutomation()




print ('##########################################################################################################################')

print(' ————————– ')

print 'Monitoring SAF Endpoints Ends'
print 'Disconnecting from AdminServer and exiting WLST now'
disconnect();
exit(); 
########################################################################################
#Running the script                                                                    #
#Run runSAFMonitoringAutomationWLST.sh                                                 #
########################################################################################
#!/bin/bash

# ************* Setting the Environment ***********************
echo "Setting the Environment"
#WL_HOME=/app/oracle/fmw/wlserver_10.3
source /app/oracle/fmw/wlserver_10.3/server/bin/setWLSEnv.sh

echo "Environment has been set....."

# ************* Changing the directory***********************
cd .

echo "Calling the script....."

# ************* Calling the WLST script  *****************
java weblogic.WLST SAFMonitoring.py > SAFMonitoring.log
 
Blogger Profile