From owner-freebsd-scsi@FreeBSD.ORG Mon Sep 5 18:46:27 2005 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D71C816A420; Mon, 5 Sep 2005 18:46:27 +0000 (GMT) (envelope-from rajesh_ghanekar@persistent.co.in) Received: from smtp.persistent.co.in (smtp.persistent.co.in [202.54.11.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52CBB43D72; Mon, 5 Sep 2005 18:46:25 +0000 (GMT) (envelope-from rajesh_ghanekar@persistent.co.in) Received: from [10.33.50.40] ([10.33.50.40]) (authenticated bits=0) by smtp.persistent.co.in (8.12.9/8.12.9) with ESMTP id j85IrCOM001735; Tue, 6 Sep 2005 00:23:12 +0530 Message-ID: <431C92F2.9090104@persistent.co.in> Date: Tue, 06 Sep 2005 00:18:18 +0530 From: "Rajesh S. Ghanekar" User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Scott Long References: <17db6d3a0509051000622868bc@mail.gmail.com> <431C8D5B.7080309@samsco.org> In-Reply-To: <431C8D5B.7080309@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAQAAAAQ= X-Whitelist: TRUE Cc: freebsd-hackers@freebsd.org, freebsd-scsi@freebsd.org Subject: Re: Adding new option to ktrace X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2005 18:46:28 -0000 Scott Long wrote: > Nikhil Dharashivkar wrote: > >> Hi, >> i want to hack the ktrace system call. Basically, I want to monitor >> scsi disk IO through dastrategy() routine. >> It seems that kern_ktrace.c implements different functions for >> ktrace options like -tc / -ti ... etc (see man page). So, is it >> possible to add new option for disk IO with new structure object >> containing disk io information which will be pass to >> ktr_submittrequest thr' ktr_request structure. >> Will data will be written correctly in ktrace.out and will >> kdump analyze that ? >> >> >> > > What are you trying to monitor? Would the existing devstat interface > work? May be he requires how many bytes transferred (read/write) while a process is executing. I guess devstat doesn't do it from process context, it gives total IO read/writes from a device, if registred via devstat. Please correct me if I am wrong. - Rajesh > > Scott > _______________________________________________ > freebsd-scsi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi > To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan