{"id":6617,"date":"2025-07-22T12:20:11","date_gmt":"2025-07-22T09:20:11","guid":{"rendered":"https:\/\/skeletor.org.ua\/?p=6617"},"modified":"2025-07-22T12:20:11","modified_gmt":"2025-07-22T09:20:11","slug":"dtrace-curpsinfo-pr_psargs","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=6617","title":{"rendered":"[Dtrace] curpsinfo->pr_psargs"},"content":{"rendered":"\n<p>\u0414\u043b\u044f \u0447\u043e\u0433\u043e \u0432\u0437\u0430\u0433\u0430\u043b\u0456 \u0446\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0456\u044f? \u0410 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0449\u043e\u0431 \u0432\u0438\u0437\u043d\u0430\u0447\u0438\u0442\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0438 \u0437 \u044f\u043a\u0438\u043c\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0454\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0430. \u0426\u0435 \u0431\u0443\u0432\u0430\u0454 \u0434\u0443\u0436\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u043e. \u0422\u0430\u043a \u043e\u0442, \u0454 \u0434\u0435\u044f\u043a\u0456 \u043d\u044e\u0430\u043d\u0441\u0438 \u0442\u0430 \u0432\u0456\u0434\u043c\u0456\u043d\u043d\u043e\u0441\u0442\u0456 \u0432 \u0440\u043e\u0431\u043e\u0442\u0456 \u043d\u0430 \u0440\u0456\u0437\u043d\u0438\u0445 \u041e\u0421.<\/p>\n\n\n\n<p>\u041e\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u0438\u0439 \u043f\u0440\u0438\u043a\u043b\u0430\u0434 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f:<\/p>\n\n\n<pre>\n#!\/usr\/sbin\/dtrace -s\n#pragma D option quiet\nproc:::exec-success\n{\n     printf(\"%s\", curpsinfo->pr_psargs);\n}\n<\/pre>\n<p><!--more--><\/p>\n\n\n<h2 class=\"wp-block-heading\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#da610e\" class=\"has-inline-color\">Solaris<\/mark><\/h2>\n\n\n\n<p>\u0422\u0443\u0442 \u0434\u0456\u0454 \u0436\u043e\u0440\u0441\u0442\u043a\u0435 \u043e\u0431\u043c\u0435\u0436\u0435\u043d\u043d\u044f \u0443 <strong>80<\/strong> \u0441\u0438\u043c\u0432\u043e\u043b\u0456\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0447\u0438 \u0456 \u0448\u043b\u044f\u0445 \u0434\u043e \u0441\u0430\u043c\u043e\u0457 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0438, \u044f\u043a\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0435 \u0443 \u0444\u0430\u0439\u043b\u0456 <strong>sys\/procfs.h<\/strong><\/p>\n\n\n<pre>\n#define PRARGSZ         80      \/* number of chars of arguments *\/\ntypedef struct psinfo {\n...\nchar    pr_psargs[PRARGSZ];     \/ initial characters of arg list *\/\n...\n}\n<\/pre>\n\n\n<h2 class=\"wp-block-heading\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#da610e\" class=\"has-inline-color\">FreeBSD<\/mark><\/h2>\n\n\n\n<p>\u0410 \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u0430 \u043c\u0456\u043d\u044f\u0442\u0438 \u0446\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f \u0447\u0435\u0440\u0435\u0437 <strong>sysctl <\/strong>\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>kern.ps_arg_cache_limit <\/strong>(\u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c <strong>256<\/strong>)<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u043b\u044f \u0447\u043e\u0433\u043e \u0432\u0437\u0430\u0433\u0430\u043b\u0456 \u0446\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0456\u044f? \u0410 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0449\u043e\u0431 \u0432\u0438\u0437\u043d\u0430\u0447\u0438\u0442\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0438 \u0437 \u044f\u043a\u0438\u043c\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0454\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0430. \u0426\u0435 \u0431\u0443\u0432\u0430\u0454 \u0434\u0443\u0436\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u043e. \u0422\u0430\u043a \u043e\u0442, \u0454 \u0434\u0435\u044f\u043a\u0456 \u043d\u044e\u0430\u043d\u0441\u0438 \u0442\u0430 \u0432\u0456\u0434\u043c\u0456\u043d\u043d\u043e\u0441\u0442\u0456 \u0432 \u0440\u043e\u0431\u043e\u0442\u0456 \u043d\u0430 \u0440\u0456\u0437\u043d\u0438\u0445 \u041e\u0421. \u041e\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u0438\u0439 \u043f\u0440\u0438\u043a\u043b\u0430\u0434 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f: #!\/usr\/sbin\/dtrace -s #pragma D option quiet proc:::exec-success { printf(&#8220;%s&#8221;, curpsinfo->pr_psargs); }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,10,24],"tags":[],"class_list":["post-6617","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-others","category-solaris"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/6617","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6617"}],"version-history":[{"count":1,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/6617\/revisions"}],"predecessor-version":[{"id":6618,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/6617\/revisions\/6618"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6617"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6617"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6617"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}