Find the answer to your Linux question:
Results 1 to 9 of 9
Any one here know how to extract (or if system keep) the software RAID IO statistics information?? (some thing similar as what /proc/partitions provide for sector read and written). Googled ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2004
    Location
    Toronto, Canada
    Posts
    14

    RAID Statistics


    Any one here know how to extract (or if system keep) the software RAID IO statistics information?? (some thing similar as what /proc/partitions provide for sector read and written).

    Googled and seems only up to kernel 2.6 do they keep tract of IO statistics, just want to confirm my finding.

    is there anyway to get this information elsewhere? seems have to manually compute the underlying device IO statistics

  2. #2
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    I've not played with RAID yet, but I would just browse through the /proc/ directory and look for anything that might contain info about your array.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  3. #3
    Just Joined!
    Join Date
    Jan 2004
    Location
    Toronto, Canada
    Posts
    14
    thans buddy...there is very limited information that i can get from /proc, except the mdstat. as for array, lucky i found function of ioctl (, GET_ARRAY_INFO,) to get the RAID array information.

    but for statistics, no luck, i have to dig through the kernel function call...sounds to me they dont keep any statistics until 2.6, but not so sure about it if i can work out a solution.

    2.6 kernel at:
    http://www.linuxhq.com/kernel/v2.6/3-rc1/drivers/md/

    it is wonderful to use Linux, but pain to develop anything on it....seems google still need improve.

  4. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    On 2.6 you get disk I/O stats from /proc/diskstats. On 2.4 I believe the best place to look is /proc/partitions, but you have to compile your kernel to include disk statistics.

  5. #5
    Just Joined!
    Join Date
    Jan 2004
    Location
    Toronto, Canada
    Posts
    14
    thanks...haa..each time i see your name, i knew there is a solution. thanks.

    the test platform for us is RedHat Enterprise Server 3 (2.4.19), and /proc/partitions will never update LVM and RAID statistics information, always appear to be all zero, while it have all the statictis for physical disk and partitions.

    Is there other way that for me to detect the actual amount of IO traffic on those LVM and software RAID device when user use it as a raw device?


    Quote Originally Posted by Dolda2000
    On 2.6 you get disk I/O stats from /proc/diskstats. On 2.4 I believe the best place to look is /proc/partitions, but you have to compile your kernel to include disk statistics.

  6. #6
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Oh, I see your dilemma. I didn't read your first post quite as thoroughly as I should have. Now that you mention it, it does indeed seem that stats aren't collected for at least LVM (I haven't tried for software RAID), either on 2.4 or 2.6.

    If you're writing a program that uses this, the easiest solution may be to simply add support for it to the kernel.

  7. #7
    Just Joined!
    Join Date
    Jan 2004
    Location
    Toronto, Canada
    Posts
    14
    thanks Dolda2000... i may leave the feature for now as we are not allowed to change the kernel of our client machine..

  8. #8
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    I see. In that case, the best solution may be a user-space implementation that checks what physical devices the array uses, and sum up the statistics on those.

  9. #9
    Just Joined!
    Join Date
    Jan 2004
    Location
    Toronto, Canada
    Posts
    14
    but thing may get worse when raid and lvm stack on each other, which kernel keep none of the statistics.
    i can even setup weird setup such as lvm sit on raid, then raid sit on Veritas, i have hard time to collect statistics.. where lvm's statistics come as the format of visit frequency..

    haaa...i know it is something hard to crack, told them to wait until we implement on 2.6 kernel. thanks for all your advice, it is really valuable.


    Quote Originally Posted by Dolda2000
    I see. In that case, the best solution may be a user-space implementation that checks what physical devices the array uses, and sum up the statistics on those.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •