Adding new option to ktrace

Rajesh S. Ghanekar rajesh_ghanekar at persistent.co.in
Mon Sep 5 11:46:28 PDT 2005


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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-scsi
> To unsubscribe, send any mail to "freebsd-scsi-unsubscribe at 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



More information about the freebsd-hackers mailing list