• Post Reply Bookmark Topic Watch Topic
  • New Topic

match a thread id to the JVM spawning it?

 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given a thread id, that just happened to be reported to you in a crazy log file somewhere, can you corelate that thread id back to a particular JVM or for that matter, the application server that spawned it?

It sure would be nice.

Cheers!

-Cameron
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you talking about the "name" that a Java Thread object has or some sort of OS thread id?
I see that in Java 1.5 you can now get a long thread ID but it appears to be internal to the JVM.
This discussion really belongs in the Threads and Synchronization forum.
Bill
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agreed. Moving...
 
Henry Wong
author
Sheriff
Posts: 22529
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Side note... different JVMs should *not* be sharing log files. You should know what log files go with what JVM based on how the logging system is configured.


Having said that, output to logs (Log4J at least) are configurable... So there could be as much or as little information as you want. If you want, you can configure it to put the hostname or other information that can help you locate the JVM.

Henry
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!