Welcome Guest!
Create Account | Login
Locator+ Code:

Search:
FTPOnline
Channels Conferences Resources Hot Topics Partner Sites Magazines About FTP RSS 2.0 Feed

Free Subscription to Java Pro

email article
printer friendly
more resources

Troubleshoot High CPU Issues
Got high CPU Issues? Explore operating system commands specific to JVMs to detect the cause of the problem
by Steve Pozarycki

July 14, 2005

High CPU issues can occur for many reasons: your application server (or stand-alone Java application), user-created threads, bad coding practices, or third-party software. Unfortunately, determining where this happens can sometimes be difficult. If your Java applications ever encounter high CPU issues, you will find the tips for debugging presented here to be useful.

ADVERTISEMENT

You can attempt to help troubleshoot this problem by using operating system-specific commands and gathering data. All of the information for these operating systems is based on the Sun JVM. However, the same information is provided from other JVMs (such as the BEA JRockit JVM) so the same concepts apply.

Here we'll look at examples of troubleshooting this problem on Solaris and Microsoft Windows systems. Information for Hewlett-Packard, AIX, and Linux can be found on the BEA support Web site (see Resources).

Note that because HP does not have a prstat-like command available there is a binary executable that I developed that is available on the BEA Support Web site that you can download to gather the necessary information on HP. The information presented here was run on the WebLogic Platform, but the troubleshooting methodology will apply to any Java application.

Troubleshooting Solaris
Run the prstat command on the Java process, and do this for several iterations so you can see a pattern. For example:

prstat -L -p <PID> 1 1

If you do not have prstat available on your Solaris installation, do this instead:

ps -Le -o pid,user,s,lwp,pcpu,
        args | awk '$3 != "S" { print 
        }'
This article requires registration. Please login below or click here to register.
 
E-mail Address:
Password:
Remember me:
 



Back to top













Java Pro | Visual Studio Magazine | Windows Server System Magazine
.NET Magazine | Enterprise Architect | XML & Web Services Magazine
VSLive! | Thunder Lizard Events | Discussions | Newsletters | FTP Home