原文地址:https://www.douyacun.com/article/7d9e2f0f4ab362e48dc2f538427987bd
[root@cpc-dev01 work]# strace -p 175664
strace: Process 175664 attached
epoll_wait(11, [], 1, 322) = 0
epoll_wait(11, [], 1, 333) = 0
epoll_wait(11, [], 1, 94) = 0
getsockopt(10, SOL_TCP, TCP_INFO, "\n\0\0\0\0\0\0\0@B\17\0\0\0\0\0\30\2\0\0\0\0\0\0\0\0\0\0\200\0\0\0"..., [104]) = 0
epoll_wait(11, [], 1, 239) = 0
epoll_wait(11, [], 1, 333) = 0
epoll_wait(11, [], 1, 333) = 0
epoll_wait(11, [], 1, 94) = 0
getsockopt(10, SOL_TCP, TCP_INFO, "\n\0\0\0\0\0\0\0@B\17\0\0\0\0\0\30\2\0\0\0\0\0\0\0\0\0\0\200\0\0\0"..., [104]) = 0
epoll_wait(11, [], 1, 239) = 0
epoll_wait(11, [], 1, 333) = 0
epoll_wait(11, [], 1, 269) = 0
epoll_wait(11, [], 1, 64) = 0
epoll_wait(11, [], 1, 94) = 0
getsockopt(10, SOL_TCP, TCP_INFO, "\n\0\0\0\0\0\0\0@B\17\0\0\0\0\0\30\2\0\0\0\0\0\0\0\0\0\0\200\0\0\0"..., [104]) = 0
[root@00h ~]# strace -p 2940 -c
strace: Process 2940 attached
^Cstrace: Process 2940 detached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
75.28 0.001836 1836 1 poll
18.00 0.000439 439 1 restart_syscall
6.40 0.000156 39 4 futex
0.33 0.000008 4 2 accept
------ ----------- ----------- --------- --------- ----------------
100.00 0.002439 8 total