Thanks for the help Gene. You're right, basically pid cannot be got from NT
workstations and they're abstracted by the JVM.
Thanks for the help.
-----Original Message-----
From: Gene Chuang [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 30, 2001 1:47 PM
To: [EMAIL PROTECTED]
Subject: Re: How to find process id of a java process?
Don't think this can be done programmatically (finding process id, or doing
all-thread dump for that matter), for security reasons, or simply because
the process id is beneath the JVM.
Gene
-----Original Message-----
From: Sankaran, Rajesh [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 30, 2001 10:39 AM
To: [EMAIL PROTECTED]
Subject: Re: How to find process id of a java process?
Actually, it's about how to find the process id of the java process from
that java source itself. With Process and Runtime classes, we can find the
total amount of memory in the JVM. Like that, how to get the process id of
itself from the code?
-----Original Message-----
From: Matthew Hixson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 30, 2001 1:29 PM
To: [EMAIL PROTECTED]
Subject: Re: How to find process id of a java process?
Since the thread dump comes from the JVM can't you just start it up like:
java YourProgram 2>&1 > /tmp/thread_dump
That way anything that comes out of the process on stdout or stderr will
fall into that file.
-M@
--
Matt Hixson
Aventail Corporation
Seattle, Washington
www.aventail.com
On Thu, 30 Aug 2001, Gene Chuang wrote:
> Depends on your operating system. For Solaris/Unix, it's 'ps'.
>
> While we're on the topic of Java processes, I've got a question:
>
> We're running Solaris 2.7 + JDK 1.3.1, and I find one of the best
debugging
> "tools" for our J2EE application is 'kill -3 xxx', where xxx is the
process
> id. This of course produces a full thread dump and is extremely useful in
> diagnosing a hung or deadlocked server. However, I was wondering if
anyone
> know how to redirect this output to, say, a log file, instead of standard
> out? I've tried playing around with a all other kill signals (1-9), a
> couple of them do produce a log file; but not with the thread dump.
>
> Gene
>
> -----Original Message-----
> From: Sankaran, Rajesh [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 30, 2001 9:46 AM
> To: [EMAIL PROTECTED]
> Subject: How to find process id of a java process?
>
>
> Hi all,
>
> This may not be an appropriate question in this list, but could someone
> through light or directions on how to find out process id of a java
process?
>
> Thanks.
> Rajesh
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".