title: Is there any way to display container names in docker stats?
body: <p>I want to display state of all running container, so I could achieve it like the following:</p>
  
  <blockquote>
    <p>docker stats $(docker ps -q)</p>
  </blockquote>
  
  <pre><code>CONTAINER           CPU %               MEM USAGE/LIMIT       MEM %               NET I/O
  04cdc87ba3cf        0.03%               468.8 MiB/3.784 GiB   12.10%              6.827 KiB/10.2 KiB
  7d30fcbd8b36        0.09%               88.09 MiB/3.784 GiB   2.27%               28.23 KiB/289.2 KiB
  a09ef63b2c59        97.94%              271.5 MiB/512 MiB     53.03%              3.644 MiB/190.2 KiB
  a29681c1980f        0.10%               9.066 MiB/3.784 GiB   0.23%               2.538 KiB/648 B
  </code></pre>
  
  <p>but the column container is only showing the container id.  I need the container name though.  For example:</p>
  
  <blockquote>
    <p>docker stats lrlcms_web_1</p>
  </blockquote>
  
  <pre><code>CONTAINER           CPU %               MEM USAGE/LIMIT      MEM %               NET I/O
  lrlcms_web_1        0.09%               88.1 MiB/3.784 GiB   2.27%               28.85 KiB/289.2 KiB
  </code></pre>
  
  <p>So how do I get all the container names?  Just for:</p>
  
  <blockquote>
    <p>docker stats `all container's name'</p>
  </blockquote>
  
  <p>For example:</p>
  
  <blockquote>
    <p>docker stats  lrlcms_db_1 lrlcms_redis_1</p>
  </blockquote>
  
  <pre><code>CONTAINER           CPU %               MEM USAGE/LIMIT       MEM %               NET I/O
  lrlcms_db_1         0.05%               450.3 MiB/3.784 GiB   11.62%              8.737 KiB/10.2 KiB
  lrlcms_redis_1      0.08%               7.383 MiB/3.784 GiB   0.19%               4.448 KiB/648 B
  </code></pre>