iostat -dhI
gives:
ad4
KB/t xfrs MB
20.91 663400 13545.41
That might be the most accurate way of doing it. Only thing to watch out for is wrap around... the counter is probably a 64 bit unsigned integer which would wrap back to zero after about 18 exabytes.blumstng said:So, I should be able to save that number and on the next interval, determine a difference. Unless there's a better way?
Though I don't expect this to be a problem, I have added a check to make sure of wrap around. Better to account for as many possibilities as you can.Only thing to watch out for is wrap around... the counter is probably a 64 bit unsigned integer which would wrap back to zero after about 18 exabytes.