以下是c.isco12012的端口统计信息.,请问如何将各项性能参数放进一个数组中
如下面的输出,以回.车换行以及“,.”为界,将内容分别存进数组中 汽车
R1-A-x..xxx-1>;show int g 1/0 .
GigabitEthern.et1/0 is up, line .protocol is up 杀毒
Hardware is GigMac 3 Port GigabitEthernet, address is 0003.a01.8.40.55 (bia 0003.a018.4055). 外贸
Description: R.1-A-xxx-1-GE1/0->;xx-M-C-xxxx-R1-GE1/0/0/./1000M .
Intern.e.t address is 218.14.116.57/30 .
MTU 1.500 bytes, BW 1000000 Kbit, DLY 10 usec, rely 255/255,. load 75/255 女人
Encaps.ulation ARPA, loopbac.k not set 电影
Keepalive set .(10 sec) .
Full-dup.lex mode, link ty.pe is autonegotiation, media type is SX 婚庆
outp.ut flow-control is unsupporte.d, input flow-control is unsupported ( 游戏 )
ARP type: A.RPA, ARP Timeout 0.4:00:00 婚庆
Last input 00:00:00, output 00:00:00, outp.ut hang never .学习
Last clearing of. "show interface" coun.ters never 学习
Queueing strategy: .fifo <性病>
Output queue 0/40, 0. drops; input queue 0/75, 0 dro.ps 婚庆
5 minute .i.nput rate 212452000 bits/sec, 58409 packets/sec .
5 minute output rate. 296782000 bits/s.ec, 60022 packets/sec 教育
1124587438093 packets input, 4276050928.23493. bytes, 0 no buffer <性病>
Recei.ved 9690 broadcasts, 0 runts, 0 giants, .0 throttles 教育
375 input errors, 17 CRC, 0 .frame, 358 o.verrun, 0 ignored 健康
.0 watchdog, 0 mult.icast, 0 pause input 电子
1263768.445224 packets output, 675663759379957 bytes, 0 underr.uns 美容
0 output errors,. 0 collisions, 0 interface .resets --------------彩票
0 babbles, 0 late collision, .0 .deferred ( 游戏 )
2 lost. carrier, 0 no. carrier, 0 pause output 杀毒
0 output buffer failures, 0 ou.tput buffers swa.pped out--- 印刷
处理后变为
R.1-A-xxxx-1>;show i.nt g 1/0 电影
GigabitEther.net1/0 is up 建材
line protocol i.s up 虚拟主机
Hardware is. GigMa.c 3 Port GigabitEthernet--------------彩票
addre.ss is 000.3.a018.4055 (bia 0003.a018.4055) 投资
Description: R1-A-xxx-1-GE1/0->;xx-M-C-x.xxx-.R1-GE1/0/0//1000M .
Internet add.ress i.s 218.14.116.57/30 汽车
MTU 1500 bytes
BW 100000.0 Kbit 外汇
DLY 10 usec
rely 255/255
load 75/255
Encapsulation AR.PA., loopback not set <性病>
Keepaliv.e set (10 sec) 婚庆
Full-.duplex mode 美容
l.ink type i.s autonegotiation.
media type is .SX 电子
output. fl.ow-control is unsupported 汽车
input f.low-control is unsu.pported (广告)
ARP type: ARPA
ARP Timeout 04:0.0:00 健康
Last .input 00:00:00 健康
ou.tput 00:00:00 女人
output hang n.ever --------------彩票
Last clearing. of "show. interface" counters never 服务器
Q.ueueing strategy: fifo .
Output q.ueue 0/40 美容
0 drops
i.nput queue 0/75( 游戏 )
0 drops
5 minute in.put rate 212452000 b.its/sec 婚庆
5.8409 packets/sec ( 游戏 )
5 minu.t.e output rate 296782000 bits/sec.
60022 packets/sec. 电子
1124587438093 .packets. input 电子
42760509.2823493 bytes 杀毒
0 no buffer
Received 9690 broadca.sts 健康
0 runts
0 giants
0 throttles
375 in.put errors 婚庆
17 CRC
0 frame
358 overrun
0 ignored
。。。。。。
然后分别.提取出数字与字符至数值,结果与下面类似.
数组1 数组2
17 CRC
0 . frame外贸
358 . overrun 美容
0 . ignored (广告)
0 . watchdog[成人用品]
0 . multicast电脑
0 . pause input虚拟主机