Re: Showing custom statistics to userspace (/proc interface?)
Re: Showing custom statistics to userspace (/proc interface?)
- Subject: Re: Showing custom statistics to userspace (/proc interface?)
- From: Terry Lambert <email@hidden>
- Date: Wed, 24 Jun 2009 10:38:32 -0700
On Jun 24, 2009, at 9:45 AM, Abhijit Bhopatkar <email@hidden
> wrote:
In the filesystem that i am writing, i have various statistics being
gathered
over time in a central data structure.
On linux we expose this structure to userspace through a /proc entry.
Is there an equivalent of /proc interface in xnu that can be use to
expose
arbitrary statistics?
No.
Particularly for arbitrary statistics private to your FS that are
privately formatted and meaningless to everyone else, you will need to
expose them via an fsctl() and query for them. Or you can expose them
via an fcntl() after obtaining a file handle for an object known to be
on your file system. Or you can expose them in your own namespace; if
exposing them in the FS namespace in a procfs is in theory somehow a
good idea, exposing the same information in the FS namespace for
AbhijitFS is also in theory a good idea.
Personally, I'd go with the fsctl().
-- Terry
_______________________________________________
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