From f022954edafee22a1389d46c62113e23284829d7 Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Wed, 22 Jun 2016 16:35:00 +0530 Subject: [PATCH] top: Add a better example (#921) --- pages/linux/top.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/linux/top.md b/pages/linux/top.md index a5fb51d20e..f1d553f7af 100644 --- a/pages/linux/top.md +++ b/pages/linux/top.md @@ -6,14 +6,18 @@ `top` -- Start top ignoring any idle or zombie processes: +- Do not show any idle or zombie processes: `top -i` -- Start top displaying only processes owned by given user: +- List processes owned by given user: `top -u {{user-name}}` +- List processes by PID. It takes a comma separated list. (Normally you wouldn't know PIDs off hand. This example picks the PIDs from the process name): + +`top -p $(pgrep -d ',' {{nginx}})` + - Get help about interactive commands: `?`