Date: Wed, 11 Mar 2009 17:56:11 -0400 From: John Baldwin <jhb@freebsd.org> To: src-committers@freebsd.org Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r189707 - in head: sys/kern sys/sys usr.bin/kdump usr.bin/ktrace Message-ID: <200903111756.12301.jhb@freebsd.org> In-Reply-To: <200903112148.n2BLmaQJ007484@svn.freebsd.org> References: <200903112148.n2BLmaQJ007484@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 11 March 2009 5:48:36 pm John Baldwin wrote: > Author: jhb > Date: Wed Mar 11 21:48:36 2009 > New Revision: 189707 > URL: http://svn.freebsd.org/changeset/base/189707 > > Log: > Add a new type of KTRACE record for sysctl(3) invocations. It uses the > internal sysctl_sysctl_name() handler to map the MIB array to a string > name and logs this name in the trace log. This can be useful to see > exactly which sysctls a thread is invoking. > > MFC after: 1 month Sample output below: 884 ktrace CALL execve(0x7fffffffe3a0,0x7fffffffe990,0x7fffffffe9a0) 884 ktrace NAMI "/bin/sh" 884 ktrace NAMI "/libexec/ld-elf.so.1" 884 sh RET execve 0 884 sh CALL __sysctl(0x7fffffffe580,0x2,0x7fffffffe59c,0x7fffffffe590,0,0) 884 sh SCTL "kern.osreldate" 884 sh RET __sysctl 0 884 sh CALL mmap(0,0x240,PROT_READ|PROT_WRITE,MAP_ANON,0xffffffff,0) 884 sh RET mmap 5513216/0x800542000 Some of the sysctl's from a simple ps: 935 ps SCTL "kern.proc.uid.1059" 935 ps SCTL "kern.proc.uid.1059" 935 ps SCTL "sysctl.name2oid" 935 ps SCTL "kern.ccpu" 935 ps SCTL "sysctl.name2oid" 935 ps SCTL "kern.fscale" 935 ps SCTL "sysctl.name2oid" 935 ps SCTL "hw.availpages" 935 ps SCTL "sysctl.name2oid" 935 ps SCTL "kern.ps_arg_cache_limit" 935 ps SCTL "kern.proc.args.935" 935 ps SCTL "kern.argmax" 935 ps SCTL "kern.proc.args.854" -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903111756.12301.jhb>