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
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

www.SAS.com

To TOP or NOT to TOP

slide-2
SLIDE 2

To TOP or NOT to TOP

Using the TOP command in Linux By Len van den Berg SAS Grid Platform Administrator

slide-3
SLIDE 3

Monitoring Processes in Linux

  • By User
  • By CPU
  • By Size
  • By Command
  • By Memory
  • By Status
slide-4
SLIDE 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
slide-5
SLIDE 5

Starting TOP

  • Open your PUTTY session $>...
  • Type: top
  • Watch the magic happen…
slide-6
SLIDE 6

$>top

slide-7
SLIDE 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.)
slide-8
SLIDE 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
slide-9
SLIDE 9

$>top

slide-10
SLIDE 10

What’s innit 4 me? – pt 3

slide-11
SLIDE 11

Quitting Top

Easy – hit “q” anytime: $> q

slide-12
SLIDE 12

Set the Refresh Rate

Hit “d” or “s” anytime: The default is 3.0s $> d Or $> s

slide-13
SLIDE 13

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

slide-14
SLIDE 14

Sorting the output

  • 1. Run TOP => $>top
  • 2. Hit Shift-o (Uppercase O) => $>O
slide-15
SLIDE 15

Sorting – Select a Column

slide-16
SLIDE 16

Sorting – by CPU

slide-17
SLIDE 17

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

slide-18
SLIDE 18

Sorting – by CPU : Reversing - 

slide-19
SLIDE 19

Sorting – by CPU : Reversing - 

slide-20
SLIDE 20

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

slide-21
SLIDE 21

See all CPU’s

slide-22
SLIDE 22

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

slide-23
SLIDE 23

Hide all CPU’s

slide-24
SLIDE 24

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

slide-25
SLIDE 25

OOPS!!!

slide-26
SLIDE 26

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

slide-27
SLIDE 27

Running processes: (b)

slide-28
SLIDE 28

Running processes: (z) in Technicolor!!

slide-29
SLIDE 29

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

slide-30
SLIDE 30

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

slide-31
SLIDE 31

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

slide-32
SLIDE 32

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

slide-33
SLIDE 33

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

slide-34
SLIDE 34

List PIDs by single user $> top –u username

slide-35
SLIDE 35

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

slide-36
SLIDE 36

List single PIDs $> top –p 48311

slide-37
SLIDE 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

slide-38
SLIDE 38

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

slide-39
SLIDE 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
slide-40
SLIDE 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
slide-41
SLIDE 41

To TOP or NOT to TOP Len van den Berg

Questions and Answers?