събота, май 14, 2016

Cisco router kill process / CPU usage


#sh processes cpu sorted
CPU utilization for five seconds: 23%/18%; one minute: 32%; five minutes: 24%
 PID Runtime(ms)     Invoked      uSecs   5Sec   1Min   5Min TTY Process
   6      194104       15849      12247  0.71%  0.13%  0.11%   0 Check heaps
 462       84320    16610343          5  0.63%  0.73%  0.72%   0 IP SLAs XOS Even
 133      284112     1036875        274  0.55%  0.59%  0.59%   0 IP Input
  14      114864       72937       1574  0.47%  0.08%  0.06%   0 Environmental mo
 140       33536     8685941          3  0.31%  0.26%  0.24%   0 Ethernet Msec Ti
  32      206432     1042208        198  0.31%  0.28%  0.26%   0 ARP Input
   3      173276      373836        463  0.23%  0.20%  0.21%   0 Skinny Msg Serve


This is an example of the header of the show processes cpu command:
 CPU utilization for five seconds: X%/Y%; one minute: Z%; five minutes: W%
  PID  Runtime(ms)  Invoked  uSecs    5Sec   1Min   5Min TTY Process
This table describes the fields in the header:
Field
Description
X
Average total utilization during last five seconds (interrupts + processes)
Y
Average utilization due to interrupts, during last five seconds1
Z
Average total utilization during last minute2
W
Average total utilization during last five minutes2
PID
Process ID
Runtime
CPU time the process has used (in milliseconds)
Invoked
Number of times a process has been called
uSecs
Microseconds of CPU time for each invocation
5Sec
CPU utilization by task in the last five seconds
1Min
CPU utilization by task in the last minute2
5Min
CPU utilization by task in the last five minutes2
TTY
Terminal that controls the process
Process
Name of process


To kill a process
#clear sockets 6

Sometimes this not work as expected; sometime you need to stop "main process" for example: no router ospf and sometimes you just need to reboot a router