Skip to content

Instantly share code, notes, and snippets.

@SystemZ
Created June 18, 2016 19:26
Show Gist options
  • Save SystemZ/114998a2c8d0da3b22c4a8a050613a57 to your computer and use it in GitHub Desktop.
Save SystemZ/114998a2c8d0da3b22c4a8a050613a57 to your computer and use it in GitHub Desktop.
List docker container processes
#!/bin/bash
#https://groups.google.com/forum/#!topic/docker-user/g9yDdQsoDFE
htop -p $(sudo docker ps -q | xargs sudo docker inspect --format {{.State.Pid}} | awk -vORS=, '{ print $1 }' | sed 's/,$/\n/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment