iotop 移植linux/arm


    iotop可以很直观的显示出来哪个程序在消耗你的硬盘,可以帮助我们在开发过程中迅速定位出那个进程占用I\O资源,下面记录着移植过程( Linux/arm 3.14.28 Kernel ):

1:在编译内核make menuconfig的时候一定要把下面选项选上
General setup —> CPU/Task time and stats accounting ->
[*] BSD Process Accounting    
[*] BSD Process Accounting version 3 file format 
[*] Export task/process statistics through netlink
[*] Enable per-task delay accounting
[*] Enable extended accounting over taskstats  
[*] Enable per-task storage I/O accounting   

General setup —>  [*] Namespaces support  --->  
[*]   UTS namespace
[*]   IPC namespace
[*]   User namespace
[*]   PID Namespaces
[*]   Network namespace

2: 在执行iotop出现 Error opening terminal: vt102,请继续往下看:

在板子上如下操作/etc/profile加入
export TERM=vt100
export TERMINFO=/usr/share/terminfo

mkdir /usr/share/terminfo/v -p
然后copy自己的pc主机上的
/usr/share/terminfo/v/vt100
到板子上的/usr/share/terminfo/v/目录下

3: iotp C实现源码在git上面有,请自己下载

猜你喜欢

转载自blog.csdn.net/ccwzhu/article/details/80752698