|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|
|||
OpenBSD, how to see subprocess details
Hi all,
I am a happy user of OpenBSD. Currently I have some problems I am trying to debug. I have a program that runs a few 'subprocesses' (threads?). Looking with 'ps waux' I can see the main program STAT="Ss". Can anyone tell me which utilities / options can be used to see each of the individual subprocesses? Remark: The top -T options seems related. However I do not see any difference at all between "top -T" and "top", so I have no processes at all with threads, the -T option does not work or it has other purposes. |
|
|||
For threads, there really isn't true native support for that.. at least in the sense the kernel isn't aware of userland threads yet.
As for child processes, the PPID (..parent PID) will be set.. it's added to the output if ps(1) with the -l/-j arguments. |
|
|||
Hi there,
No native kernel support for threads. That would explain why I could not find anything. But I am relatively sure threading is used and does work. Does this mean that scheduling of threads is done by the main program itself (I mean through some clever library that keeps the main program and all the threads running)? |
|
|||
The pthreads library has all the logic for handling threads, some work is underway for kernel-aware (1:1) userland threads (..rthreads, in OpenBSD context) but they're not ready for general consumption yet.
I believe what OpenBSD does would be called the N:1 model. |
|
|||
A lot of people don't agree with the concept of "threads" preferring the traditional process (exec/fork) based method, perhaps with IPC and a well designed protocol.
For example, people using PostgreSQL notice better performance than those who use MySQL (..which is threaded). |
|
|