Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the nid mean in a java thread dump?

For example you got a dump like this:

"MyThread" prio=1 tid=0x0850c9f8 nid=0x1baf runnable

what does the nid mean here? Is it a hex value of pid or lwpid?

like image 514
Sawyer Avatar asked Dec 19 '11 15:12

Sawyer


People also ask

What is NID in thread dump?

Java ID (tid): the unique ID given by the JVM. Native ID (nid): the unique ID given by the OS, useful to extract correlation with CPU or memory processing. State: the actual state of the thread. Stack trace: the most important source of information to decipher what is happening with our application.

What is native thread ID mean?

Thread id is basically a conversation id. It is assigned for a conservation (can be a group chat or one to one).

What is stack trace in thread dump?

A stack trace is a user-friendly snapshot of the threads and monitors in a Virtual Machine for the Java platform (Java Virtual Machine or JVM machine). A thread dump shows what every thread in a JVM is doing at a given time and is useful in debugging.

What is Timed_waiting in thread dump?

TIMED_WAITING. The thread is waiting for another thread to perform an action for up to a specified waiting time. TERMINATED. The thread has exited.


1 Answers

nid is Native Thread ID : Crucial information as this native Thread Id allows you to correlate for example which Threads from an OS perspective are using the most CPU within your JVM etc.

like image 89
saurzcode Avatar answered Sep 20 '22 02:09

saurzcode