The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Identifying and grouping OS processes and APP processes wilsonee SUN Solaris 2 09-30-2008 09:26 AM
Sun Java Platform, Standard Edition 1.5.0_16 (Java 5 branch) iBot Software Releases - RSS News 0 07-23-2008 10:20 AM
Sun Java Platform, Standard Edition 1.5.0_15 (Java 5 branch) iBot Software Releases - RSS News 0 03-06-2008 05:50 PM
Using Subversion, NetBeans IDE, and Sun Java System Web Server With Java ME iBot UNIX and Linux RSS News 0 02-01-2008 05:00 PM
Monitoring Processes - Killing hung processes ukndoit UNIX for Advanced & Expert Users 4 01-17-2008 04:30 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-06-2008
siburajappan siburajappan is offline
Registered User
  
 

Join Date: Oct 2008
Location: India
Posts: 1
Getting CPU utilization of Java processes

Hi,

I have a java application running as a service in my unix Box. I want to test the CPU utilization and the Memory utilization of the app. I used top command and also the ps commands

This command is showing each thread in my app as a separate thread. So I have a lot of j9 entries.

Now my question is, if I get the utilization data of the parent process, will that give me the cummulative CPU and memory usage of my app ???

Are there any other tools which can be used to monitor java processes ??
  #2 (permalink)  
Old 10-06-2008
SebaM6 SebaM6 is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 34
I don't know if there are any tool exclusively for java.

But I am pretty sure that utilization of parent process won't give you cumulative measurements. Of course you can use ps and calculate it yourself by each process.
  #3 (permalink)  
Old 10-06-2008
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
  
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,616
If the java processes are the only service on this box use vmstat (the CPU-related columns). Alternatively use sar, when you need to monitor longer time intervals.

I hope this helps.

bakunin
  #4 (permalink)  
Old 10-07-2008
cbkihong cbkihong is offline Forum Advisor  
Advisor
  
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,624
You can monitor these kinds of statistics, and more, with Java Management Extensions (JMX). Because the Java Virtual Machine has specific quirks with how memory is utilized (say, separating the memory space into partitions such as heap and non-heap space), just looking at the OS-level resource utilization is not generally adequate. Depending on how you configure, you may either monitor a local process or a Java process running on another system, via a graphical user interface tool such as JConsole (or VisualVM although I cannot get it run properly).

With JMX, you can even write some simple Java program to log selected statistical values periodically on a 24x7 basis and analyse them later offline.

You can refer to this document for an introduction of Java SE management and JMX technology:

- Java SE Monitoring and Management Guide

Or read the JMX specification if you wish to get more in-depth programming knowledge.
Sponsored Links
Closed Thread

Bookmarks

Tags
unix commands

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:22 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0