Re: Determining disk activity per volume
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=kvTeDfNhAB3suXAwrkPsrO1yTK6p9hVn/2KidFgYL5ZkVhNpQeFcstt07gXR2YCK36RjvbQi4zy1Z8zkrhLN60hFwGFgxnC6qQdrw+wF2XHxuvA3rDoYqVyXJx6bwWQkY7ezPqdQKt8bhySDignb4rTeoCXrqiECBgM2yWhWD5k= thanks, Thulli. On 06-Oct-06, at 10:02 AM, Rick Mann wrote: I have these requirements: a) Do not destabilize the OS b) Low system overhead c) Reasonably rapid update (> 10 fps) I'd appreciate any suggestions. Thanks! -- Rick _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a...
determining when read or write functions are called. However, this polling approach doesn't strike me as very elegant. Option 1. If you are interested only in read and write system calls and don't want to do polling, take a look at this.
http://developer.apple.com/technotes/tn2005/tn2127.html. You need to write a kauth hook and user land client process. If the kauth hook kext could provide a device interface, then the user land client can block on a "read(/dev/yourKauthDevice)" and process what you read with no polling. Option 2. If you don't want to write a kext and still achieve results with NO polling, then take a look at this http://developer.apple.com/documentation/Performance/Conceptual/ FileSystem/Articles/TrackingChanges.html 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'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. 8 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?). _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/thullishah% 40gmail.com This email sent to thullishah@gmail.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Thulli