如何解析通过topas查询出来的内容?
系统:IBM PowerVM VIOS (AIX)
查询方式:使用SSH连接VIOS,执行命令 topas>&1 (就是把topas的信息输出到标准输出流)
问题:
如果只是在SSH界面上查看的话,信息是这样的:
Topas Monitor for host: rd-aixvio01 EVENTS/QUEUES FILE/TTY
Fri May 24 02:13:53 2013 Interval: 2 Cswitch 191 693.5K
Syscall Writech 3367 7186
CPU User% Kern% Wait% Idle% Physc Reads 261 Rawin 0
cpu0 30.8 57.9 0.0 11.4 0.01 183 1258
cpu1 0.0 1.6 0.0 98.4 0.00 5 0
cpu2 0.0 18.5 0.0 81.5 0.00 7 264
cpu3 0.0 19.1 0.0 80.9 0.00 0.0 0
Waitqueue 0.0
Network KBPS I-Pack O-Pack KB-In KB-Out
en0 5.4 16.0 33.5 0.9 4.4 75760 0.0 0.0 0.0 0.0 0.0
Steals % Comp 0 74.4
Disk Busy% KBPS TPS KB-Read KB-Writ PgspIn 0 % Noncomp 6.6
hdisk0 0.0 0.0 0.0 0.0 0.0 0 6.6
hdisk2 0.0 0.0 0.0 0.0 0.0 0 1536 0.0 0.0 0.0 0.0 0.0
Name PID CPU% PgSp Owner 9.9
topas 1728550 1.9 1.5 root 91.1
ioscli 1314958 1.6 0.4 root 0
tee 1925372 0.6 0.1 padmin 0
sshdntV2 450798 0.4 0.7 padmin 0
rksh 1683610 0.3 0.5 padmin 0
gettytV3 278672 0.1 0.6 root
^[=^[[?7h^[[?1l^[(B^[=^[[m^[(B^[[H^[[2JTopas Monitor for host: rd-aixvio01 EVENTS/QUEUES FILE/TTY
^MFri May 24 02:13:51 2013 Interval: 2 Cswitch Readch
^[[23DSyscall Writech
^MKernel |^[[28C| Reads Rawin
^MUser |^[[28C| Writes Ttyout
^MWait |^[[28C| Forks Igets
^MIdle |^[[28C| Execs Namei
^MPhysc =^[[27C%Entc= Runqueue Dirblk
^[[23DWaitqueue^[[11;49HPAGING MEMORY
^[[23DFaults Real,MB
^[[24DSteals % Comp
^[[23DPgspIn % Noncomp
^[[26DPgspOut % Client
^[[25DPageIn
^[[6DPageOut PAGING SPACE
^[[29DSios Size,MB
^[[7D% Used
^[[23DNFS (calls/sec) % Free
^[[23DServerV2
^[[8DClientV2 Press:
^[[25DServerV3 "h" for help
^[[31DClientV3 "q" to quit^[[9;10H^[[H^[[2JTopas Monitor for host: rd-aixvio01 EVENTS/QUEUES FILE/TTY
^MFri May 24 02:13:51 2013 Interval: 2 Cswitch Readch
^[[23DSyscall Writech
^MNetwork ^[[;7m^[(BKBPS ^[[m^[(BI-Pack O-Pack KB-In KB-Out Reads Rawin
^[[22DWrites Ttyout
^[[23DForks Igets
^[[22DExecs Namei
^MDisk Busy% ^[[;7m^[(BKBPS^[[5C^[[m^[(BTPS KB-Read KB-Writ Runqueue Dirblk
^[[23DWaitqueue^[[11;49HPAGING MEMORY
^[[23DFaults Real,MB
^[[24DSteals % Comp
^[[23DPgspIn % Noncomp
^[[26DPgspOut % Client
^[[25DPageIn
^[[6DPageOut PAGING SPACE
^[[29DSios Size,MB
^[[7D% Used
^[[23DNFS (calls/sec) % Free
^[[23DServerV2
^[[8DClientV2 Press:
^[[25DServerV3 "h" for help
^[[31DClientV3 "q" to quit^[[4;10H
^Mhdisk2 0.1 8.9 0.2 7.5 1.3
^Mhdisk0 0.0 1.2 0.1 0.4 0.8
^Mcd1 0.0 0.0 0.0 0.0 0.0^[[4;10H^[[9B^MName PID CPU% PgSp Owner
^Mseaproc^[[6C155728 0.0 1.0 root
^Mgil^[[11C69666 0.0 0.9 root
^Mgetty^[[8C278672 0.0 0.6 root
^Mxmgc^[[10C49176 0.0 0.4 root
^Msyslogd^[[6C127206 0.0 0.3 root
^Minit 1 0.0 0.6 root
^Mnetm^[[10C65568 0.0 0.4 root
^Mpilegc^[[8C45078 0.0 1.2 root
^Mrdpgc^[[8C159826 0.0 0.4 root
^Mfbdsk_io 163936 0.0 0.4 root
^Mtarget_k 122962 0.0 0.5 root
^Mpsmd^[[10C24588 0.0 0.5 root^[[4;10H^[[H^[[2JTopas Monitor for host: rd-aixvio01 EVENTS/QUEUES FILE/TTY
^MFri May 24 02:13:53 2013 Interval: 2 Cswitch Readch
^[[23DSyscall Writech
^MCPU ^[[;7m^[(BUser% ^[[C^[[m^[(BKern% Wait% Idle% Physc Reads Rawin
^[[22DWrites Ttyout
^[[23DForks Igets
^[[22DExecs Namei
^[[22DRunqueue Dirblk
^[[23DWaitqueue
^MNetwork ^[[;7m^[(BKBPS ^[[m^[(BI-Pack O-Pack KB-In KB-Out
PAGING MEMORY
^[[23DFaults Real,MB
^[[24DSteals % Comp
^MDisk Busy% ^[[;7m^[(BKBPS^[[5C^[[m^[(BTPS KB-Read KB-Writ PgspIn % Noncomp
^[[26DPgspOut % Client
^[[25DPageIn
^[[6DPageOut PAGING SPACE
^[[29DSios Size,MB
^[[7D% Used
^[[23DNFS (calls/sec) % Free
^[[23DServerV2
^[[8DClientV2 Press:
^[[25DServerV3 "h" for help
^[[31DClientV3 "q" to quit^[[10;10H^[[5A^Mcpu0 30.8 57.9 0.0 11.4 0.01
^Mcpu1 0.0 1.6 0.0 98.4 0.00
^Mcpu2 0.0 18.5 0.0 81.5 0.00
^Mcpu3 0.0 19.1 0.0 80.9 0.00
^Men0 5.4 16.0 33.5 0.9 4.4
^Mlo0 0.0 0.0 0.0 0.0 0.0
^Mhdisk0 0.0 0.0 0.0 0.0 0.0
^Mhdisk2 0.0 0.0 0.0 0.0 0.0
^Mcd1 0.0 0.0 0.0 0.0 0.0^[[10;10H^[[2;61H191 693.5K^M
^[[59C3367^[[13C7186^M
^[[60C261^[[16C0^M
^[[60C183^[[13C1258^M
^[[62C5^[[16C0^M
^[[62C7^[[14C264^M
^[[60C0.0^[[16C0^M
^[[60C0.0
^H^H76^[[14C576^M
^[[62C0^[[13C74.4^M
^[[62C0^[[14C6.6^M
^[[62C0^[[14C6.6^M
^[[62C0
^H0
^H0^[[13C1536^M
Name PID CPU% PgSp Owner^[[40C9.9^M
topas 1728550 1.9 1.5 root^[[40C91.1^M
ioscli 1314958 1.6 0.4 root^[[27C0
^Mtee 1925372 0.6 0.1 padmin^[[25C0
^Msshd^[[9C450798 0.4 0.7 padmin^[[25C0
^Mrksh 1683610 0.3 0.5 padmin^[[25C0
^Mgetty^[[8C278672 0.1 0.6 root^[[10;10H^[[15B^M^[>^[[?7h
cat &1
man topas
[解决办法]
col -b > urfile