当前位置: 技术问答>linux和unix
linux里top导出结果是乱码
来源: 互联网 发布时间:2017-02-04
本文导语: 各位高手们,帮帮我出出主意吧,实在没辙了top |col -b >a.txt 是乱码:谢谢大家 [H[2J(B[mtop - 15:04:47 up 49 min, 4 users, load average: 0.04, 0.83, 8.63(B[m[39;49m[K Tasks:(B[m[39;49m(B[m 185 (B[m[39;49mtotal,(B[m[39;49m(B[m 1 (B[m...
各位高手们,帮帮我出出主意吧,实在没辙了top |col -b >a.txt 是乱码:谢谢大家
[H[2J(B[mtop - 15:04:47 up 49 min, 4 users, load average: 0.04, 0.83, 8.63(B[m[39;49m[K
Tasks:(B[m[39;49m(B[m 185 (B[m[39;49mtotal,(B[m[39;49m(B[m 1 (B[m[39;49mrunning,(B[m[39;49m(B[m 184 (B[m[39;49msleeping,(B[m[39;49m(B[m 0 (B[m[39;49mstopped,(B[m[39;49m(B[m 0 (B[m[39;49mzombie(B[m[39;49m[K
Cpu(s):(B[m[39;49m(B[m 6.1%(B[m[39;49mus,(B[m[39;49m(B[m 1.5%(B[m[39;49msy,(B[m[39;49m(B[m 0.0%(B[m[39;49mni,(B[m[39;49m(B[m 89.2%(B[m[39;49mid,(B[m[39;49m(B[m 3.0%(B[m[39;49mwa,(B[m[39;49m(B[m 0.0%(B[m[39;49mhi,(B[m[39;49m(B[m 0.1%(B[m[39;49msi,(B[m[39;49m(B[m 0.0%(B[m[39;49mst(B[m[39;49m[K
Mem: (B[m[39;49m(B[m 6106860k (B[m[39;49mtotal,(B[m[39;49m(B[m 4941976k (B[m[39;49mused,(B[m[39;49m(B[m 1164884k (B[m[39;49mfree,(B[m[39;49m(B[m 120756k (B[m[39;49mbuffers(B[m[39;49m[K
Swap:(B[m[39;49m(B[m 5144568k (B[m[39;49mtotal,(B[m[39;49m(B[m 0k (B[m[39;49mused,(B[m[39;49m(B[m 5144568k (B[m[39;49mfree,(B[m[39;49m(B[m 2685776k (B[m[39;49mcached(B[m[39;49m[K
[H[2J(B[mtop - 15:04:47 up 49 min, 4 users, load average: 0.04, 0.83, 8.63(B[m[39;49m[K
Tasks:(B[m[39;49m(B[m 185 (B[m[39;49mtotal,(B[m[39;49m(B[m 1 (B[m[39;49mrunning,(B[m[39;49m(B[m 184 (B[m[39;49msleeping,(B[m[39;49m(B[m 0 (B[m[39;49mstopped,(B[m[39;49m(B[m 0 (B[m[39;49mzombie(B[m[39;49m[K
Cpu(s):(B[m[39;49m(B[m 6.1%(B[m[39;49mus,(B[m[39;49m(B[m 1.5%(B[m[39;49msy,(B[m[39;49m(B[m 0.0%(B[m[39;49mni,(B[m[39;49m(B[m 89.2%(B[m[39;49mid,(B[m[39;49m(B[m 3.0%(B[m[39;49mwa,(B[m[39;49m(B[m 0.0%(B[m[39;49mhi,(B[m[39;49m(B[m 0.1%(B[m[39;49msi,(B[m[39;49m(B[m 0.0%(B[m[39;49mst(B[m[39;49m[K
Mem: (B[m[39;49m(B[m 6106860k (B[m[39;49mtotal,(B[m[39;49m(B[m 4941976k (B[m[39;49mused,(B[m[39;49m(B[m 1164884k (B[m[39;49mfree,(B[m[39;49m(B[m 120756k (B[m[39;49mbuffers(B[m[39;49m[K
Swap:(B[m[39;49m(B[m 5144568k (B[m[39;49mtotal,(B[m[39;49m(B[m 0k (B[m[39;49mused,(B[m[39;49m(B[m 5144568k (B[m[39;49mfree,(B[m[39;49m(B[m 2685776k (B[m[39;49mcached(B[m[39;49m[K
|
top -b -n 1
|
top -bn1
|
1L的方法ok的
top -b -n 1 > a.txt
top -b -n 1 > a.txt