Ad Widget

Collapse

Возможен ли расширеный мониторинг диско&

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bogdar
    Member
    • Jan 2009
    • 33

    #1

    Возможен ли расширеный мониторинг диско&

    Добрый день.
    Возможно ли получить информацию по следующим параметрам (взято из манула iostat):

    Percentage of CPU time during which I/O requests were issued to the device
    The average time (in milliseconds) for I/O requests issued to the device to be served.
    The average queue length of the requests that were issued to the device.

    SVN-версия агента в принципе тоже бы устроила, если б было.
  • dima_dm
    Senior Member
    • Dec 2009
    • 2697

    #2
    На RedHat это делается так
    В /etc/zabbix/zabbix_agentd.conf
    Добавляются строки
    UserParameter=softraid.status,egrep "\[.*_.*\]" /proc/mdstat|wc –l
    UserParameter=custom.vfs.dev.read.ops[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$4}'
    UserParameter=custom.vfs.dev.read.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$7}'
    UserParameter=custom.vfs.dev.write.ops[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$8}'
    UserParameter=custom.vfs.dev.write.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$11}'
    UserParameter=custom.vfs.dev.io.active[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$12}'
    UserParameter=custom.vfs.dev.io.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$13}'
    UserParameter=custom.vfs.dev.read.sectors[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$6}'
    UserParameter=custom.vfs.dev.write.sectors[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$10}'

    На других Linux аналогично.
    softraid.status это количество развалившихся Soft Raid партиций.

    Comment

    • csf
      Senior Member
      • Nov 2007
      • 154

      #3
      Originally posted by dima_dm
      На RedHat это делается так
      В /etc/zabbix/zabbix_agentd.conf
      Добавляются строки
      UserParameter=softraid.status,egrep "\[.*_.*\]" /proc/mdstat|wc –l
      UserParameter=custom.vfs.dev.read.ops[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$4}'
      UserParameter=custom.vfs.dev.read.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$7}'
      UserParameter=custom.vfs.dev.write.ops[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$8}'
      UserParameter=custom.vfs.dev.write.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$11}'
      UserParameter=custom.vfs.dev.io.active[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$12}'
      UserParameter=custom.vfs.dev.io.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$13}'
      UserParameter=custom.vfs.dev.read.sectors[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$6}'
      UserParameter=custom.vfs.dev.write.sectors[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$10}'

      На других Linux аналогично.
      softraid.status это количество развалившихся Soft Raid партиций.

      Добрый день !
      Сильно заинтересовал Ваш ответ. Пожалуйста прокомментируйте что отображает параметр:

      read.ms
      write.ms
      io.ms

      Comment

      • dima_dm
        Senior Member
        • Dec 2009
        • 2697

        #4
        Описание полей файла /proc/diskstats
        Из файла Documentation/iostats.txt в исходниках ядра
        Code:
            Field  1 -- # of reads completed
                This is the total number of reads completed successfully.
            Field  2 -- # of reads merged, field 6 -- # of writes merged
                Reads and writes which are adjacent to each other may be merged for
               efficiency.  Thus two 4K reads may become one 8K read before it is
                ultimately handed to the disk, and so it will be counted (and queued)
                as only one I/O.  This field lets you know how often this was done.
            Field  3 -- # of sectors read
                This is the total number of sectors read successfully.
            Field  4 -- # of milliseconds spent reading
                This is the total number of milliseconds spent by all reads (as
                measured from __make_request() to end_that_request_last()).
            Field  5 -- # of writes completed
                This is the total number of writes completed successfully.
            Field  7 -- # of sectors written
                This is the total number of sectors written successfully.
            Field  8 -- # of milliseconds spent writing
                This is the total number of milliseconds spent by all writes (as
                measured from __make_request() to end_that_request_last()).
            Field  9 -- # of I/Os currently in progress
                The only field that should go to zero. Incremented as requests are
                given to appropriate struct request_queue and decremented as they finish.
            Field 10 -- # of milliseconds spent doing I/Os
                This field is increases so long as field 9 is nonzero.
            Field 11 -- weighted # of milliseconds spent doing I/Os
                This field is incremented at each I/O start, I/O completion, I/O
                merge, or read of these stats by the number of I/Os in progress
                (field 9) times the number of milliseconds spent doing I/O since the
                last update of this field.  This can provide an easy measure of both
                I/O completion time and the backlog that may be accumulating.
        P.S. Field 1 они называют 4-e поле в файле, считая с начала строки для каждого раздела диска, Field 2 -5-е поле и т.д.
        Last edited by dima_dm; 17-09-2010, 17:42.

        Comment

        • NikLok
          Junior Member
          • Feb 2011
          • 10

          #5
          Контроль ребилдинга Soft Raid

          В mdadm.conf описан адрес и программа отсылки статистики от mdadm. В частности присылаются письма о начале перестройки массива, её проценте выполнения и окончании с обнаруженным количеством ошибок! Было бы интересно строить графики по количеству ошибок каждого массива! Делал ли это кто нибудь?
          Вот текст присылаемого письма: RebuildFinished /dev/md0 mismatches found: 128
          Я так понимаю опять все через awk делать?
          И можно ли для этого perl использовать?

          Comment

          Working...