Telegraf , diskio service time

Hi,

on linux, usually I used the command iostat and sar -d.
on sar -d I use the value service time.

I don’t find how caculate servicetime from diskio.
any ideas ?

Is this the field you are using from sar?:
man sar:

              svctm  
                     The  average  service  time  (in  milliseconds)  for  I/O
                     requests that were issued to the device. Warning! Do  not
                     trust  this field any more. This field will be removed in
                     a future sysstat version.

Perhaps you can replace this with iotime(field 10 below) and iops_in_progress(field 9).

/usr/src/linux/Documentation/iostats.txt:

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 increases so long as field 9 is nonzero.