OpenWrt/LEDE 没有slabtop命令

OpenWrt/LEDE 没有slabtop命令

slabtop命令openwrt系统不自带,需要自己编译生成。另外需要注意的时,这篇文章只提供安装这一命令的方法,slabtop需要访问/proc/slabinfo文件,而很不幸的时openwrt系统默认时没有/proc/slabinfo文件的,解决方法参考《OpenWrt/LEDE 没有/proc/slabinfo文件

解决方法

1.在openwrt源码目录下make menuconfig

2.勾选:Utilities  ---> <>procps-ng

4.保存并且退出

5.make ./package/feeds/packages/procps-ng/compile V=s

然后会生成一堆相关的安装包:

./bin/packages/mips_24kc/packages/procps-ng-w_3.3.11-4_mips_24kc.ipk
./bin/packages/mips_24kc/packages/procps-ng-skill_3.3.11-4_mips_24kc.ipk
./bin/packages/mips_24kc/packages/procps-ng-watch_3.3.11-4_mips_24kc.ipk
./bin/packages/mips_24kc/packages/procps-ng-snice_3.3.11-4_mips_24kc.ipk
./bin/packages/mips_24kc/packages/procps-ng-pkill_3.3.11-4_mips_24kc.ipk
./bin/packages/mips_24kc/packages/procps-ng-pwdx_3.3.11-4_mips_24kc.ipk
./bin/packages/mips_24kc/packages/procps-ng-pgrep_3.3.11-4_mips_24kc.ipk
./bin/packages/mips_24kc/packages/procps-ng-ps_3.3.11-4_mips_24kc.ipk
./bin/packages/mips_24kc/packages/procps-ng-kill_3.3.11-4_mips_24kc.ipk
./bin/packages/mips_24kc/packages/procps-ng-vmstat_3.3.11-4_mips_24kc.ipk
./bin/packages/mips_24kc/packages/procps-ng-free_3.3.11-4_mips_24kc.ipk
./bin/packages/mips_24kc/packages/procps-ng-uptime_3.3.11-4_mips_24kc.ipk
./bin/packages/mips_24kc/packages/procps-ng-pmap_3.3.11-4_mips_24kc.ipk
./bin/packages/mips_24kc/packages/procps-ng-slabtop_3.3.11-4_mips_24kc.ipk
./bin/packages/mips_24kc/packages/procps-ng_3.3.11-4_mips_24kc.ipk
./bin/packages/mips_24kc/packages/procps-ng-tload_3.3.11-4_mips_24kc.ipk
./bin/packages/mips_24kc/packages/procps-ng-top_3.3.11-4_mips_24kc.ipk

 

其中:procps-ng_3.3.11-4_mips_24kc.ipk时本体。

把这些安装包都复制到路由器,先安装procps-ng_3.3.11-4_mips_24kc.ipk,然后其他的都顺便装了吧。

可能会遇到依赖问题,make menuconfig找到相关的安装包,用类似方法依次安装就好了

posted @ 2020-05-19 20:50  zornlink  阅读(639)  评论(0编辑  收藏  举报