cli icon indicating copy to clipboard operation
cli copied to clipboard

Add a "totals" line to the output of `docker stats`

Open NFeruch opened this issue 1 year ago • 2 comments

Description

docker stats is a cool and useful command, but it would be even more useful if there were a "totals" line at the bottom, that simply acted as a sum for each column.

I would like to see things like "total memory usage" across all my running container, or "total CPU utilization"

NFeruch avatar Feb 18 '24 20:02 NFeruch

Thanks for requesting. I'm not sure if this would work though, due to how stats are calculated / collected. While it would be possible to sum the stats, those totals won't reflect reality, as they are not all sampled at the same moment; also see;

  • https://github.com/moby/moby/issues/39192

thaJeztah avatar Feb 19 '24 14:02 thaJeztah