API's for monitoring disk activity
Alan Bateman
Alan.Bateman at Sun.COM
Sun Sep 6 12:17:38 PDT 2009
Avinash Lakshman wrote:
> Are there APIs to monitor disk related activity? An API based
> mechanism to get information provided by iostat. Any plans to add them
> going forward? Are there ways to obtain them today perhaps through
> some other library?
There isn't anything in the management interface to the operating system
(in java.lang.management) or in the platform extensions
(com.sun.management). I'm not aware of any plans either but
serviceability-dev would be the place to bring it up. For java.nio.file,
it won't be too hard to expose the stats as FileStore attributes.
Another option is to just simple open an InputStream to /proc/diskstats
or /sys/blocks (where iostat reads the statistics for its output).
-Alan.
More information about the serviceability-dev
mailing list