Posts

Heap dump on a Unix machine

After exploring the Jay/Faisal's blog on 'jmap' java utility usage and Heap dump. It is really great work by Jay/Faisal. I just thought that similar kind of experiment we did long back on UNIX machines. I am glad to sharing that with you guys. Last year, we were struggling to overcome the OutOfMemoryError, which would effect the most of productive hours. In this assignment I need to figure out what process is causing the low memory in the environment is identified by searching a all log files in the machine. Assume that all the WebLogic instance log files are collected into common directory structure, each of them are stored respective instance named folder. Script 1: After identifying the impacted instances, I need to take the heap dump of that particular instance with corresponding process id. #============================================================== # File Name : CheckLogs.sh # Author : Pavan Devarakonda # Purpose : Script for searching all WebLogic in...

Clearing Cache for WebLogic instance

Image
Hey smart WLA,  Here I am with one more interesting story of WebLogic Administration "Clearing Cache". This is most often in development environments, where you need to clear the cache for new releases for Web-tier changes, XML loadings, JDBC connection changes, JMS issues, etc.,. Some of the great developers think like this "I can change minor things directly in the jsp files to test stuff" What is actually WebLogic Cache? Basically all the web-tier related files (.jsp .class, JSPCompiled files etc.,) get stored in ./wlnotdelete/app_yourapplicaiton directory. This is treated as cache whenever there is a restart of a WebLogic instance happen then the WebLogic server will look up for last serviced object status stored in the cache to service for any pending requests. Usually, when your EJB Classes need sessions, JMS object requires persistence, your web-tier may contain static contents then Cache will be used by WebLogic Application Server instance. Cache Cleari...

Copying to multiple remote machines

Here is another interesting story of WLA (of-course mine), When I visited US in 2007 there was lot of restrictions in work places. "Hey its production you know what happen if you touch it??" "Don't open this files", "Don't enter into that folders", it will be dangerous... I know that very well what is missing in the system, where it is required a change but my hands kept criss cross!! Days passed I got opportunity to come again on long term. Now, the whole new System is going shapeup with my hands. The system is awaiting for me since long days. :) All those sparkling colorful ideas running around my mind, got chance to flow onto the system to form various automated scripts, which are having little in size with greater capabilities. Whenever there is a application version release the archive files(.jar, .war, .ear) need to copied to all over the remote machines. In olden days we were using 'sftp' command and its related 'put', 'm...

Monitoring CPU Load Averages with Shell Script

Today I started re-inventing myself, started looking what all I did for me and my team to perform in better ways. Remembered those we used to open UNIX SSH windows to monitor How the CPU load average in each site. While doing this monitoring activity on site1, there might be possible that some other site reach to overload, which leads to uncontrol tendency to work. It was funny, my dear buddy named it as 'Barbar work!!' :) After little R & D on Google/Internet found few suitable solutions. I had chosen 'uptime' command running with remote SSH connection in a loop. Adding more value to this sending a mail on the event of crossing the threshold value. This threshold will be vary depending upon the application and CPU power. Trail and error make you to identify what could be the threshold. Defining these threshold values Venu GopalRao helped a lot. Once script started working he was amazed and appreciated as well. This script can be run forever with a specified ti...

Restricting the access from Apache HTTP Configuration

Image
There is one common problem that most of the Web Admins encounter when configuring the Apache Web Server as proxy plug-in. The Java archive files such as .jar/.war/.ear files or any content of the Server accessing will be shown to everyone when that URL is published. Some situations demands some of the images/pictures display by your site must be restricted access of copying. The best way restrict this files from unauthorized use is by Apache File directive. This File directive can be configured in httpd.conf file in the Apache configuration. By the way my friend Sarangapani already discussed about Apache installation & configuration , So I am not repeating again here. In the same configuration file we can also restrict the access from specific IP address or DomainNames. Explore more about this topic File Directive A detail description about valnerabilities about Apache plugin is given in a separate blog. The link is here click

Java parameters for WebLogic Server

There are many burning issues on going WebLogic based environments due to this Java parameters JAVA_OPTIONS, l USER_MEM_ARGS,  PRE_CLASSPATH,  POST_CLASSPATH.  Heap size in MEM The USER_MEM_ARGS can be defined for WebLogic as follows as minimum requirement : -Xms1024m The minimum size of JVM -Xmx1024m The maximum size of JVM keeping the same as minimum will avoid number of GCs. -XX:NewSize=512m The Young Generation (YG) space size -XX:MaxNewSize=512m The maximum sise for Young Generation space -XX:SurvivorRatio=6 There will be two (from, to) survivor spaces both will equal in space and one will be always empty for swapping which will be used after GC. -Xnoclassgc Perm space  -XX:PermSize=128m The permanant space for static classes they will be loaded only once. -XX:MaxPermSize=128m There could be chance of increase of classes as the application functionality increased widely. Troubleshoot OOM errors In production or Development en...

Autodeploy on WebLogic 11g

Today I want to test Sun One WebServer 7 proxy plug-in with WebLogic 11g. Mr. Prasanna yalam suggested to use autodeploy of simple Jsp to the connectivity. To Autodeploy a web application in WebLogic Standalone AdminServer we need to follow the steps:1. create a Exploded folder say for example 'myweb' in domain_name/autodeploy folder2. create a Test.jsp file using any editor Hello from WebLogic Pavan Devarakonda save this fileat the same folder create WEB-INF folder 3. create web.xml deployment descriptor file 4. touch WEB-INF/REDEPLOY create this file for new timestamp when AdminServer lookup for the autodeployments. verify this on the console deployments section.choose Testing tab and click on the url with Test.jsp that's all you need to do..It will give you the autodeployed application output on your browser. Ref: http://download.oracle.com/docs/cd/E13222_01/wls/docs92/deployment/autodeploy.html#wp1021620