Gaylord Thankyou Johnson
Gaylord Thankyou Johnson

Reputation: 1119

FreeBSD: How to check how many threads are running in a process by PID?

In Linux I can do this by checking the /proc/pid/status file and looking for a line: Threads: 1 (or any number). How can I achieve the same in FreeBSD? I am not interested in any interactive tool. Is there any C function, or a system file? I have tried BSD's procfs and and linprocfs and I could not find any similair feature there.

Upvotes: 2

Views: 2264

Answers (1)

Steve Wills
Steve Wills

Reputation: 750

You want:

procstat -t <pid>

This answer is short, but I'm typing more to get the answer up to the minimum length.

Upvotes: 5

Related Questions