[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: Detecting changes when mapping /dev/devstat
From:       Conrad Meyer <cem () freebsd ! org>
Date:       2016-12-31 18:32:23
Message-ID: CAG6CVpWrmx9Y4DMmqFnQw3FQUFvZSzPmGe3ewNom+tp+BDFxCw () mail ! gmail ! com
[Download RAW message or body]

Shea,

You might try looking at how devstat(8) uses the interface.
http://devstat.googlecode.com/ ("pkg install devstat").

Best,
Conrad

On Fri, Dec 30, 2016 at 6:58 PM, Shea Levy <shea@shealevy.com> wrote:
> Hi all,
>
> What is the appropriate way to detect changes when accessing devstat
> info via a mapping of /dev/devstat? I'm interested both in changes to
> the device list as a whole and new statistics on a given device.
>
> For new stats on a given device, it seems the only way to detect a new
> stat is to check the sequence number for that device. Is that right?
>
> For changes in the device list, it's a bit less clear. My hope was that
> I could map space for one more struct devstat than the current numdevs
> and just check to see if some field or other is nonzero, but in my
> glances through subr_devstat.c I'm not sure if there are any guarantees
> about those fields for structures past the current list, especially if a
> device was added and removed. Is there anything doable here?
>
> Thanks,
> Shea
>
> P.S. I wasn't quite sure which list was appropriate for this question,
> please feel free to point me to another!
_______________________________________________
freebsd-hackers@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic