插件信息:|名称|大小|版本|更新时间|支持系统||-|-|-|-|-||top_x|0.1M|1.0.6|2021/6/5|Linux|插件简介:top_x为linuxtop的增强版,可以显示cpu占用率/负载,cpu及内存进程使用的list.本插件对于繁杂的top命令输出进行了功能的拆分和整理,更加清晰易用,支持管道化,尤其可以直接拿到top进程或线程tid,pid;mem_s命令增加了按照进程swap大小占用排序增强了原有top功能使用说明:```cpu_p:displaytopcpuprocesslistcpu_u:displaytotalcpuusage%:user%sys%id%cpu_l:displaycpuload_avginfocpu_s:displaytaskrunningstatuscpu_t:displaytopcputhreadlistmem_s:displaythetopswapmemoryuseprocesslistmem_r:displaythetopphysicalmemoryuseprocesslistmem_v:displaythetopvirtualmemoryuseprocesslist```查看系统的cpu_load:```XPocket[top_x]>cpu_l--------------------------------------------------------------------CurrentExecution:top_x.cpu_l@LINUXCurrentPlugin:top_x@LINUX-------------------------------loadaverage:2.00,1.47,0.72--------------------------------------------------------------------```获取使用cpu最高的进程信息:```XPocket[top_x]>cpu_t--------------------------------------------------------------------CurrentExecution:top_x.cpu_t@LINUXCurrentPlugin:top_x@LINUX-------------------------------top-18:03:09up69days,6:58,5users,loadaverage:2.00,1.50,0.74Threads:3total,2running,1sleeping,0stopped,0zombie%Cpus:54.1us,0.0sy,0.0ni,45.9id,0.0wa,0.0hi,0.0si,0.0stKiBMem:8010284total,155528free,738284used,7116472buff/cacheKiBSwap:8257532total,8257264free,268used.6809988availMemPIDUSERPRNIVIRTRESSHRS%CPU%MEMTIME+COMMAND19235root20022896384300R93.80.06:55.98useallcpu19236root20022896384300R93.80.06:55.98useallcpu19234root20022896384300S0.00.00:00.00useallcpu--------------------------------------------------------------------```可以通过cpu_t的-h参数直接获取当系统cpu最高的线程的线程ID和进程ID:```XPocket[top_x]>cpu_t-h--------------------------------------------------------------------CurrentExecution:top_x.cpu_t@LINUX-hCurrentPlugin:top_x@LINUX-------------------------------19235,19234--------------------------------------------------------------------```输出按照物理内存使用排序的进程列表:```XPocket[top_x]>mem_r--------------------------------------------------------------------CurrentExecution:top_x.mem_r@LINUXCurrentPlugin:top_x@LINUX-------------------------------top-18:11:15up69days,7:06,5users,loadaverage:1.97,1.89,1.25Tasks:138total,1running,137sleeping,0stopped,0zombie%Cpus:50.0us,1.6sy,0.0ni,48.4id,0.0wa,0.0hi,0.0si,0.0stKiBMem:8010284total,149096free,744708used,7116480buff/cacheKiBSwap:8257532total,8257264free,268used.6803484availMemPIDUSERPRNIVIRTRESSHRS%CPU%MEMTIME+COMMAND18922root20049001569898013844S0.01.20:21.06java2565root2001180880587441920S0.00.717:10.36dockerd2554root2001236872346801524S0.00.4140:13.87containerd484root200450721485214536S0.00.20:27.12systemd-jo+911root200567368143561588S0.00.212:13.63tuned12620root20071331211592880S0.00.17:11.79containerd+688root200281644111409852S0.00.14:25.29rsyslogd674polkitd200534400100081512S0.00.10:17.93polkitd12605root2008990209124220S0.00.10:06.02docker-pro+12597root2008992769088188S0.00.10:06.09docker-pro+687root20047261667922156S0.00.11:46.38NetworkMan+18441root20014846058604548S0.00.10:00.21sshd18477root20014846058604548S0.00.10:00.10sshd18513root20014846058604548S0.00.10:00.05sshd```其他:[使用XPocket插件top_x解决cpu高及cpu_load高的一般思路]https://club.perfma.com/article/2496936