bcc-tools工具之softirqs

softirqs顾名思义,用于跟踪软中断事件,主要用于软中断处理时延的跟踪

老样子,看下help帮助

usage: softirqs [-h] [-T] [-N] [-d] [interval] [count]

Summarize soft irq event time as histograms.

positional arguments:
  interval           output interval, in seconds
  count              number of outputs

optional arguments:
  -h, --help         show this help message and exit
  -T, --timestamp    include timestamp on output   显示时间戳
  -N, --nanoseconds  output in nanoseconds         输出采用ns为单位
  -d, --dist         show distributions as histograms  采用矩形图显示各软中断执行时间

下面举例分析之:

./softirqs 

Tracing soft irq event time... Hit Ctrl-C to end.

^C
SOFTIRQ          TOTAL_usecs   采用的us显示
net_tx                     2
block                     35
rcu                       73
net_rx                   251
sched                   2533
timer                  19682

./softirqs -d

softirq = net_tx_action
     usecs               : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 0        |                                        |
        16 -> 31         : 0        |                                        |
        32 -> 63         : 0        |                                        |
        64 -> 127        : 0        |                                        |
       128 -> 255        : 0        |                                        |
       256 -> 511        : 440      |                                        |
       512 -> 1023       : 27613    |****************************************|
      1024 -> 2047       : 5728     |********                                |

softirq = net_rx_action
     usecs               : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 0        |                                        |
        16 -> 31         : 0        |                                        |
        32 -> 63         : 0        |                                        |
        64 -> 127        : 0        |                                        |
       128 -> 255        : 0        |                                        |
       256 -> 511        : 0        |                                        |
       512 -> 1023       : 6        |                                        |
      1024 -> 2047       : 35       |                                        |
      2048 -> 4095       : 3562     |****************                        |
      4096 -> 8191       : 7023     |********************************        |
      8192 -> 16383      : 8770     |****************************************|

./softirqs -NT 1 

每隔1s显示软中断时延,并打印时间戳

04:07:34
SOFTIRQ          TOTAL_nsecs
net_tx                  2752
tasklet                57284
net_rx                 70810
rcu                    76245
sched                 552705
timer                3755817

04:07:35
SOFTIRQ          TOTAL_nsecs
rcu                     1607
block                  11197
net_rx                107748
sched                 489969
timer                4740185

04:07:36
SOFTIRQ          TOTAL_nsecs
rcu                    48359
net_rx                105147
sched                 439390
timer                3234368

04:07:37
SOFTIRQ          TOTAL_nsecs
block                  12470
net_rx                161782
rcu                   530526
sched                 598443
timer                4353594

 

你可能感兴趣的:(bcc-tools工具之softirqs)