Skip to content

🐳 Plot graph and more from docker stats, jmeter

License

Notifications You must be signed in to change notification settings

buzdu/docker-stats-graph

 
 

Repository files navigation

Docker Stats Graph

To plot docker stats into graph from multiple dockers.

Get Started

Run the scrips/generate_data.sh, this will produce a data.csv that will be used to create the graphs.

Then to use or plot the data:

from src.dockerstats import *
ds = DockerStats("tests/resources/data.csv")
ds.plot_category_all()

See https://sylhare.github.io/docker-stats-graph/ for a worked example.

Docker Stats Info

Let's dig into each of those columns:

  • The CONTAINER column lists the container IDs.
  • The CPU % column reports the host capacity CPU utilization.
    • For example, if you have two containers, each allocated the same CPU shares by Docker, and each using max CPU, the docker stats command for each container would report 50% CPU utilization. Though from the container's perspective, their CPU resources would be fully utilized.
  • The MEM USAGE / LIMIT and MEM % columns display the amount of memory used by the container, along with the container memory limit, and the corresponding container utilization percentage.
    • If there is no explicit memory limit set for the container, the memory usage limit will be the memory limit of the host machine.Note that like the CPU % column, these columns report on host utilization.
  • The NET I/O column displays the total bytes received and transmitted over the network by the corresponding container.
  • The BLOCK I/O section displays the total bytes written and read to the container file system.
  • The PIDS column displays the number of kernel process IDs running inside the corresponding container.

Testing

To find out more info about the testing configuration, check out the tox.ini file. Use the dev-requirements.txt for libraries only used for tests or dev.

# Run the test suite
tox
# Run the linter:
tox -e lint
# Run the coverage on the src module
tox -e coverage

Misc Notes

  • If you have issue with tox and ModuleNotFoundError, try set recreate to True in tox.ini.

Sources

Some of the source I use for the docker stats command.

About

🐳 Plot graph and more from docker stats, jmeter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 97.6%
  • Python 2.3%
  • Shell 0.1%