LP #928226: pt-diskstats illegal division by zero

Description

**Reported in Launchpad by Joe last update 19-03-2012 16:58:02

When I ran pt-diskstats for the first time I got the following output.

/pt-diskstats

#ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg io_s qtime stime
{1} sda 3.5 22.7 0.1 0% 0.0 4.0 1601.2 6.1 9.5 25% 0.2 0.1 24% 0 1604.6 0.0 0.1
{1} sda3 3.5 22.7 0.1 0% 0.0 4.0 1601.2 6.1 9.5 25% 0.2 0.1 24% 0 1604.6 0.0 0.1
{1} dm-0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 0.0 0.0 0.0
{1} dm-2 2.3 16.0 0.0 0% 0.0 3.5 2144.1 4.5 9.5 0% 0.3 0.1 24% 0 2146.4 0.0 0.1
Illegal division by zero at ./pt-diskstats line 2195, <$child_fh> line 84.

I ran it a couple more times and I did not get the same error.

./pt-diskstats --version
pt-diskstats 2.0.3

Environment

None

Smart Checklist

Activity

Show:

lpjirasync January 24, 2018 at 3:10 PM

**Comment from Launchpad by: Baron Schwartz on: 24-02-2012 13:46:57

This will probably be hard for Joe to reproduce. We should inspect the code manually and see if we can figure out how this could happen.

lpjirasync January 24, 2018 at 3:10 PM

**Comment from Launchpad by: Joe on: 24-02-2012 13:09:29

So far, I have not had it happen again.

lpjirasync January 24, 2018 at 3:10 PM

**Comment from Launchpad by: Daniel Nichter on: 21-02-2012 17:50:30

Thanks for reporting this Joe. Has this happened again? If yes, could you use --save-samples to save /proc/diskstats samples that cause this error?

Done

Details

Assignee

Reporter

Priority

Smart Checklist

Created January 24, 2018 at 3:10 PM
Updated January 24, 2018 at 3:10 PM
Resolved January 24, 2018 at 3:10 PM