- 列出pid对应的每个线程占用cpu的情况
pidstat -t -p ${pid}
- 输出格式:
TGID TID %usr %system %guest %CPU CPU Command
- TGID --The identification number of the thread group leader.
- TID --The identification number of the thread being monitored.
- %usr --Percentage of CPU used by the task while executing at the user level (application), with or without nice priority. Note that this field does NOT include time spent running a virtual processor.
- %system --Percentage of CPU used by the task while executing at the system level (kernel).
- %guest --Percentage of CPU spent by the task in virtual machine (running a virtual processor).
- %CPU --Total percentage of CPU time used by the task.
- CPU --Processor number to which the task is attached.
- Command --The command name of the task.
- -u代表cpu(可以不加),-r代表内存,-d代表io