{"id":328297,"date":"2022-01-20T09:00:17","date_gmt":"2022-01-20T09:00:17","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=328297"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=328297","title":{"rendered":"<span>\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0432\u00a0Linux. BPFTrace \u0438\u00a0skbtrace \u0432\u00a0\u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u0435<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0421\u0435\u0440\u0433\u0435\u0439 \u041a\u043b\u044f\u0443\u0441, \u0438 \u044f \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u044e \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0440\u0430\u0437\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u0445 \u0432 Yandex.Cloud. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u043e\u0431\u043b\u0430\u043a\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b: \u043c\u044b \u043d\u0435 \u0432\u0438\u0434\u0438\u043c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e TCP retransmissions, \u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0434\u0430\u043c\u043f\u044b \u0432\u0441\u0435\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e tcpdump \u0434\u043e\u0440\u043e\u0433\u043e \u0438 \u0442\u0440\u0443\u0434\u043d\u043e \u0438\u0437-\u0437\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.   <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/h4\/nu\/xw\/h4nuxwyl2oj9w81uchr0aofjjsi.jpeg\" width=\"80%\" data-src=\"https:\/\/habrastorage.org\/webt\/h4\/nu\/xw\/h4nuxwyl2oj9w81uchr0aofjjsi.jpeg\" data-blurred=\"true\"\/><\/div>\n<p>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0435 \u043e\u0442 \u0434\u0432\u0443\u0445 \u043c\u0438\u0440\u043e\u0432: \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u0430 \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u0434\u0435 \u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0442\u0435\u043b\u043e \u043f\u0430\u043a\u0435\u0442\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 TCP-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0443 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 managed-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0442\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 UDP-\u043f\u0430\u043a\u0435\u0442\u044b. \u0413\u0438\u043f\u043e\u0442\u0435\u0437\u0430 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0430 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u044f, \u0445\u043e\u0442\u044f \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0440\u043e\u0441\u0442\u043e\u043c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u0441\u0431\u043e\u0435\u043c \u0431\u044b\u043b\u0430 \u043f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430. \u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c Linux \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 eBPF \u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 BPFTrace, \u043d\u043e \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043c\u044b \u043d\u0430\u043a\u043e\u043f\u0438\u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043e\u0431\u0451\u0440\u0442\u043a\u0443 \u043d\u0430\u0434 BPFTrace. \u041e\u043d\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f skbtrace \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 <a href=\"https:\/\/github.com\/yandex-cloud\/skbtrace\">\u043d\u0430 GitHub<\/a>. \u041f\u0440\u043e \u043d\u0435\u0451 \u044f \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>eBPF \u0438 BPFTrace<\/h2>\n<p>  \u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f eBPF \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u044f\u0434\u0440\u0435 Linux. \u041e\u043d\u0430 \u0431\u0435\u0440\u0451\u0442 \u0441\u0432\u043e\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u043e\u0442 Berkeley Packet Filter \u2014 \u043f\u043e \u0441\u0443\u0442\u0438, \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u044f\u0434\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043e\u0442 <code>tcpdump<\/code>, \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0438\u0445 \u043f\u0435\u0440\u0435\u0434 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u044f\u0434\u0440\u043e\u043c \u043f\u0430\u043a\u0435\u0442\u0430, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 userspace-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b, \u0430 \u0443\u0436\u0435 \u043e\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0430 \u043f\u043e\u043b\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0438 \u043f\u0435\u0447\u0430\u0442\u0430\u043b\u0430 \u0432\u0441\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0438 \u043f\u043e\u043b\u044f \u0432 \u043d\u0438\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u0435 \u0444\u043b\u0430\u0433\u043e\u0432 TCP, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u043b\u043e\u043f\u043e\u043b\u0443\u0447\u043d\u044b\u0439 RST (reset) \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u043e\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f. <\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 eBPF \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u0448\u0451\u043b \u0432\u043f\u0435\u0440\u0451\u0434 \u2014 \u0437\u0430 \u044d\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0431\u0443\u043a\u0432\u0430 \u00abe\u00bb \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438, Extended: JIT-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 BPF-\u043c\u0430\u0448\u0438\u043d\u044b \u0432 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, x86), \u0430 \u0437\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 Verifier. \u041d\u043e \u0441\u0443\u0442\u044c \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u043f\u0440\u0435\u0436\u043d\u0435\u0439: \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c\u0441\u044f \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043c\u0435\u0441\u0442\u0443 \u0432 \u044f\u0434\u0440\u0435 \u0447\u0435\u0440\u0435\u0437 kprobe \u0438\u043b\u0438 XDP-\u0445\u0443\u043a\u0438 \u0432 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430\u0445 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u043e\u0434 \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043a\u0440\u0430\u0439\u043d\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e.<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e BPF \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0442\u0440\u0430\u0434\u0430\u043b \u0438\u0437-\u0437\u0430 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432: \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 LLVM \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c BPF, \u0445\u043e\u0442\u044f \u0447\u0430\u0441\u0442\u044c boilerplate \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0437\u0430 Python\/BCC. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0432 2019 \u0433\u043e\u0434\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f BPFTrace, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u044b\u0439 \u044f\u0437\u044b\u043a, \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043d\u0430 DTrace (\u0447\u0442\u043e \u043d\u0435 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e: \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043e\u0431\u043e\u0438\u0445 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u0411\u0440\u0435\u043d\u0434\u0430\u043d \u0413\u0440\u0435\u0433\u0433). BPFTrace \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 observability. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043e\u0431\u044a\u0451\u043c \u043a\u043e\u0434\u0430 \u043d\u0430 <a href=\"https:\/\/github.com\/iovisor\/bcc\/blob\/master\/libbpf-tools\/tcpconnect.bpf.c\">BCC<\/a> \u0438 <a href=\"https:\/\/github.com\/iovisor\/bpftrace\/blob\/master\/tools\/tcpconnect.bt\">BPFTrace<\/a> \u0434\u043b\u044f \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 TCP-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c: BCC \u0435\u0449\u0451 \u0431\u043e\u043b\u0435\u0435 \u043c\u043e\u043d\u0441\u0442\u0440\u0443\u043e\u0437\u0435\u043d, \u0447\u0435\u043c BPFTrace, \u043f\u0443\u0441\u043a\u0430\u0439 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043e\u043a.<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 eBPF \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0430 \u043d\u0430 \u0438\u0445 \u0431\u0430\u0437\u0435 \u0432\u044b\u0448\u043b\u043e \u043d\u0435\u043c\u0430\u043b\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0441\u0435\u0442\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u043c \u0432 2021 \u0433\u043e\u0434\u0443 eBPF summit \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438\u0437 Alibaba <a href=\"https:\/\/www.youtube.com\/watch?v=Z4qxd5yYoP4\">\u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438<\/a>, \u043a\u0430\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0434\u0435\u043c\u043e\u043d\u0430 \u043f\u043e\u0432\u0435\u0440\u0445 eBPF \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u0438 TCP Retransmissions. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0434 skbtrace \u0432 2019 \u0433\u043e\u0434\u0443, \u044d\u0442\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0435\u0449\u0451 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u044b, \u0430 BPFTrace \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u00ab\u043f\u0440\u043e\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00bb \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c.<\/p>\n<p>  \u041d\u043e \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u0430\u043a\u0435\u0442\u0430 \u2014 \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f, \u0430 \u0443 BPFTrace \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u0431\u043e\u0433\u0430\u0442\u044b\u0439 \u044f\u0437\u044b\u043a. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u0435 \u043f\u0430\u043a\u0435\u0442\u0430, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0431\u0430\u0439\u0442, \u0430 \u0441\u0430\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0434\u043e \u043c\u043e\u043d\u0441\u0442\u0440\u0443\u043e\u0437\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432:<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#include &lt;linux\/skbuff.h> #include &lt;linux\/netdevice.h> #include &lt;\/home\/sklyaus\/xiphdr.h>  k:tcp_gso_segment {     $orig_skb = (sk_buff*) arg0;      printf(\"TCP SEGMENT len %d, features %x dev %s\\n\", $orig_skb->len, arg1,             $orig_skb->dev->name);     printf(\"ORIG SKB len %d hroom %d nhoff %d thoff %d\\n\", $orig_skb->len,             $orig_skb->data - $orig_skb->head, $orig_skb->network_header,             $orig_skb->inner_network_header);      $skbsi = (skb_shared_info*) ($orig_skb->head + $orig_skb->end);     printf(\"SKBSI: nr_frags %d gso size %d\\n\",                     $skbsi->nr_frags, $skbsi->gso_size);      \/* printf(\"%s\", kstack(4)); *\/ }      kretprobe:tcp_gso_segment {     $skb = (sk_buff*) retval;     $idx = 0;      unroll(2) {         if ($skb) {             $addr = $skb->head + $skb->mac_header + 14 \/* ETH *\/;             $out_iph = (xiphdr*) $addr;              $tot_len = ($out_iph->tot_len >> 8) |                         (($out_iph->tot_len &amp; 0xff) &lt;&lt; 8);              printf(\"SEG %d len %d hroom %d nhoff %d thoff %d\\n\", $idx, $skb->len,                     $skb->data - $skb->head, $skb->network_header, $skb->inner_network_header);             printf(\"OUTER: ihl\/ver %x proto %x tot len %6d\\n\",                     $out_iph->ihl_version, $out_iph->protocol, $tot_len);              $skb = $skb->next;         };         $idx = $idx + 1;     };     if ($skb->next) {         printf(\"... more skbs\\n\");     } }<\/code><\/pre>\n<\/div><\/div>\n<p>  \u0415\u0441\u043b\u0438 \u0436\u0435 \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u043a\u0430\u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0438\u043b\u0438 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0422\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043e\u0431\u0451\u0440\u0442\u043a\u0430 <code>yc-bpf-trace<\/code> \u2014 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 Python \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 BPFTrace-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u0438\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u0440\u043e\u0431\u044b \u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0410 \u043f\u043e\u0434 \u0444\u043b\u0430\u0433\u043e\u043c \u0438\u0437\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0442 \u043b\u0435\u0433\u0430\u0441\u0438 \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 Yandex.Cloud, \u043c\u044b \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b\u0438 \u044d\u0442\u0443 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 \u043d\u0430 Go \u0438 \u0432\u044b\u043b\u043e\u0436\u0438\u043b\u0438 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c skbtrace.<\/p>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u043e\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043e\u0432\u0435\u0440\u043b\u0435\u044f: \u043a\u043e\u0433\u0434\u0430 \u043f\u0430\u043a\u0435\u0442 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0435\u0442 \u044f\u0434\u0440\u043e Linux \u0438\u0437 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u2014 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443 \u0438\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u043a\u0430\u043a \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043e\u043d\u0430 \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u00ab\u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u2013 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u00bb, \u043d\u043e \u043c\u044b \u0434\u0443\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0435\u0433\u043e, \u0440\u0430\u0437\u043c\u0435\u0442\u0438\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0431\u044b \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0432 skbtrace.<\/p>\n<p>  \u041d\u0438\u0436\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u044b \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0430, \u0430 \u043f\u043e\u043b\u0435 truesize \u0443 socket buffer \u2014 \u0443\u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u043b\u0438\u043c\u0438\u0442 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u0443 \u0441\u043e\u043a\u0435\u0442\u0430 <code>SO_RCVBUF<\/code> \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0441\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0437\u0430\u043f\u0430\u0441\u043e\u043c (25-\u043a\u0440\u0430\u0442\u043d\u044b\u043c \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u0448\u0435\u0433\u043e Cloud DNS). \u041a\u0441\u0442\u0430\u0442\u0438, truesize \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0437\u0430\u043b\u0435\u0437\u0442\u044c \u0432 \u044f\u0434\u0435\u0440\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 BPFTrace.<\/p>\n<p>  \u041d\u0443 \u0438 \u0447\u0435\u0441\u0442\u043d\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u044e\u0441\u044c: \u043c\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0435\u0449\u0438 \u043b\u0438\u0431\u043e \u0438\u0437-\u0437\u0430 \u0438\u0445 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0438 (\u043a\u0430\u043a \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0431\u0430\u043c\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0444\u043e\u0440\u043a\u0430 TF VRouter), \u0438\u043b\u0438 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0442\u044b\u0434\u043d\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c unroll \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 TCP MSS-\u043e\u043f\u0446\u0438\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0438\u0437 \u043f\u044f\u0442\u0438 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f skbtrace<\/h2>\n<p>  <\/p>\n<h4>\u041a\u0443\u0434\u0430 \u043b\u0435\u0442\u044f\u0442 \u043f\u0430\u043a\u0435\u0442\u044b, \u0432 \u043a\u0430\u043a\u0438\u0435 CloudGate?<\/h4>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/-k\/x5\/d_\/-kx5d__qvzjpfvdealxscldlls8.jpeg\" width=\"40%\" data-src=\"https:\/\/habrastorage.org\/webt\/-k\/x5\/d_\/-kx5d__qvzjpfvdealxscldlls8.jpeg\" data-blurred=\"true\"\/><br \/>  <sup>CloudGate \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u0448 \u0442\u0440\u0430\u0444\u0438\u043a<\/sup><\/p>\n<p>  CloudGate, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0436\u0435 <a href=\"https:\/\/habr.com\/ru\/company\/yandex\/blog\/487694\/\">\u043f\u0438\u0441\u0430\u043b<\/a> <a href=\"https:\/\/habr.com\/ru\/users\/purplepowder\/\" class=\"user_link\">PurplePowder<\/a>, \u2014 \u043e\u043a\u043d\u043e \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043c\u0438\u0440 \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438. \u042d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b, \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432 \u0432\u0438\u0434\u0435 ECMP-\u0433\u0440\u0443\u043f\u043f\u044b. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0432 \u043b\u044e\u0431\u0443\u044e \u0438\u0437 \u043d\u0438\u0445. \u041d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b \u043d\u0430\u0448\u043b\u0438 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443, \u0438\u0437-\u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432 \u0440\u0435\u0434\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0441\u043b\u0443\u0447\u0430\u043b\u0441\u044f \u0441\u0438\u043b\u044c\u043d\u044b\u0439 \u0434\u0438\u0441\u0431\u0430\u043b\u0430\u043d\u0441 \u0432 \u0442\u0430\u043a\u043e\u043c \u0432\u044b\u0431\u043e\u0440\u0435 \u0438 \u043e\u0434\u0438\u043d \u0438\u0437 CloudGate \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u0441\u0435\u043c\u0438\u043a\u0440\u0430\u0442\u043d\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u043d\u0430\u043c \u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u044e: \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 CloudGate. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u043b\u044e\u0447\u043e\u043c \u0431\u044b\u043b \u0431\u044b IP-\u0430\u0434\u0440\u0435\u0441 CloudGate, \u0442\u043e \u0435\u0441\u0442\u044c Destination IP Address \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c IP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435. \u0412\u043e\u0442 \u0442\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u0432 \u043b\u0430\u0431\u0435:<\/p>\n<pre><code class=\"bash\">$ skbtrace aggregate -6 -P xmit -i eth1 -k outer-dst \\      -F 'inner-src == 2a02:6b8:c0e:205:0:417a:0:3da' 2s<\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043a\u0440\u0438\u043d\u043a\u0430\u0441\u0442<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/sz\/ct\/yc\/szctycvidk8ea0zjrntfb6cdybg.gif\"\/><\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h4>\u041e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432<\/h4>\n<p>  \u041f\u043e\u0442\u0435\u0440\u044f\u043d\u043d\u044b\u0439 \u0438\u043b\u0438 dropped-\u043f\u0430\u043a\u0435\u0442 \u2014 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438. \u0417\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438? \u0414\u0440\u043e\u043f. \u041f\u043e\u0433\u0430\u0441\u0438\u043b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443, \u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043b \u043b\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0451 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443? \u0414\u0440\u043e\u043f. \u041a\u0443\u0434\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043c\u0430\u0448\u0438\u043d\u0443 \u043f\u043e\u0434\u043d\u044f\u043b\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e, \u0430 \u043f\u043e\u0442\u0435\u0440\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043b\u0438\u0441\u044c. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0438 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043d\u0435 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u0435\u0442 \u043b\u0438 \u043e\u043d\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043d\u0438\u043c\u0430\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0434\u0440\u043e\u043f\u043d\u0443\u0442\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0441 \u0442\u0430\u043a\u0438\u043c IP-\u0430\u0434\u0440\u0435\u0441\u043e\u043c \u0438 \u043f\u0440\u0430\u0432\u0434\u0430 \u043d\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430.<\/p>\n<p>  \u0417\u0430\u043c\u0435\u0447\u0443, \u0447\u0442\u043e BPFTrace \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0432 \u043f\u043e\u0441\u0442\u043c\u043e\u0440\u0442\u0435\u043c-\u0430\u043d\u0430\u043b\u0438\u0437\u0435: \u0435\u0441\u043b\u0438 \u043f\u043e\u0442\u0435\u0440\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u043b\u0438\u0441\u044c \u043c\u0438\u043d\u0443\u0442\u0443 \u043d\u0430\u0437\u0430\u0434, \u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u0443\u0436\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043a\u0430\u0436\u0435\u0442. \u041d\u043e \u0438 \u043d\u0430\u0442\u0443\u0440\u0430 \u0434\u0440\u043e\u043f\u043e\u0432 \u0442\u0430\u043a\u043e\u0432\u0430, \u0447\u0442\u043e \u0438\u0445 \u043b\u0443\u0447\u0448\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0430 \u043d\u0430 \u0434\u0440\u043e\u043f\u043d\u0443\u0442\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b. \u0421 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0445\u043e\u0434 \u0441 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u043c \u0432 \u0446\u0435\u043b\u043e\u043c \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d.<\/p>\n<p>  \u041d\u043e \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0438\u0436\u0435 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 Linux Netfilter. BPFTrace \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, skbtrace \u0443\u043c\u0435\u044e\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c kernel stack, \u0438 \u043f\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>nf_hook_slow<\/code> \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u0434\u0440\u043e\u043f\u043e\u0432 \u2014 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440:<\/p>\n<pre><code class=\"plaintext\">$ skbtrace dump -6 -P free -F 'dst == 2a02:6b8:c0e:205:0:417a:0:3da' -K -o ipv6  Attaching 2 probes... 01:55:29.118794463 - kprobe:kfree_skb IPV6: priority_version 66 payload_len 40 IPV6: nexthdr 6 hop_limit 51 src 2a02:6b8:bf00:300:9cbe:4ff:fea9:b3de dst 2a02:6b8:c0e:205:0:417a:0:3da          kfree_skb+1         nf_hook_slow+192         br_nf_forward_ip+1101         nf_hook_slow+95         __br_forward+361         ...<\/code><\/pre>\n<p>  <code>kfree_skb<\/code> \u2014 \u044d\u0442\u043e \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u0435 socket buffer. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u0432\u043e\u0451\u043c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 iptables \u2014 \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u0435, \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0435\u0451 \u0441 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e\u0449\u0435\u0433\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0435.<\/p>\n<h4>\u0422\u0430\u0440\u0433\u0435\u0442\u044b \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0435 \u0437\u0430 \u0441\u043e\u0442\u043d\u0438 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434<\/h4>\n<p>  \u0421\u0440\u0435\u0434\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u0431\u043b\u0430\u043a\u0430 \u0435\u0441\u0442\u044c \u0442\u0435, \u043a\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u0435\u043d \u043a \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430\u043c. \u0412 \u0446\u0435\u043b\u043e\u043c, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 healthchecks \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0442\u0441\u0435\u043a\u0430\u0442\u044c \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u0436 \u043d\u0435\u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0435 \u0442\u0430\u0440\u0433\u0435\u0442\u044b, \u043d\u043e \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445? \u0422\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043b\u043e\u0432\u0438\u0442\u044c \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 handshake. \u041f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043c\u0435\u0436\u0434\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u043f\u0435\u0440\u0432\u043e\u0433\u043e SYN \u043f\u0430\u043a\u0435\u0442\u0430 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e (\u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438) ACK-\u043f\u0430\u043a\u0435\u0442\u0430, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0443 \u043d\u0438\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 five tuple.<\/p>\n<p>  \u0412\u0440\u0435\u043c\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c\u044b\u043c\u0438 \u043f\u043e \u043a\u043b\u044e\u0447\u0443, \u043c\u043e\u0436\u043d\u043e \u043b\u043e\u0432\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>skbtrace timeit from ... to ...<\/code> (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0430\u043b\u0438\u0430\u0441: <code>skbtrace timeit handshake --ingress<\/code>). \u0410 \u0432\u043e\u0442 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u043b\u0443\u0447\u0448\u0435 \u043b\u043e\u0432\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0434\u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>outliers<\/code>. <code>aggregate -f hist<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0434\u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0438\u0434\u043d\u043e: \u043e\u0434\u0438\u043d five tuple handshake \u0437\u0430\u043d\u044f\u043b \u0431\u043e\u043b\u044c\u0448\u0435 256 \u043c\u0441 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e skbtrace \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u0432\u0441\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0430 \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u043d\u0430\u0445, \u0442\u043e \u0435\u0441\u0442\u044c 256K = 256 000 \u043c\u043a\u0441 = 256 \u043c\u0441):<\/p>\n<pre><code class=\"plaintext\">$ skbtrace timeit tcp handshake -i tapa7kkobaif-1 --ingress  Attaching 5 probes... 12:21:54 @: [512, 1K)              1 |@@@@@@@@@@@@@@@@@@@@@@@@@@                          | [1K, 2K)               0 |                                                    | [2K, 4K)               0 |                                                    | [4K, 8K)               0 |                                                    | [8K, 16K)              0 |                                                    | [16K, 32K)             0 |                                                    | [32K, 64K)             2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| [64K, 128K)            0 |                                                    | [128K, 256K)           0 |                                                    | [256K, 512K)           1 |@@@@@@@@@@@@@@@@@@@@@@@@@@                          |  $ skbtrace timeit tcp handshake -i tapa7kkobaif-1 --ingress outliers -o ip -o tcp  Attaching 4 probes... TIME: 152467 us 12:22:19.670245756 - kprobe:dev_queue_xmit IP: ihl\/ver 45 tot_len 52 frag_off 0 (- DF) check 4643 IP: id 23291 ttl 62 protocol 6 saddr 100.64.117.131 daddr 192.168.1.26 TCP: source 45972 dest 80 check 3a5e TCP: seq 1558770843 ack_seq 693522456 doff 8 win 229 TCP: flags -A---<\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>tc qdisc change dev eth1 root netem delay 1ms 100ms distribution paretonormal<\/code>. \u0412 \u0446\u0435\u043b\u043e\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u0443 \u0436\u0435 \u043f\u043e\u0434\u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043d\u043e \u0434\u043b\u044f <code>--egress<\/code>, \u043c\u043e\u0436\u043d\u043e \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u2014 \u0438 \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e.<\/p>\n<h4>\u041e\u0445\u043e\u0442\u0430 \u043d\u0430 \u0440\u0435\u0442\u0440\u0430\u043d\u0441\u043c\u0438\u0442\u044b<\/h4>\n<p>  \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0441 \u044d\u0442\u043e\u0439 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0439 \u0447\u0451\u0440\u043d\u043e\u0439 \u043f\u043e\u043b\u043e\u0441\u043a\u043e\u0439 \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 Wireshark \u0438 \u0440\u043e\u0437\u043e\u0432\u0430\u0442\u044b\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438: TCP Retransmission. \u041d\u043e tcpdump \u0435\u0449\u0451 \u043d\u0430\u0434\u043e \u0441\u043d\u044f\u0442\u044c, \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0430 \u043d\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u043e\u0443\u0442\u0435\u0440\u0430 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0435\u0442\u0440\u0430\u043d\u0441\u043c\u0438\u0442\u0430. \u0412 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0442\u0440\u0430\u043d\u0441\u043c\u0438\u0442 \u2014 \u044d\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 ACK-\u043f\u0430\u043a\u0435\u0442 \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 sequence number, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u043e five tuple. \u0422\u043e \u0435\u0441\u0442\u044c \u043d\u0430\u0434\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>timeit<\/code>, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u043d\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u043a\u043b\u044e\u0447\u043e\u043c, \u043d\u043e \u043d\u0435 \u0437\u0430\u043c\u0435\u0440\u044f\u043b\u0430 \u0432\u0440\u0435\u043c\u044f, \u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u0430, \u0430 \u043f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u0440\u043e\u043f\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 SYN-\u043f\u0430\u043a\u0435\u0442 \u0432 TCP-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e iptables \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0443\u044e \u043f\u043e\u0441\u044b\u043b\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u043a\u0443\u043d\u0434\u0443:<\/p>\n<pre><code class=\"plaintext\">$ skbtrace timeit tcp retransmit -i tapa7kkobaif-1 --ingress -o ip -o tcp  Attaching 3 probes... DUPLICATE EVENT TIME: 998231 us 10:56:25.222838145 - kprobe:dev_queue_xmit IP: ihl\/ver 45 tot_len 60 frag_off 0 (- DF) check be7e IP: id 58039 ttl 62 protocol 6 saddr 100.64.117.131 daddr 192.168.1.26 TCP: source 45570 dest 80 check 5449 TCP: seq 850649414 ack_seq 0 doff 10 win 29200 TCP: flags S----<\/code><\/pre>\n<p>  \u041e\u0431\u044b\u0447\u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0440\u0435\u0442\u0440\u0430\u043d\u0441\u043c\u0438\u0442\u044b \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u0448\u0438\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u043e\u0443\u0442\u0435\u0440\u043e\u043c. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u043e\u0432\u043e\u0434 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u0442\u0435\u0440\u0438.<\/p>\n<h4>DNS \u0438 UdpInErrors<\/h4>\n<p>  BPFTrace (\u0438 skbtrace) \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043d\u043e \u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0432 \u044f\u0434\u0440\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u0448 \u043d\u043e\u0432\u044b\u0439 DNS \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 Receive Buffer \u0432 ~100 \u041c\u0411. \u0418\u043d\u0430\u0447\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438 \u043f\u043e\u0442\u0435\u0440\u0438 UdpInErrors \u0438\u0437-\u0437\u0430 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0438 \u043c\u0435\u0441\u0442\u0430 \u0432 \u0431\u0443\u0444\u0435\u0440\u0435 \u0447\u0442\u0435\u043d\u0438\u044f. \u0414\u0435\u043b\u043e \u043d\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u0447\u0438\u0442\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043b\u0438 \u0443 \u043d\u0435\u0433\u043e \u0442\u0430\u043a\u0430\u044f \u043a\u043e\u043b\u043e\u0441\u0441\u0430\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430. \u041f\u0440\u043e\u0441\u0442\u043e \u044f\u0434\u0440\u043e Linux \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0431\u0443\u0444\u0435\u0440\u044b \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u0447\u0435\u043c \u043d\u0443\u0436\u043d\u043e, \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u0430\u0436\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0438\u043b\u043e\u0431\u0430\u0439\u0442 \u0434\u043b\u044f \u0441\u0442\u043e\u0431\u0430\u0439\u0442\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430. \u042d\u0442\u043e \u0432\u0438\u0434\u043d\u043e, \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>truesize<\/code>: \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u0434\u043b\u044f 113-\u0431\u0430\u0439\u0442\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 700%:<\/p>\n<pre><code class=\"plaintext\">$ skbtrace dump -P recv -F 'dport == 53' -p udp -o layout Attaching 2 probes... 09:24:58.304536041 - kprobe:netif_receive_skb_internal LAYOUT: hroom 78 hlen 113 mac hoff 64 net hoff 78 trans hoff 98 LAYOUT: len 113 data_len 0 troom -129 truesize 896<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u0430\u0436\u0435 \u0432 \u043d\u0430\u0448\u0435\u0439 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u0438 \u0443 DNS-\u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c <code>SO_RCVBUF<\/code> \u0441 8-\u043a\u0440\u0430\u0442\u043d\u044b\u043c \u0437\u0430\u043f\u0430\u0441\u043e\u043c, \u0430, \u043a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u0432 PROD-\u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0441\u044f 25-\u043a\u0440\u0430\u0442\u043d\u044b\u0439 \u0437\u0430\u043f\u0430\u0441. \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u043d\u0430 UdpInErrors, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0430\u043c \u0442\u043e\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u043d\u0430 socket buffers.<\/p>\n<h4>\u0412\u043c\u0435\u0441\u0442\u043e \u043b\u043e\u0436\u043a\u0438 \u0434\u0451\u0433\u0442\u044f<\/h4>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e BPFTrace \u2014 \u043d\u0435 \u0441\u0435\u0440\u0435\u0431\u0440\u044f\u043d\u0430\u044f \u043f\u0443\u043b\u044f, \u0438 \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0441 \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u0435\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u0430 \u0432 skbtrace \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u00ab\u043f\u043e\u0434\u043f\u043e\u0440\u043a\u0438\u00bb \u0434\u043b\u044f \u043d\u0438\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u043d \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0431\u0438\u0442\u043e\u0432\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u0445. \u0414\u0430, \u043c\u044b \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c BTF \u0438 \u043f\u043e\u0442\u043e\u043c\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438.<\/p>\n<p>  \u041c\u044b \u043d\u0435 \u0440\u0438\u0441\u043a\u043d\u0443\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u044b \u0438 \u043e\u0444\u043e\u0440\u043c\u043b\u044f\u0442\u044c skbtrace \u0432 \u0432\u0438\u0434\u0435 \u0434\u0435\u043c\u043e\u043d\u0430, \u043e\u043f\u0430\u0441\u0430\u044f\u0441\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u041d\u043e \u044d\u0442\u0438 \u0441\u0442\u0440\u0430\u0445\u0438 \u043d\u0435 \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043b\u0438\u0441\u044c. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043a\u043e\u043b\u043b\u0435\u0433\u0438 \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u044b CloudGate \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u0434\u0435\u043c\u043e\u043d. \u041d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0434\u0435\u043c\u043e\u043d \u0438 BPFTrace \u043d\u0435\u043b\u044c\u0437\u044f \u2014 \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435, \u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0432 \u043d\u0430\u0448\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u044f\u0434\u0440\u0430.<\/p>\n<p>  C\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 skbtrace, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0435\u043d \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 tcpdump, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043c\u0435\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043d\u0430\u0440\u0435\u0437\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0442\u0430\u043c, \u0433\u0434\u0435 skbtrace \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430\u0445. \u0417\u0430\u0442\u043e \u043e\u043d \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u0431\u044b\u0441\u0442\u0440: \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u00ab\u0434\u043e \u0441\u0432\u0438\u0434\u0430\u043d\u0438\u044f\u00bb \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u043d\u044b\u043c pcap-\u0444\u0430\u0439\u043b\u0430\u043c.<\/p>\n<p>  \u0423\u0442\u0438\u043b\u0438\u0442\u0430 <a href=\"https:\/\/github.com\/yandex-cloud\/skbtrace\">\u0432\u044b\u043b\u043e\u0436\u0435\u043d\u0430 \u043d\u0430 GitHub<\/a>. \u041f\u0440\u0438\u043d\u043e\u0441\u0438\u0442\u0435 \u0441\u0432\u043e\u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 Issues \u0438 Pull Requests.<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/yandex\/blog\/646297\/\"> https:\/\/habr.com\/ru\/company\/yandex\/blog\/646297\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0421\u0435\u0440\u0433\u0435\u0439 \u041a\u043b\u044f\u0443\u0441, \u0438 \u044f \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u044e \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0440\u0430\u0437\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u0445 \u0432 Yandex.Cloud. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u043e\u0431\u043b\u0430\u043a\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b: \u043c\u044b \u043d\u0435 \u0432\u0438\u0434\u0438\u043c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e TCP retransmissions, \u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0434\u0430\u043c\u043f\u044b \u0432\u0441\u0435\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e tcpdump \u0434\u043e\u0440\u043e\u0433\u043e \u0438 \u0442\u0440\u0443\u0434\u043d\u043e \u0438\u0437-\u0437\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.   <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/h4\/nu\/xw\/h4nuxwyl2oj9w81uchr0aofjjsi.jpeg\" width=\"80%\" data-src=\"https:\/\/habrastorage.org\/webt\/h4\/nu\/xw\/h4nuxwyl2oj9w81uchr0aofjjsi.jpeg\" data-blurred=\"true\"\/><\/div>\n<p>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0435 \u043e\u0442 \u0434\u0432\u0443\u0445 \u043c\u0438\u0440\u043e\u0432: \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u0430 \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u0434\u0435 \u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0442\u0435\u043b\u043e \u043f\u0430\u043a\u0435\u0442\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 TCP-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0443 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 managed-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0442\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 UDP-\u043f\u0430\u043a\u0435\u0442\u044b. \u0413\u0438\u043f\u043e\u0442\u0435\u0437\u0430 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0430 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u044f, \u0445\u043e\u0442\u044f \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0440\u043e\u0441\u0442\u043e\u043c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u0441\u0431\u043e\u0435\u043c \u0431\u044b\u043b\u0430 \u043f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430. \u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c Linux \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 eBPF \u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 BPFTrace, \u043d\u043e \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043c\u044b \u043d\u0430\u043a\u043e\u043f\u0438\u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043e\u0431\u0451\u0440\u0442\u043a\u0443 \u043d\u0430\u0434 BPFTrace. \u041e\u043d\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f skbtrace \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 <a href=\"https:\/\/github.com\/yandex-cloud\/skbtrace\">\u043d\u0430 GitHub<\/a>. \u041f\u0440\u043e \u043d\u0435\u0451 \u044f \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-328297","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328297","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=328297"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328297\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=328297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=328297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=328297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}