Dstat: a tool to monitor the performance and resources of our team

dstat

dstat is a versatile resource statistics tool. This tool combines the capabilities of iostat, vmstat, netstat and ifstat. Dstat allows us to monitor system resources in real time. When you need to collect that information in real time, dstat will adjust to your needs.

dstat allows us to see all system resources in real time, it gives us detailed information of the whole system in columns, for example, we can see the disk space in combination with the interrupts of the IDE controller.

Dstat features

  • Written in python
  • Combine together: Vmstat, IOSTAT, ifstat, NETSTAT.
  • Shows accurate statistics in real time.
  • Modular design.
  • Easily expand, add your own counters.
  • It allows to export CSV output, which can be imported into Gnumeric and Excel to make graphics.
  • It includes many external plug-ins to show how easy it is to add counters.
  • You can summarize the network device / group blocks and give the total number.
  • Can show interrupts by device
  • Very precise time frames, no changeover times when the system is stressed
  • You can specify different units with different colors.
  • It can show intermediate results when procrastination is> 1.

Installing Dstat

dstat is inside the Ubuntu repositories By default, you can easily install it by running the following command:

sudo apt-get install dstat

How to use Dstat?

Installation completed we proceed to start the application with the following command:

dstat

It shows us an output with the system information. By doing this it will take the following options by default.

The -cdngy options are as follows:

  1. c: cpu statistics
  2. d: disk statistics
  3. n: network statistics
  4. g: page statistics
  5. y: system statistics

So that we can customize the information output a bit, for example, if we have more than one disk in our computer we can indicate that it shows us information from another disk for example

dstat -cdl -D sdb

Starting Line:

  ----total-cpu-usage---- --dsk/sdb- ---load-avg--- usr sys idl wai hiq siq| read writ| 1m 5m 15m 9 10 78 2 0 0| 84B …

Now on the other hand if we want to display the information about the CPU, higher latency and higher memory, run the following command:

dstat --top-cpu-adv --top-latency --top-mem

Now, on the other hand, we can store the result of the dstat command in a .csv file using the –output option:

For example, if you want to display the time, CPU, memory, system load statistics with a delay of two seconds between 10 updates, and store the output in the report.csv file, run the following command:

dstat --output report.csv

As well can use various internal plugins and external with dstat.

To list all available plugins, run the following command:

dstat --list

There are many useful options available with dstat, you can list all available options with below command:

dstat -h

Starting Line:

  Usage: dstat [-afv] [options..] [delay [count]] Versatile tool for generating system resource statistics

Opciones de Dstat:

-c, --cpu enable cpu stats

-C 0,3, el total incluye cpu0, cpu3 y total

-d, --disk habilita las estadísticas del disco

-D total, hda incluye hda y total

-g, --page enable page stats

-i, --int enable interrupt stats

-I 5, eth2 incluye int5 y la interrupción utilizada por eth2

-l, - load enable load stats

-m, --mem enable memory stats

-n, --net habilitar estadísticas de red

-N eth1, total incluye eth1 y total

-p, --proc enable process stats

-r, --io enable io stats (solicitudes de E / S completadas)

-s, --swap enable swap stats

-S swap1, total incluye swap1 y total

-t, - tiempo de habilitar salida de fecha / hora

-T, - contador de tiempo de habilitación de tiempo (segundos desde época)

-y, --sys enable system stats

--aio enable aio stats

--fs, --filesystem enable fs stats

--ipc enable ipc stats

--lock enable lock stats

--raw enable raw stats

--socket enable socket stats

--tcp enable tcp stats

--udp enable udp stats

--Unix habilita las estadísticas de Unix

--vm enable vm stats

Dstat has many options with which we can obtain accurate information about our equipment and the system in real time, we only need to learn how to use it in our favor.


Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.