monitoring unix resources from inside a process
Posted
by
kamziro
on Stack Overflow
See other posts from Stack Overflow
or by kamziro
Published on 2012-04-09T06:36:47Z
Indexed on
2012/04/10
17:29 UTC
Read the original article
Hit count: 284
I've had a bunch of EAGAIN's from trying to fork() or spawning threads, which lead me to believe that I'm leaking resources somewhere.
Is it possible, in POSIX, to get the following from inside the process itself:
- number of active pthreads
- number of active child processes
- number of active pipes
- number of active sockets (or maybe this and pipes would be counted as file descriptors?)
Or do these have to be counted manually? There's already counters for them, but I think one of them are leaking.
© Stack Overflow or respective owner