Abhinav Shankar
Abhinav Shankar

Reputation: 101

Thread level information about a process in linux

I need to get the resources utilized by different threads that runs in a specific process. Suppose I give a particular pid as the input, I must get the information(Time spent in User,Kernel mode) about the threads for that pid. Is there a Proc file which takes care of all the details about the threads?

Upvotes: 0

Views: 527

Answers (1)

qwwqwwq
qwwqwwq

Reputation: 7329

The information for the threads of a process can be found in the task subdirectory of the proc dir:

/proc/[pid]/task/[tid]/stat

Additionally, top can display thread information:

top -H -p [pid]

Upvotes: 2

Related Questions