diff options
Diffstat (limited to '')
-rw-r--r-- | notes/faq.org | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/notes/faq.org b/notes/faq.org index 73d43c0..51b6845 100644 --- a/notes/faq.org +++ b/notes/faq.org @@ -10,3 +10,19 @@ console.sh <host> #+END_SRC More on the [[https://confluence.twitter.biz/display/DCE/IPMI%2BRemote%2BConsole%2Bconnectivity][wiki]]. +* Linux :linux: +** Namespaces +*** List of containers on Mesos :@twitter:ops: +To get a list of containers on a host, you can run the following command: + +#+BEGIN_SRC sh +ip netns list | xargs -I {} cat /proc/{}/cgroup | grep freezer | cut -f 3 -d '/' +#+END_SRC +*** Running netstat in a container :@twitter:ops: +On shared mesos, the network is divided in namespaces. Running =netstat= will not work, you need to use =ip netns= to be able to run =netstat= in a container. For example: + +#+BEGIN_SRC sh +for c in $(ip netns); do echo $c && sudo ip netns exec $c netstat -ntp | grep 10.71.16.126; done +#+END_SRC + + |