bcc-tools工具之offcputime
先了解什么是off-cpu On-CPU : where threads are spending time running on-CPU. Off-CPU : where time is spent waiting while blocked on I/O, locks, timers, paging/swapping, etc. 从上面的意思基本上了解offcputime的意思是什么了:用于测量某一进程被阻塞的时间。 老样子,还是从help开始说起: usage: offcputime [-h] [-p PID | -t TID | -u | -k] [-U | -K] [-d] [-f] [--stack-storage-size STACK_STORAGE_SIZE] [-m MIN_BLOCK_TIME] [-M MAX_BLOCK_TIME] [--state STATE] [duration] Summarize off-CPU time by stack trace positional arguments: duration duration of trace, in seconds optional arguments: -h, --help show this help message and exit -p PID, --pid PID trace this