Re: get accounting info for running process

2009-11-19 Thread cronfy
Is it possible to find out how much a process have used CPU user time/system time/IO operations for now by it's pid? Like in sa, but for running process. Dan, Mel, thanks for your answers. I examined 'ps' sources and decided to use kvm_getprocs() and rusage structure. I am trying to

Re: get accounting info for running process

2009-11-19 Thread Mel Flynn
On Thu, 19 Nov 2009 20:01:02 +0300, cronfy cro...@sprinthost.ru wrote: Is it possible to find out how much a process have used CPU user time/system time/IO operations for now by it's pid? Like in sa, but for running process. Dan, Mel, thanks for your answers. I examined 'ps' sources

Re: get accounting info for running process

2009-11-18 Thread Dan Nelson
In the last episode (Nov 18), cronfy said: Is it possible to find out how much a process have used CPU user time/system time/IO operations for now by it's pid? Like in sa, but for running process. It's available to userland programs via the kern.proc.all syscall. it returns an array of

Re: get accounting info for running process

2009-11-18 Thread Mel Flynn
On Wed, 18 Nov 2009 20:18:08 +0300, cronfy cro...@sprinthost.ru wrote: Is it possible to find out how much a process have used CPU user time/system time/IO operations for now by it's pid? Like in sa, but for running process. Thanks in advance. man procfs(5), specifically, the status