Last active
October 29, 2019 17:40
-
-
Save petehalverson/27fb0a094e3abc8640ef2d8c6fb0642e to your computer and use it in GitHub Desktop.
List host IDs for running containers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# List host IDs for running containers | |
for i in $(docker ps -q); do docker inspect --format '{{ .State.Pid }}' $i; done | |
# Swap usage | |
# awk '/VmSwap/{print $2 " " $3}' /proc/<PID>/status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment