Closest equivalent of dstat on mac

It seems that only iostat were available on mac. But I am looking for more comprehensive set of stats including cpu, memory, and network. What are the options here?


Solution 1:

Even though this is old, time travelers might find Dabz dstat fork/port useful. See:

  • https://lamada.eu/blog/2016/02/12/adapting-dstat-on-mac/
  • https://github.com/Dabz/dstat/tree/mac

dstat is a Python script. The Makefile file has to be adjusted slightly to install to macOS (e.g. the install -D... switch doesn't exist in the default macOS install bin) - there is nothing to compile though. Additionally it's recommended to install brew/python2 and a separate Python env to install additional required packages with pip.

A lot of stats don't work though because they rely on Linux paths (e.g. /proc).

Solution 2:

Dstat is a versatile replacement for vmstat, iostat and ifstat. Dstat overcomes some of the limitations and adds some extra features.

As you said, iostat is available on macs. But, additionally you can install ifstat using homebrew by typing the following:

brew install ifstat

To install homebrew -if you haven't it yet-, just use the following command:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"