Re: Determining disk activity per volume
Re: Determining disk activity per volume
- Subject: Re: Determining disk activity per volume
- From: "Arvind Dalvi" <email@hidden>
- Date: Fri, 6 Oct 2006 11:14:28 +0100
Rick,
being amateur to this world, i am not sure if the below would solve your purpose.....
fs_usage was updated to allow reporting of physical disk I/O. There are 3 main categories of disk I/O that can be reported using fs_usage: Data, MetaData and Paging operations each of which is either synchronous (implied) or asynchronous (called out). These physical operations will not show up when tracing a single process (since they can't be attributed to any particular process). Using the -e option works around this. (r. 2891010).
a.d.
On 10/6/06, Michael Smith <email@hidden> wrote:
Look at how iostat is implemented; this is the preferred interface.
http://www.opensource.apple.com/darwinsource/10.4.7.ppc/
system_cmds-336.1.5/iostat.tproj/
You don't want to know "when"; if there's something happening that's
far more often than you want to be notified. 10fps is a bit
aggressive for something that's really not very interesting most of
the time.
= Mike
On Oct 5, 2006, at 7:02 PM, Rick Mann wrote:
> Hi. I'd like to implement a disk activity indicator that lives in
> the menu bar. I'm looking for suggestions on how to determine when
> a particular a volume, device, or the filesystem (in decreasing
> order of desirability) is reading from or writing to a device.
>
> I have these requirements:
>
> a) Do not destabilize the OS
> b) Low system overhead
> c) Reasonably rapid update (> 10 fps)
>
> I've been looking at the fs_usage sources and sysctl() using
> KERN_KDREADTR, and determining when read or write functions are
> called. However, this polling approach doesn't strike me as very
> elegant. I suppose I could make the call 10 times each second, and
> then process the results, but it seems very unwieldy to do this. I
> also don't know much about KERN_KDREADTR, because I can't seem to
> find any documentation about it.
>
> I'm trying to find the sources for sysctl(), but I don't know where
> to look (is there a way to look up the location of commands and
> functions?).
>
> I'd appreciate any suggestions. Thanks!
>
> --
> Rick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden