root@heidsoft-dev:~# perf list
List of pre-defined events (to be used in -e):
alignment-faults [Software event]
bpf-output [Software event]
cgroup-switches [Software event]
context-switches OR cs [Software event]
cpu-clock [Software event]
cpu-migrations OR migrations [Software event]
dummy [Software event]
emulation-faults [Software event]
major-faults [Software event]
minor-faults [Software event]
page-faults OR faults [Software event]
task-clock [Software event]
duration_time [Tool event]
msr/cpu_thermal_margin/ [Kernel PMU event]
msr/pperf/ [Kernel PMU event]
msr/smi/ [Kernel PMU event]
msr/tsc/ [Kernel PMU event]
rNNN [Raw hardware event descriptor]
cpu/t1=v1[,t2=v2,t3 ...]/modifier [Raw hardware event descriptor]
(see 'man perf-list' on how to encode it)
perf stat -ae 'tcp:,sock:'
root@heidsoft-dev:~# perf stat -ae 'tcp:*,sock:*'
^C
Performance counter stats for 'system wide':
0 tcp:tcp_retransmit_skb
0 tcp:tcp_send_reset
0 tcp:tcp_receive_reset
0 tcp:tcp_destroy_sock
5 tcp:tcp_rcv_space_adjust
0 tcp:tcp_retransmit_synack
9 tcp:tcp_probe
0 tcp:tcp_bad_csum
0 sock:sock_rcvqueue_full
0 sock:sock_exceed_buf_limit
0 sock:inet_sock_set_state
0 sock:inet_sk_error_report
3.421333439 seconds time elapsed
Samples: 20 of event 'sock:inet_sock_set_state', Event count (approx.): 20
Children Self Command Shared Object Symbol
+ 100.00% 0.00% python python2.7 [.] _start
+ 100.00% 0.00% python libc-2.31.so [.] __libc_start_main (inlined)
+ 100.00% 0.00% python python2.7 [.] Py_Main
+ 100.00% 0.00% python python2.7 [.] PyRun_SimpleFileExFlags
+ 100.00% 0.00% python python2.7 [.] PyRun_FileExFlags
+ 100.00% 0.00% python python2.7 [.] PyEval_EvalCode
+ 100.00% 0.00% python python2.7 [.] PyEval_EvalCodeEx
+ 100.00% 0.00% python python2.7 [.] PyEval_EvalFrameEx
+ 100.00% 0.00% python [kernel.kallsyms] [k] entry_SYSCALL_64_after_hwframe
+ 100.00% 0.00% python [kernel.kallsyms] [k] do_syscall_64
+ 90.00% 90.00% python [kernel.kallsyms] [k] inet_sk_state_store
+ 90.00% 0.00% python [kernel.kallsyms] [k] tcp_set_state
+ 70.00% 0.00% python [kernel.kallsyms] [k] tcp_v4_do_rcv
+ 60.00% 0.00% python python2.7 [.] PyObject_SetAttr
+ 60.00% 0.00% python python2.7 [.] PyObject_GenericSetAttr
+ 60.00% 0.00% python python2.7 [.] PyMember_SetOne
+ 60.00% 0.00% python libc-2.31.so [.] __GI___close (inlined)
+ 60.00% 0.00% python [kernel.kallsyms] [k] syscall_exit_to_user_mode
+ 60.00% 0.00% python [kernel.kallsyms] [k] exit_to_user_mode_prepare
+ 60.00% 0.00% python [kernel.kallsyms] [k] task_work_run
+ 60.00% 0.00% python [kernel.kallsyms] [k] ____fput
+ 60.00% 0.00% python [kernel.kallsyms] [k] __fput
+ 60.00% 0.00% python [kernel.kallsyms] [k] sock_close
+ 60.00% 0.00% python [kernel.kallsyms] [k] __sock_release
+ 60.00% 0.00% python [kernel.kallsyms] [k] inet_release
+ 60.00% 0.00% python [kernel.kallsyms] [k] tcp_close
+ 60.00% 0.00% python [kernel.kallsyms] [k] __tcp_close
+ 60.00% 0.00% python [kernel.kallsyms] [k] tcp_rcv_state_process
+ 50.00% 0.00% python [kernel.kallsyms] [k] __tcp_transmit_skb
+ 50.00% 0.00% python [kernel.kallsyms] [k] ip_queue_xmit
+ 50.00% 0.00% python [kernel.kallsyms] [k] __ip_queue_xmit
+ 50.00% 0.00% python [kernel.kallsyms] [k] ip_local_out
root@heidsoft-dev:~# perf script
python 12589 [000] 3120.823728: sock:inet_sock_set_state: family=AF_INET protocol=IPPROTO_TCP sport=0 dport=10000 sadd>
ffffffff84db9a82 inet_sk_state_store+0x52 ([kernel.kallsyms])
ffffffff84db9a82 inet_sk_state_store+0x52 ([kernel.kallsyms])
ffffffff84d7718f tcp_set_state+0x8f ([kernel.kallsyms])
ffffffff84d9673d tcp_v4_connect+0x26d ([kernel.kallsyms])
ffffffff84db7150 __inet_stream_connect+0xd0 ([kernel.kallsyms])
ffffffff84db744b inet_stream_connect+0x3b ([kernel.kallsyms])
ffffffff84c91973 __sys_connect_file+0x63 ([kernel.kallsyms])
ffffffff84c91a24 __sys_connect+0xa4 ([kernel.kallsyms])
ffffffff84c91a7a __x64_sys_connect+0x1a ([kernel.kallsyms])
ffffffff84f6156c do_syscall_64+0x5c ([kernel.kallsyms])
ffffffff85000099 entry_SYSCALL_64_after_hwframe+0x61 ([kernel.kallsyms])
7f03512db1d7 __libc_connect+0x147 (inlined)
55697aac3777 [unknown] (/usr/bin/python2.7)
55697aac48ca [unknown] (/usr/bin/python2.7)
55697aa008bd PyEval_EvalFrameEx+0x2e0d (/usr/bin/python2.7)
55697aa171c5 [unknown] (/usr/bin/python2.7)
55697a9df106 PyObject_Call+0x46 (/usr/bin/python2.7)
55697aa7469f [unknown] (/usr/bin/python2.7)
55697a9df106 PyObject_Call+0x46 (/usr/bin/python2.7)
55697aa03afc PyEval_EvalFrameEx+0x604c (/usr/bin/python2.7)
55697a9fbd2d PyEval_EvalCodeEx+0x52d (/usr/bin/python2.7)
55697a9fb7f9 PyEval_EvalCode+0x19 (/usr/bin/python2.7)
55697aa2f2a3 [unknown] (/usr/bin/python2.7)
55697aa2a0da PyRun_FileExFlags+0x8a (/usr/bin/python2.7)
55697aa29158 PyRun_SimpleFileExFlags+0x168 (/usr/bin/python2.7)
55697a9c6c7c Py_Main+0x58c (/usr/bin/python2.7)
7f03511df0b2 __libc_start_main+0xf2 (inlined)
TCP flags
сеть центров обработки данных