Hi
I'm writing a monitor program, that is suppoed to calculate the %CPU of a program.
In order to do so, I call the getprocs() function, and use the
pi_ru.ru_utime -user time used
pi_ru.ru_stime -system time used.
of struct procsinfo.
The sum of the above field was compared to the value of the TIME column in the output of the ps command - and the result is absolutely different.
Could anyone tell me if the above values really hold the CPU time, or is there another way to get that information ?
Thanks
Shay
I'm writing a monitor program, that is suppoed to calculate the %CPU of a program.
In order to do so, I call the getprocs() function, and use the
pi_ru.ru_utime -user time used
pi_ru.ru_stime -system time used.
of struct procsinfo.
The sum of the above field was compared to the value of the TIME column in the output of the ps command - and the result is absolutely different.
Could anyone tell me if the above values really hold the CPU time, or is there another way to get that information ?
Thanks
Shay