From owner-cvs-all Thu Mar 13 11: 0:14 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BFF9037B407 for ; Thu, 13 Mar 2003 11:00:10 -0800 (PST) Received: from mail.speakeasy.net (mail17.speakeasy.net [216.254.0.217]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06B4F43FBD for ; Thu, 13 Mar 2003 11:00:07 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 22741 invoked from network); 13 Mar 2003 19:00:12 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail17.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 13 Mar 2003 19:00:12 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.8/8.12.8) with ESMTP id h2DJ04Ov003342; Thu, 13 Mar 2003 14:00:04 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200303131846.h2DIkaAU076722@repoman.freebsd.org> Date: Thu, 13 Mar 2003 14:00:22 -0500 (EST) From: John Baldwin To: John Baldwin Subject: RE: cvs commit: src/usr.bin/kdump kdump.c Cc: cvs-all@FreeBSD.org, cvs-src@FreeBSD.org, src-committers@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 <>< 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