Date: Sun, 8 Jan 2012 01:06:46 +0300 From: Phil Kulin <schors@gmail.com> To: freebsd-stable@freebsd.org Subject: kproc_info system and user time is broken for processes with threads Message-ID: <CAK=u2EWbAxkg-ka3o07-J_R0eDtm=G_AsX6XRB8rWfz0jCk5JQ@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
kproc_info system and user time is broken for processes with threads, when fetch then by kvm_getprocs() function call. For example, modern 'ps' on server running mysqld (145 precached threads) # ps -ax -o comm,cputime,systime,usertime | grep mysqld mysqld 16872:35.39 5249:07.68 3353:36.79 # ps -ax -o comm,cputime,systime,usertime | grep httpd httpd 0:00.02 0:00.00 0:00.02 httpd 0:00.00 0:00.00 0:00.00 httpd 0:02.51 0:01.77 0:00.75 Sum systime+usertime=cputime for httpd, but different for mysqld. systime and usertime for mysqld not changed many times, but cputime increased. Modern ps uses ki_rusage.ru_stime and ki_rusage.ru_utime from kproc_info for systime and usertime statistic. What wrong? -- Non nobis Domine non nobis sed Nomini Tuo da gloriam Phil Kulin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAK=u2EWbAxkg-ka3o07-J_R0eDtm=G_AsX6XRB8rWfz0jCk5JQ>