to top or not to top
play

To TOP or NOT to TOP www.SAS.com To TOP or NOT to TOP Using the - PowerPoint PPT Presentation

To TOP or NOT to TOP www.SAS.com To TOP or NOT to TOP Using the TOP command in Linux By Len van den Berg SAS Grid Platform Administrator Monitoring Processes in Linux By User By CPU By Size By Command By Memory By


  1. To TOP or NOT to TOP www.SAS.com

  2. To TOP or NOT to TOP Using the TOP command in Linux By Len van den Berg SAS Grid Platform Administrator

  3. Monitoring Processes in Linux • By User • By CPU • By Size • By Command • By Memory • By Status

  4. The TOP command - Pro’s • Live output monitoring • Sorting capability • Highlighting running processes • Single out processes by User • Single out process by PID • Edit refresh rate • See processes by Command

  5. Starting TOP • Open your PUTTY session $>... • Type: top • Watch the magic happen…

  6. $>top

  7. What’s innit 4 me? – pt 1 • PID – Process ID • USER – Who’s dunnit? • PR – Priority value • NI – NICE value • VIRT – Virtual Memory used • RES – Physical Memory used • SHR – Shared Memory used • S – Status (S = Sleep, Z = Zombie, R = Running etc.)

  8. What’s innit 4 me? – pt 2 • % CPU – Percentage of CPU used • %MEM – Percentage of the RAM used • TIME+ - The Total Time of the activity of this PID • COMMAND – The COMMAND executing this PID

  9. $>top

  10. What’s innit 4 me? – pt 3

  11. Quitting Top Easy – hit “q” anytime: $> q

  12. Set the Refresh Rate Hit “d” or “s” anytime: The default is 3.0s $> d Or $> s

  13. Set the Refresh rate - $>s or $>d

  14. Sorting the output 1. Run TOP => $>top 2. Hit Shift-o (Uppercase O) => $>O

  15. Sorting – Select a Column

  16. Sorting – by CPU

  17. Reversing the output Hit Shift – r (Uppercase r) $>R This will reverse the sort output.

  18. Sorting – by CPU : Reversing - 

  19. Sorting – by CPU : Reversing - 

  20. See processing on ALL CPU’s Hit 1 $>1 This will display all CPU’s on the Node

  21. See all CPU’s

  22. Toggle with All CPU view... Hit 1again.... $>1 Switch to standard view.

  23. Hide all CPU’s

  24. Toggle with All CPU view... Hit 1again.... $>1 And when you get bored, Hit 1 again... And again... And again...

  25. OOPS!!!

  26. Highlight RUNNING processes... Hit b or z $>b Or $>z

  27. Running processes: (b)

  28. Running processes: (z) in Technicolor!!

  29. To view SAS (and related) processes $> top – c sas

  30. List SAS (and related) processes $> top – c sas

  31. To view the FULL command path While TOP is running: Hit c $> c Toggle on and off by hitting c...

  32. List SAS (and related) processes $> top – c sas

  33. To watch a single user Hit top – u naughtyboy $> top – u naughtyboy

  34. List PIDs by single user $> top – u username

  35. To watch a single Process Hit top – p Process ID $> top – p 48311

  36. List single PIDs $> top – p 48311

  37. To kill a Process While top is running – Hit k $>k Prompt : PID to Kill: Type a PID: PID to Kill: 48311 Prompt : Kill PID 48311 with signal [15]? Type: y or n : y

  38. Kill a single PIDs $> k Kill PID 23554 with signal [15]? y

  39. You can save your top! • Run top • Set your preferred view ( >top – c sas) • Decide all CPUs or not (Hit 1) • Hit Uppercase w => $> W

  40. To see all processes except ROOT • Check your TOP version => top – version • Requires Top version 3.2.9 and higher. • Hit top – u!root • $>top – u!root

  41. To TOP or NOT to TOP Len van den Berg Questions and Answers?

Recommend


More recommend