Hi,
welcome to LQ!
I'm afraid that this is *not* exposed via any API or system calls.
Looking at the source for ps (from procps) suggests that using
the /proc/*/stat file per process is the thing to do to gather
most of that info.
Code:
tar xvf procps-3.2.7.tar.gz
cd procps-3.2.7
less ./proc/readproc.c
Cheers,
Tink
P.S.: I'm moving this to our programming forum, in the hope there's
more clued-up people watching there who may be able to prove me wrong.