Docker has a great tool for watching current CPU, memory and I/O in our containers: docker stats. The output is streamed and we can get a quick insight of the current situation, though it’s hard to see if any memory is lost over time. For that we need to store the output over a longer period of time for later analysing.

TL;DR;

Pipe the output of docker stats with the flag — no-stream into a csv-file. Load the log files with pandas.read_csv and format the data to standardise the units. View an example on this github repo.

Logging Docker Stats

Let’s start with creating…


I recently got a new job and went from the fantastic world of TypeScript into the unknowns of typed Python.

I found out that typed Python is not as mature as TypeScript and decided to write down a small cheat sheet with some mapping between the two. I hope this summary will aid someone alike me, who’s coming from TypeScript and wants to dive into typed Python.

Setup

The most important part of getting sped up with typed Python is to have a proper development environment set up. It can be tempting to just use the globally installed Python version and…

Mattias Naarttijärvi

Energy Engineer by trade, but Software Developer by heart. Doing my best to save the planet; currently by optimising heat- & energy production at Sigholm Tech.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store