Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-28091

Disk stats collection on OS X only captures I/O utilization averaged over the uptime of the machine

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.4.4, 3.5.5
    • Testing Infrastructure
    • None
    • Fully Compatible
    • ALL
    • v3.4
    • TIG 2017-03-27

    Description

      The "run diskstats" function invokes iostat with only the -d option, which causes iostat to only show the I/O utilization averaged over the uptime of the machine. The -w option must be used in order to get the I/O utilization averaged over the specified period. We'll likely want to change the script to run iostat -d -w 5 and add some logic to suppress the I/O utilization averaged over the uptime of the machine.

      # OSX: Simulate the iostat timestamp.
      elif iostat -d > /dev/null 2>&1; then
          while [ 1 ]
          do
              date +'%m/%d/%Y %I:%M:%S %p' >> mongo-diskstats
              iostat -d >> mongo-diskstats
              printf "\n" >> mongo-diskstats
              sleep 5
          done
      


      The first statistics that are printed are averaged over the system uptime. To get information about the current activity, a suitable wait time should be specified, so that the subsequent sets of printed statistics will be averaged over that time.

      https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man8/iostat.8.html

      Attachments

        Issue Links

          Activity

            People

              jonathan.abrahams Jonathan Abrahams
              max.hirschhorn@mongodb.com Max Hirschhorn
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: