Sh ip processes command

show processes Command
router#show processes
CPU utilization for five seconds: 0%/0%; one minute: 0%; five minutes: 0%
PID Q Ty PC Runtime(ms) Invoked uSecs Stacks TTY Process
1 C sp 602F3AF0 0 1627 0 2600/3000 0 Load Meter
2 L we 60C5BE00 4 136 29 5572/6000 0 CEF Scanner
3 L st 602D90F8 1676 837 2002 5740/6000 0 Check heaps
4 C we 602D08F8 0 1 0 5568/6000 0 Chunk Manager
5 C we 602DF0E8 0 1 0 5592/6000 0 Pool Manager
6 M st 60251E38 0 2 0 5560/6000 0 Timers
7 M we 600D4940 0 2 0 5568/6000 0 Serial Backgroun
8 M we 6034B718 0 1 0 2584/3000 0 OIR Handler
9 M we 603FA3C8 0 1 0 5612/6000 0 IPC Zone Manager
10 M we 603FA1A0 0 8124 0 5488/6000 0 IPC Periodic Tim
11 M we 603FA220 0 9 0 4884/6000 0 IPC Seat Manager
12 L we 60406818 124 2003 61 5300/6000 0 ARP Input
13 M we 60581638 0 1 0 5760/6000 0 HC Counter Timer
14 M we 605E3D00 0 2 0 5564/6000 0 DDR Timers
15 M we 605FC6B8 0 2 011568/12000 0 Dialer event
注釋
關鍵字 解釋
CPU utilization for five seconds CPU在最後5秒鐘的使用率
one minute CPU在最後1分鐘的使用率
five minutes CPU在最後5分鐘的使用率
PID程

Q
程序號碼優先順序和程序號碼的狀態:
K(沒有優先順序,程序號碼被殺了),
D(沒有優先順序,程序號碼癱了),
X(沒有優先順序, 程序號碼中斷了),
C(緊急優先順序),
H(高優先順序),
M(中優先順序),
L(低優先順序)
Ty Ty當前的處理狀態:

*(cpu正在處理),
E (程序號碼正在等待一個重要動作),
S (程序號碼休眠),
rd (程序號碼已經在運行),
we (程序號碼等待一個重要動作),
sa (程序號碼等待一個指定的絕對時間的產生),
si (程序號碼等待一個指定的時間間隔),
sp (程序號碼等待一個指定的週期性的時間間隔),
st (程序號碼等待一個時間終止),
hg (程序號碼縣置),
xx (程序號碼死亡.).
PC 當
程序號碼持續放棄CPU時程式計數註冊器的內容. 這個地方寫的是記憶體的位址用以代表程序號碼開始執行寫一次佔用的CP值0代表正在運行
Runtime (ms) 使用CPU累計時間 (毫秒)
Invoked
程序號碼的建立起程序號碼運行在CPU的總時間
uSecs 每次
程序號碼使用平均cpu時間 (毫秒級)
Stacks 堆疊空間使用狀況. 斜線右邊的數字(/)表示總的堆疊空間。 左邊的數字代表空間利用率的最低水準線.
TTY 控制台設備相關的
程序號碼.0代表程序號碼不是被控制台和通訊器相關的主系統主控台
Process
程序號碼的名字.程序號碼的名字不需要是唯一的 (一個程序號碼的幾分拷貝可以同時是啟動狀態的). 但是程序號碼id號必須是唯一的。

 

 

如何監視nat流量+如何看CPU使用率+看DHCP流量+暫停EIGRP LEARNING NEIGHBOR + ROUTER自動重開機
一.監視NAT網路流量 :
show ip nat translation
二 . 監視cpu使用率
show process cpu
三 . 監視DHCP流量
show ip accounting
! (前題must 貼accounting 的規則在最多內部流量的端口)
四 . 停止router運行 eigrp 禁止該界面收送Hello封包 , 阻止形成鄰居關係 ,界面將不會再傳送EIGRP資訊

router eigrp AS編號
passive-interface serial 端口編號

開啟router運行 eigrp 啟動該界面收送Hello封包 ,形成緊居關係 ,界面將繼續再傳送路徑資訊
router eigrp AS編號
no passive-interface serial 端口編號
五 . router定時重開
router> enable
router# reload at hh:mm dd(1~31) MM(1~12)

CPU utilization for five seconds: 63%/50%; one minute: 58%; five minutes: 58%

PID Runtime(ms) Invoked uSecs    5Sec   1Min   5Min TTY Process

 1        4976     54773     90    0.00% 0.00% 0.00%  0 Load Meter

 2       3788      670   5653    1.71% 0.22% 0.15% 130 Virtual Exec

24        3592       632   5683    0.00% 0.04% 0.09% 131 Virtual Exec

25   101868424 30627416   3326    8.76% 9.04% 10.41%   0 IP Input

 

CPU utilization for five seconds: 63%/50%

