How to monitor the number of the opened kernel objects of a process?

We often use kernel objects in our programming, including threads, signals, sockets, files...

In win32 system, it can be monitored in task manager and the kernel objects listed as "handles", "threads", "user objects"...

How can we get these information in BSD system? (may be use a command in bash)

taskmanager_thumb.png
 
top is easiest way to get number of threads belonging to PIDs (THR field tells thread number).
fstat -p PID will show open file handles (files, sockets, devices, etc, ..) for the PID.
 
Back
Top