From 73acc5e28f08c03684ffd379475d7ac2d1098b06 Mon Sep 17 00:00:00 2001 From: Qiming Date: Fri, 3 Nov 2017 02:22:45 +0800 Subject: [PATCH] Fix some shell command examples (#6143) --- .../get-shell-running-container.md | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/tasks/debug-application-cluster/get-shell-running-container.md b/docs/tasks/debug-application-cluster/get-shell-running-container.md index 30ace321b8..cd564bcc67 100644 --- a/docs/tasks/debug-application-cluster/get-shell-running-container.md +++ b/docs/tasks/debug-application-cluster/get-shell-running-container.md @@ -47,16 +47,10 @@ Get a shell to the running Container: kubectl exec -it shell-demo -- /bin/bash ``` -In your shell, list the running processes: +In your shell, list the root directory: ```shell -root@shell-demo:/# ps aux -``` - -In your shell, list the nginx processes: - -```shell -root@shell-demo:/# ps aux | grep nginx +root@shell-demo:/# ls / ``` In your shell, experiment with other commands. Here are @@ -67,10 +61,13 @@ root@shell-demo:/# ls / root@shell-demo:/# cat /proc/mounts root@shell-demo:/# cat /proc/1/maps root@shell-demo:/# apt-get update -root@shell-demo:/# apt-get install tcpdump +root@shell-demo:/# apt-get install -y tcpdump root@shell-demo:/# tcpdump -root@shell-demo:/# apt-get install lsof +root@shell-demo:/# apt-get install -y lsof root@shell-demo:/# lsof +root@shell-demo:/# apt-get install -y procps +root@shell-demo:/# ps aux +root@shell-demo:/# ps aux | grep nginx ``` ## Writing the root page for nginx