Date: Tue, 26 Mar 2013 08:57:26 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Paul Koch <paul.koch137@gmail.com> Cc: hackers@freebsd.org Subject: Re: syscalls per process ? Message-ID: <20130326065726.GM3794@kib.kiev.ua> In-Reply-To: <20130326115802.15ce1626@speedy> References: <20130326115802.15ce1626@speedy>
next in thread | previous in thread | raw e-mail | index | archive | help
--qJd89WIdOyaVRnzq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 26, 2013 at 11:58:02AM +1000, Paul Koch wrote: > Hi, >=20 > At the start of all our programs, we set up a SIGALRM signal handler > to retrieve rusage stats each second and log this info for analysis. > It is useful for long running programs. One of the things we > would really really like to get is the number of system calls the > process has performed. >=20 > Is there a simple way for a process to retrieve its own number of > syscalls it has performed ? Pity it's not available via getrusage(). >=20 > We don't want to run an external program (eg. truss/dtrace) on each > program. AFAIR, the per-threads syscalls are not accounted. The accounting was performed for some short time, but it was only used as a workaround for some nfs client issue, and since the alternate approach was used, the td_syscalls was removed. Only global system count of the syscalls is maintained. --qJd89WIdOyaVRnzq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJRUUbVAAoJEJDCuSvBvK1Bn/YP/jCe3TtEYugmKlPZZPdOxYZq CEQQz68gdiD71n1dH09V3J1DAQVVZi3cre4trdR4BBb+h34npY3IdlMsLA7qaL1Z bwUAwkFcQ6jejcZYKcKKeFKbsrhG5uNdPaWoDrxBcVSXUHkoiMBDq3HzDxzVQBdO RsmwN89WTA9JhVIQJq/wuc+zzjhEPxI2KOKuzLIE71qsFqcMeKc6gvWCPjnrvye6 ArLIUr45lETFsqido6Yp2ylWfClF1tQNjtuGxixKuAv6uf2ZB8rbr7vaIROv+jV3 efe6dB7TZLBogvz9i9Zj1/A36ooSY7+KOqviIbjpN82Epx3IGoBeq7KgzmrPZ205 6x7YUPlGU86D+L4X/9P3xatROS8hMjVU13WYeFSf3NGIiL7tAly4m3W5vpoVGOgb oAZ/rqAQi8+NRL/+NJ3kluGNq55fY8PDELk7Ubk1CbxFzRvRy/lYvoIhnYlIoZ3+ 2uHN0S1eXAU/5H0AUevZJJOiIVa8FFnBs8pTLjAFHFg6sdHY+KMpK4nZQfY3m4lY XbZY9f/GWBd5TsJLliK6rYOYo6UihYq2gIwDc0zb0dw5wiqDYHm6irmQqEz1Z+8H CJbMn2WT6v/+ZS/2ZQjGGG6RjX+QBakmA2aECFOxCjA99Dd7cCmogeNFP2laqePR K0rl9pBbch2bA0JiNnjE =90md -----END PGP SIGNATURE----- --qJd89WIdOyaVRnzq--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130326065726.GM3794>