Date: Thu, 13 Mar 2003 14:00:22 -0500 (EST) From: John Baldwin <jhb@FreeBSD.org> To: John Baldwin <jhb@FreeBSD.org> Cc: cvs-all@FreeBSD.org, cvs-src@FreeBSD.org, src-committers@FreeBSD.org Subject: RE: cvs commit: src/usr.bin/kdump kdump.c Message-ID: <XFMail.20030313140022.jhb@FreeBSD.org> In-Reply-To: <200303131846.h2DIkaAU076722@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 13-Mar-2003 John Baldwin wrote: > jhb 2003/03/13 10:46:35 PST > > FreeBSD src repository > > Modified files: > usr.bin/kdump kdump.c > Log: > Teach kdump(8) to handle events marked with KTR_DROP. If a record has > KTR_DROP set in its header, then we output an extra line to stdout to > indicate that events were dropped between the previous record and this > record. It is a bit trickier because we need to always notify the user > if events are dropped even if KTR_DROP is set on a record of a type that > we aren't interested in since kdump(8) doesn't know if the dropped events > were of the types that the user has requested. To avoid outputting > multiple events dropped notices in between actual event logs, a state > variable is set whenever a drop is logged and cleared whenever an actual > record is output. > > Requested by: phk Sample output looks like this: > sudo sysctl kern.ktrace.request_pool=5 kern.ktrace.request_pool: 5 -> 5 > ktrace sh -c "echo foo bar baz; sleep 1; echo more" foo bar baz more > kdump.old 723 ktrace RET ktrace 0 723 ktrace CALL execve(0xbfbff300,0xbfbff7f4,0xbfbff804) 723 ktrace NAMI "/sbin/sh" 723 ktrace RET execve -1 errno 2 No such file or directory 723 ktrace CALL execve(0xbfbff300,0xbfbff7f4,0xbfbff804) 723 ktrace NAMI "/bin/sh" 723 sh UNKNOWN(-32767) 723 sh UNKNOWN(-32767) 723 sh UNKNOWN(-32766) 723 sh CALL break(0x8101000) 723 sh RET break 0 723 sh CALL write(0x1,0x8100000,0x5) 723 sh GIO fd 1 wrote 5 bytes "more " > kdump 723 ktrace RET ktrace 0 723 ktrace CALL execve(0xbfbff300,0xbfbff7f4,0xbfbff804) 723 ktrace NAMI "/sbin/sh" 723 ktrace RET execve -1 errno 2 No such file or directory 723 ktrace CALL execve(0xbfbff300,0xbfbff7f4,0xbfbff804) 723 ktrace NAMI "/bin/sh" 723 sh Events dropped. 723 sh CALL break(0x80fe000) 723 sh Events dropped. 723 sh CALL getpgrp 723 sh Events dropped. 723 sh RET wait4 724/0x2d4 723 sh CALL break(0x8101000) 723 sh RET break 0 723 sh CALL write(0x1,0x8100000,0x5) 723 sh GIO fd 1 wrote 5 bytes "more " Hmm, from this it is apparent that kdump is missing a newline in the UNKNOWN case. I'll fix that shortly. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030313140022.jhb>