473,386 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Can you run jstat or jconsole on a very short process?

blazedaces
284 100+
So in another thread I posted someone suggested I monitor the heap space usage using jstat, which lead me to jconsole which does something similar, but is more of a GUI.

The problem I'm having with both of these is that the process I'm running with java is a short lived program that reads data from one file, does something with that data, and then creates a new file.

This program lasts somewhere between 30 and 120 seconds or so. And the problem I'm finding with using jstat/jconsole is they require you to input not a program to monitor, but a process's PPID. In order to get the PPID of a process you can use jps (or check in your task manager if you're using windows).

So, if I start the program running using JCreator for example, then in a command prompt type jps to get the PPID, by the time I start jstat or jconsole, most of the program is finished.

Is there a way around this? Is there a way to start a java program with a parameter that will tell jstat or jconsole to provide you with information on this process/program from when it starts to when it ends? Otherwise, I think I wouldn't get all the information I need.

If this is something very obvious that I should have understand from the instruction pages provided by java's site, I apologize. In my eyes, it isn't explained very well to someone without a thorough understanding of the terminology. And I haven't found a way around this. But I have tried to read up information on the subject.

I appreciate your help and knowledge, thank you.

-blazed
Apr 30 '09 #1
0 1718

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: dave | last post by:
Does anyone know of any keyboard short cuts to attaching to the aspnet process from the debug menu. It takes 4 or 5 clicks now, and want a quick click to it thx dave
31
by: AlexeiOst | last post by:
Everywhere in documentation there are recommendations to use threads from thread pooling for relatively short tasks. As I understand, fetching a page or multiple pages (sometimes up to 50 but not...
1
by: Laurence Neville | last post by:
This is regarding a change in the Short Date format under Hebrew Regional Settings, that has caused huge problems in our ASP web application. The change appears to have been introduced sometime...
3
by: PhoneJack | last post by:
I am writting an algorithm that generates very large tables in dynamic memory on a linux system. These 2 tables are of the order of (30,000 x 30,000). They are being generated by the following...
5
by: Frank Borell | last post by:
I'm having a problem retrieving the ShortName from a file that was written by a MAC and only from a Windows 2003 server. I realize the file has a space after it, but I can retrieve the short...
1
by: Paul Edwards | last post by:
I have the following C program: #include <stdio.h> int main(void) { unsigned short x = 32768, y=16384; if (x > y) {
6
by: Raymond Lewallen | last post by:
I understand the differences between And and AndAlso and the differences between Or and OrElse. Under what circumstance would you NOT use short-circuiting when evaluating expressions? It seems to...
17
by: Martin Wells | last post by:
When passing arguments to a VAL function, all integer types are promoted, and floats become doubles. Therefore, signed short will be promoted to signed int. Therefore I can't see any reason why...
1
by: nsteiner | last post by:
Hi all I have a probem. I am trying to monitor the memory usage of CruiseControl (A java/Ant based continous integration app). I tried using Jconsole from the JDK, but I get this error:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.