svn commit: r189707 - in head: sys/kern sys/sys usr.bin/kdump
usr.bin/ktrace
John Baldwin
jhb at freebsd.org
Wed Mar 11 14:56:24 PDT 2009
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
More information about the svn-src-head
mailing list