Pages

Monday, March 11, 2013

Oracle Weblogic Server Important Files Name, Locations and their Purpose

Recently I have complied the list of important files of Oracle Weblogic Server, thought to share the same-

Please find below all Important files and folder location of Oracle Weblogic Server. I took this information from Oracle Weblogic 10.3.6 version but previous version also more or less will be having same files at same location.



PATH For Admin Server
Purpose
Important Files Present
$DomainHome/$serverName/bin
Contains all the shell script files which is being used to start/stop and contains configuration for Admin and Managed servers.
setDomainEnv.sh
startWebLogic.sh
stopWebLogic.sh
$DomainHome/$serverName/config
Contains configuration files all important components e.g.  Domain configurtaion,  JMS, JDBC etc
config.xml
jdbc config files
jms config files
fmwconfig files etc
$DomainHome/$serverName/osb/config
This directory mainly contains all the OSB artifats e.g. Proxy Services, business Services, XSD, Xquery etc, whatever we do from OSB console, most of stuff get store here only.
All the OSB artifacts
$DomainHome/$serverName/osb/config/core/_static/Ref_Store
This folder contains files having reference to OSB proxy and business services which are tagged with JMS as consumer. This directory helps during cleanup process of OSB deployment. There could be multiple OSB services get tagged with queue which could cause issues, this directory contents will help to clean that.
.str files for JMS MDB artifacts
$DomainHome/$serverName/sbgen
This folder contains MDBs for JMS queues, which could be used for any OSB  Proxy service or JAVA application. 
ear files e.g. _ALSB_1341965872872.ear
$DomainHome/$serverName/sbgen/alsbTempJars
This folder contains the .jar files which Proxy services are using via JAVA Callout action.
jar files  e.g. tempCreateProcess8557633063030887848.jar
$DomainHome/$serverName/servers/$serverName/adr
Contains all diagnostic related data, if you have configured the Weblogic Diagnostic Framework e.g. In the event of server crash a report get generated etc, in this case a thread dumps file will generated here, also contains JMS, Datasource stats etc,  good for investigation purpose.
jvm_threads.txt, dms_metrics.txt
$DomainHome/$serverName/servers/$serverName/data/store
This directory contains the persistent file store for weblogic servers which is used for normal functionality and diagnostic functionality. Weblogic has 7 internal components e.g. JMS Messages, JTA logs, EJB Timer services, Diagnostic services etc. which uses these persistent file store.
_WLS_$serverName000000.DAT
_WLS_DIAGNOSTICS000000.DAT
$DomainHome/$serverName/servers/$serverName/data/ldap
Contains LDAP related files, contains security realm details etc.  If you delete this folder, you will lose all security realm users details exist in Weblogic Admin console.
EmbeddedLDAP.data
changelog.data
changelog.index etc
$DomainHome/$serverName/servers/$serverName/data/console
Store the Admin console preference.
ConsolePreferences.xml
$DomainHome/$serverName/servers/$serverName/security
This file contains encrypted weblogic username and password, used while starting the server.
boot.properties
$DomainHome/$serverName/servers/$serverName/tmp
This folder contains all the artifacts which is been deployed in servers, alternatively can be seen from "deployment" section from Weblogic Admin Server console, included JMS MDB artifacts as well.
All the Library like this
adf.oracle.businesseditor
adf.oracle.domain etc
ALSB Logging
ALSB Publish
em
File Transport Provider components etc
$DomainHome/$serverName/servers/stage
This is stagging directory, during server startup process, JMS MDB, J2EE, War application get copied from Admin server to Managed server at this stage directory and then Managed server refer to local stage directory for deployment and things moved from Stage to 'tmp' directory. Note: for admin server you will not see this directory.
_ALSB_1352464196062 etc
$DomainHome/$serverName/servers/$serverName/logs
Contains all the logs files for troubleshooting purpose.
access.log,
AdminServer.log
ManagedServer.log
gc.log
domain.log
AdminServer.out
ManagedServer.out files
$DomainHome/$serverName/servers/sysman/log
Contains Management Service logs and trace file for troubleshooting purpose.
emoms.log
emoms.trc
$DomainHome/$serverName/servers/cache
Contains all the cached information weblogic uses directory to store cache for various components e.g. web tire related cache, JMS cache, data sources, EJB cache etc.
.class files
$DomainHome/$serverName/config/osb/transports/sftp
This location have known_hosts file contains rss/dss ssh keys for external servers which OSB try to connect using SFTP business service and use KEY as authentication
known_hosts

Thursday, February 7, 2013

JVM Parameter SurvivorRatio



This post is very small but useful, I published this coz during my search I faced quite trouble to get the meaning of SurvivorRatio JVM parameters which is been used to segregate the memory between Eden space and Survivor spaces.
In JVM you can segregate the Young generation from total heap using these parameters e.g. -XX:NewSize=400m -XX:MaxNewSize=400m or -XX:NewRatio=3
In ideal condition 40% vs 60% ratio will be good between Young Generation and Old Generation respectively; alternatively it will depend on what type of application you have deployed on JVM and based on GC.log output values can be tuned further..  
To defined explicit memory area for young generation used the below settings. For example if you have 1gb heap size define using this parameter –Xms1024m –Xmx1024m or –Xms1g –Xmx1g then give this “XX:NewSize=400m -XX:MaxNewSize=400m” to define young generation area.
Now there in one more important configuration which you need to consider while segregating young generation that’s called ‘SurvivorRatio’.
SurvivorRatio been used to further split the memory areas in Young Generation and controls the size of the two survivor spaces, young generation contains three sub area 1) Eden Space 2) Survivor One 3) Survivor Two
Eden Space has two Survivor spaces. One survivor space is empty at any given time. These Survivor Spaces serves as the destination of the next copying collection of any living objects in Eden and the other survivor space. If survivor spaces are too small copying collection overflows directly into the tenured generation.

During my search for survivor ratio I found various blogs, each blogs were saying different things, some of them saying, if you set the SurvivorRatio=6 it will set the ratio between each survivor space and eden to be 1:6, other were saying “each survivor space will be 1/8 the young generation” etc but I didn’t get any such blog which gave me crystal clear formula which will help to drive the Survivor space size.

I decided to do some POC and build a formula for that, so that Survivor ratio can be calculated easily.

Here is the formula which I have derived –

Formula to calculate S1 or S2 -
Total Young Generation / (SurvivorRatio+2)*2
E.g. If you have Young generation 400 Mb, SurvivorRatio set to 8 below will be output-

400 / (8+2) *2 = 20 MB

Similarly here is the formula to derived Eden space –

Formula for Eden Space –

(SR +1) * Young Gen / (SR +2)

E.g. if you have Young generation 400 Mb, SurvivorRatio set to 8 below will be output-

8+1*400/8+2 = 3600/10 = 360 MB

Result of few values of SurvivorRatio which I have tested in Test Environment -

Young Generation
S1
S2
Eden
SurvivorRatio
400
33.31
33.31
333.38
4
400
25
25
350
6
400
20
20
360
8

Note:
As per above result, if you decrease the SurvivorRatio value then you will get more Survivor Space, if you Increase SurvivorRatio you will get less Survivor Space.