1、安装
apt-get install pidstat
2、查看特定名称所有线程的CPU使用率
pidstat | grep mono
06:41:50 PM 8002 85748 15.24 13.33 0.00 28.57 62 mono
06:41:50 PM 8002 85765 9.52 12.38 0.00 21.90 5 mono
06:41:50 PM 8002 85782 34.29 16.19 0.00 50.48 40 mono
06:41:50 PM 8002 85799 32.38 16.19 0.00 48.57 71 mono
06:41:50 PM 8002 85824 33.33 17.14 0.00 50.48 76 mono
3、查看特定线程的CPU使用
pidstat -u -p 86935 1 5
06:49:46 PM UID PID %usr %system %guest %CPU CPU Command
06:49:47 PM 8002 86935 31.00 15.00 0.00 46.00 61 mono
06:49:48 PM 8002 86935 30.00 20.00 0.00 50.00 36 mono
06:49:49 PM 8002 86935 27.00 18.00 0.00 45.00