Skip to content

Instantly share code, notes, and snippets.

View petehalverson's full-sized avatar

Pete Halverson petehalverson

View GitHub Profile
@petehalverson
petehalverson / docker_list_host_pids.sh
Last active October 29, 2019 17:40
List host IDs for running containers
#!/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