My Linux Stuff - Complete Blog For Linux Articles

My Linux Stuff - Complete Blog For Linux Articles

A Website For Complete Linux OS,Step by Step linux Installtion, Linux Tips and Tricks and Linux Stuff and so on... Connect and sharing here....

TOP 50 ENGINEERING COLLEGES IN INDIA 2014

TOP 50 ENGINEERING COLLEGES IN INDIA 2014

This below survey was taken many form many colleges in India. These Top 50 Engineering Colleges in India have Good Infrastructure, Good Environment, Educations , Staff, Placement , Research Activities and other Facilities are good.

Top 10 Government Engineering Colleges in India

Top 10 Government Engineering Colleges in India

These Government Engineering Colleges in India are really good for all kind of stuff like Education , research , Placement and New Innovation Ideas etc... But Getting seat in these colleges are heavy competition in students .....

Top 10 Colleges In India 2014

Top 10 Colleges In India 2014

Indian Institute Of Technology Delhi,Indian Institute Of Technology Bombay,Indian Institute Of Technology Kanpur,Indian Institute Of Technology Madras,Indian Institute Of Technology Kharagpur,Indian Institute Of Technology Roorkee,University Of Delhi,Indian Institute Of Technology Guwahati,University Of Calcutta,University Of Mumbai, National Institute Of Technology,Trichy.

2014 LATEST SURVEY TOP RANKING ENGINEERING COLLEGES IN INDIA

2014 LATEST SURVEY TOP RANKING ENGINEERING COLLEGES IN INDIA

This below survey was taken many form many colleges in India. These Top 100 Engineering Colleges in India have Good Infrastructure, Good Environment, Educations , Staff, Placement , Research Activities and other Facilities are good. If you want to do Engineering as your dream and try out these colleges

Subscribe Now!

Enter your email address:

Showing posts with label Liferay Tips. Show all posts
Showing posts with label Liferay Tips. Show all posts

Thursday, March 29, 2012

Tricks for Debugging Liferay


  Here are a few tricks that I have come across that have proven to be pretty useful.

1. Monitoring Memory and CPU usage

This is pretty basic and is quite helpful in performance tests.  Monitoring these aspects will help determine if a system is memory-bound or CPU-bound.  For the memory bit, Sun provides a nice set of tools called jvmstat to watch how garbage collection is doing on your system.  If you see the GC running too often or collecting huge amounts of memory at a time, that probably means you need to fix your 
JVM parameters.  For the CPU bit, your operating system usually comes bundled with some kind of CPU usage monitor.  In the case of the Mac OS X/Linux/Unix breed, you can use iostat or vmstat.  For Windows, you can use the bundled administration tool called Performance Monitor.

2. Getting Thread Dumps

Now, if you think you are deadlocking somewhere or spending way too much time in certain blocks of code under load, a pretty useful test is to gather thread dumps of the JVM.  This will tell you what every thread on the portal is doing at a given point in time.  Not sure how to do this on Windows, but under Mac OS X/Linux/Unix, you can do a 
kill -3 <pid> and your portal's log file will now have a bunch of information on what each thread was doing at the moment in time.  Don't be afraid of this command -- it will not kill your server (unless, of course, you do a kill -9 <pid> or something like that... so don't http://www.liferay.com/html/js/editor/fckeditor/editor/images/smiley/msn/teeth_smile.gif).



3. Remote Debugging

So in this scenario, you are running your portal on server X and you have all your debugging tools on laptop Y.  Well, if using Tomcat, you can start your portal with the command 
catalina.sh jpda start and it will enable remote debugging.  Then, using Eclipse or another IDE on laptop Y, you can start the debugger and hook it into a remote Java application on localhost port 8000.  You can then step through code and set breakpoints as though you were debugging code on your own laptop.

Hope that helps.  And if all else fails, search the Internet -- it never lies.s

Related Posts Plugin for WordPress, Blogger...