Dstat

If you have a Linux server running at your office or at a data center for which you are responsible, you want to maintain an uptime of as close to a hundred percent. In such a case you want to make sure you keep an eye on how the system is running. To be precise you want to monitor all the system resources that contribute to the system running fine which then results in a high uptime. Memory, CPU, disk usage… are some of the things you want to observe. We would usually use a combination of the tools that come with a Linux or UNIX installation, such as “free”, “top”, “vmstat”… I’ll introduce you to a tool that gives you just about all the info that the other tools combined give you, all under one roof – Dstat. The developer of this command line tool, Dag Wieers, calls it “a versatile replacement for vmstat, iostat, netstat and ifstat”. He adds that “Dstat overcomes some of their limitations and adds some extra features…” To me Dstat is the mother of all command line system monitoring tools. It’s simple to install, easy to use, can be tweaked with ease, and it generates reports that you can plot as a graph to impress your boss.
Installing Dstat

Start by downloading the Dstat installer. (#yum install dstat – in the command line works also if you have the dag repositories enabled) Point your web browser to the Dstat project’s homepage – http://dag.wieers.com/home-made/dstat/. Scroll down to the section of the page where the downloads are listed. Pick the flavor of Linux on which you want to install the application and click on the download link. Now download the latest version of Dstat for the version of the Linux distribution you are running. I’ll show you how to do it for a Red Hat Enterprise Linux version 4 machine:

(latest version is dstat-0.7.2-12.el7.noarch.rpm available from http://dag.wieers.com/home-made/dstat/ and https://github.com/dagwieers/dstat)

(more…)

Continue ReadingDstat