1. 15

  2. 2

    Really too bad that IO is included on Linux. Any way to get a similar metric without IO?

    1. 5

      dstat instantly replaced htop as my “first glance at a troubled system” tool as soon as I saw it. It has nice breakdowns on different types of cpu + disk + net + paging + context switching etc…

      1. 1

        I’ve always deferred to iostat and/or iotop to verify if high load is due to blocking on IO. Iostat should be there on most Linux systems, especially servers.

        I see another commenter mentioned dstat, I’ll have to give that a try.

      2. 1

        IIRC, the CPU load average one sees in something like top is different in Linux than other unices such as FreeBSD. I cannot find the exact link (Brendan Gregg talk?) describing the difference at the moment, though.

        1. 6

          It also includes processes waiting for disk, which makes this approach a bit risky on Linux. I’ve actually got a blog post written on this that should be going out this week. Solaris is also a little different in that load average is divided by the number of CPUs.

          The short version is that if you want to measure CPU usage, measure CPU usage. It’s also best to look for a differential to ignore base load such as cron, background threads etc.

          That said, the other way round (going from latency to cpu) is a very handy trick for getting a quick upper bound estimate on capacity.

          1. 2

            also covered on undeadly years ago