Переглянути джерело

top: Add a better example (#921)

Agniva De Sarker 8 роки тому
батько
коміт
f022954eda
1 змінених файлів з 6 додано та 2 видалено
  1. 6 2
      pages/linux/top.md

+ 6 - 2
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:
 
 `?`