
{"id":16378,"date":"2015-05-12T13:27:08","date_gmt":"2015-05-12T13:27:08","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=16378"},"modified":"2015-05-12T13:27:08","modified_gmt":"2015-05-12T13:27:08","slug":"trace-all-system-calls-which-involve-process-management","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2015\/05\/12\/trace-all-system-calls-which-involve-process-management\/","title":{"rendered":"Example for &#8211; Trace all system calls which involve process management"},"content":{"rendered":"<pre>\n$strace  -e trace=process  python dig.py \nexecve(\"\/usr\/bin\/python\", [\"python\", \"dig.py\"], [\/* 39 vars *\/]) = 0\narch_prctl(ARCH_SET_FS, 0x7feb563b4700) = 0\nI think lscpu command is using proc filesystem to get data.\n\/* \/sys paths *\/\n#define _PATH_SYS_SYSTEM        \"\/sys\/devices\/system\"\n#define _PATH_SYS_CPU           _PATH_SYS_SYSTEM \"\/cpu\"\n#define _PATH_SYS_NODE          _PATH_SYS_SYSTEM \"\/node\"\n#define _PATH_PROC_XEN          \"\/proc\/xen\"\n#define _PATH_PROC_XENCAP       _PATH_PROC_XEN \"\/capabilities\"\n#define _PATH_PROC_CPUINFO      \"\/proc\/cpuinfo\"\n#define _PATH_PROC_PCIDEVS      \"\/proc\/bus\/pci\/devices\"\n#define _PATH_PROC_SYSINFO      \"\/proc\/sysinfo\"\n#define _PATH_PROC_STATUS       \"\/proc\/self\/status\"\n#define _PATH_PROC_VZ   \"\/proc\/vz\"\n#define _PATH_PROC_BC   \"\/proc\/bc\"\n#define _PATH_PROC_DEVICETREE   \"\/proc\/device-tree\"\n#define _PATH_DEV_MEM           \"\/dev\/mem\"\n\nNumber of commands found is :  0\nexit_group(0)                           = ?\n+++ exited with 0 +++\n$man strace\n$man strace\n$\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>$strace -e trace=process python dig.py execve(&#8220;\/usr\/bin\/python&#8221;, [&#8220;python&#8221;, &#8220;dig.py&#8221;], [\/* 39 vars *\/]) = 0 arch_prctl(ARCH_SET_FS, 0x7feb563b4700) = 0 I think lscpu command is using proc filesystem to get data. \/* \/sys paths *\/ #define _PATH_SYS_SYSTEM &#8220;\/sys\/devices\/system&#8221; #define _PATH_SYS_CPU _PATH_SYS_SYSTEM &#8220;\/cpu&#8221; #define _PATH_SYS_NODE _PATH_SYS_SYSTEM &#8220;\/node&#8221; #define _PATH_PROC_XEN &#8220;\/proc\/xen&#8221; #define _PATH_PROC_XENCAP _PATH_PROC_XEN &#8220;\/capabilities&#8221; #define _PATH_PROC_CPUINFO &#8220;\/proc\/cpuinfo&#8221; #define &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2015\/05\/12\/trace-all-system-calls-which-involve-process-management\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Example for &#8211; Trace all system calls which involve process management&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83],"tags":[1496],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/16378"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=16378"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/16378\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=16378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=16378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=16378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}