50%是指由於Interrupt switching 導致的CPU utilization, 所謂的Interrupt switching 也就是指所有除了process switching 的交換方式,例如fast switching, optimum switching, cef switching….所產生的CPU負載

Average utilization due to interrupts, during last five seconds

63%指的是最近5秒的CPU utilization總和,包括(interrupts + processes)

Average total utilization during last five seconds (interrupts + processes)

用63%-50%=13%, 這13%是基本由於process switching導致的CPU消耗,理解Cisco 路由器交換方式的人都知道,有一些流量路由器是必須使用process switching,例如icmp,也就ping, snmp等都是必須使用process switching

通常看來,如果打開了cef switching但是process switching部分的cpu utilization(63%-50%=13%)非常高,很可能目前情況不太正常,,因為如果打開cef的話,基本上除了icmp, snmp等類型的包外,都應該採用cef switching,但這部分差值由誰導致的,就要看show process cpu了, 從上面的例子可以看出來:

PID Runtime(ms) Invoked uSecs    5Sec   1Min   5Min TTY Process

25   101868424 30627416   3326   8.76% 9.04% 10.41%   0 IP Input

由於此路由器已經打開了cef,但為什麼還有這麼多的IP Input流量是通過process switching處理呢?

 

使用show interface state可以看到每個介面不同swiching方式產生的流量,如果某個介面的process部分很高,那很可能問題就出在這個埠。

 

Router#show interfaces stat

 

FastEthernet0/0

Switching path    Pkts In   Chars In   Pkts Out Chars Out

 Processor   
7995038
553590227 
8470311
629922225


Route cache   
42017034 3042361084   47856422 3952941601

 Total   
50012072 3595951311   56326733 287896530

 

FastEthernet1/0

 Switching path    Pkts In   Chars In   Pkts Out Chars Out


    Processor    1478297 178528355    1007368 101120880

 

     Route cache   46470310 3666895196   40629605 2756450367

 
    Total   47948607 3845423551   41636973 2857571247

 

使用show ip traffic命令來確認到底是那一種流量過大。

 

從下例中可以看出, 幾個不太正常的地:

 

1.在ICMP中有321413 unreachable,2263321 echo reply,很明顯路由器回應的ICMP太多了,如果每隔幾秒都有數量增加,建議在介面狀態下關掉IMCP redirects, unreachable以及echo reply,這些只會增加CPU負擔。

 

interface xxxx

 

no ip redirects

no ip unreachables

 

2.在UDP statistics中:

 

Rcvd: 7112 total, 0 checksum errors, 21093 no port

大量的no port就不太正常了,一般都是由於某些hacker軟體掃描埠造成的, 如果每隔幾秒都有數量增加,建議關掉proxy-arp

 

interface xxx

no ip proxy-arp

 

3. 在IP statistics,有89518 bad hop count,這一般是由於TTL過期導致的,如果每隔幾秒都有大量計數增加,很明顯,網路中存在routing loop,儘快檢查你的資料配置

 

或是詢問你的ISP怎麼給你做的路由。

 

Router#show ip traffic

 

IP statistics:

 

Rcvd: 190022549 total, 13327 local destination

 

         2 format errors, 0 checksum errors, 89518 bad hop count

         0 unknown protocol, 0 not a gateway

         0 security failures, 0 bad options, 0 with options

Opts: 0 end, 0 nop, 0 basic security, 0 loose source route

         0 timestamp, 0 extended security, 0 record route

         0 stream ID, 0 strict source route, 0 alert, 0 cipso, 0 ump

         0 other


Frags: 0 reassembled, 0 timeouts, 0 couldn’t reassemble

 

         6583 fragmented, 0 couldn’t fragment


Bcast: 2433 received, 77 sent


Mcast: 0 received, 0 sent


Sent: 100452 generated, 99773529 forwarded


Drop: 430 encapsulation failed, 1479 unresolved, 0 no adjacency

         3606 no route, 0 unicast RPF, 0 forced drop

 

ICMP statistics:

 

Rcvd: 0 format errors, 0 checksum errors, 0 redirects, 321413 unreachable

 

        2281 echo, 0 echo reply, 0 mask requests, 0 mask replies, 0 quench

        0 parameter, 0 timestamp, 0 info request, 0 other

        0 irdp solicitations, 0 irdp advertisements

Sent: 0 redirects, 4 unreachable, 0 echo, 2263321 echo reply

        0 mask requests, 0 mask replies, 0 quench, 0 timestamp

        0 info reply, 89517 time exceeded, 0 parameter problem

        0 irdp solicitations, 0 irdp advertisements

UDP statistics:

Rcvd: 7112 total, 0 checksum errors, 21093 no port

Sent: 5883 total, 0 forwarded broadcasts

 

TCP statistics:

Rcvd: 3935 total, 0 checksum errors, 4 no port

Sent: 2788 total

發表留言