Linuxã§strace, FreeBSDã§ktraceãCè¨èª ã·ã¹ãã ã³ã¼ã«ã®ãããã°æ¹æ³ãæ¢ãã¦ãããstarceãªããã®ãããã¾ããã ã§ãLinuxã®ã¿ã§ãã使ããªãã®ã§ãããã²ã¨æ¢ããããFreeBSDã«ã¯ktraceãªããã®ã åå¨ãããã¨ãå¤æã ãnetstat -f inetãã¨ããã³ãã³ãããã¬ã¼ã¹ããããã¨ããå ´åã®ä»¥ä¸ä½¿ãæ¹ã§ãã ktrace netstat -f inet > /dev/null ktrace -C kdump > netstat.log ä¸è¡ç®ã§ktraceãéå§ãã¾ããæ¨æºåºåã¯æ¨ã¦ã¾ãã 2è¡ç®ã¯å¿µã®ãããã¬ã¼ã¹ãã¹ãããã 3è¡ç®ã¯çµæãåºåãã¾ãã ã¡ãªã¿ã«ã«ã¼ãã¦ã¼ã¶ä»¥å¤ã ã¨ã·ã¹ãã ã³ã¼ã«ã¯ãexecveãã§çµäºã«ãªã£ã¦ãã¾ãã®ã§ã注æãã ããã
Cè¨èªãPSã³ãã³ãã®ã½ã¼ã¹ãèªãã ã½ã¼ã¹ã³ã¼ããèªãã·ãªã¼ãºãWIKIã«ã¾ã¨ãã¦ããã¾ãããããã¾ããªãã®ãã¨ã³ããªãã¦ããããã®ã§ãã¡ãã«ã追è¨ãã¾ãã psã³ãã³ãã®ã½ã¼ã¹ã³ã¼ããèªã¿ã¾ãããèã¯kvm(kernel virtual memory)é¢é£ã§ãããã®æ å ±ãèªã¿åãã¤ã³ã¼ã«ãpsã³ãã³ãã§ããã»ã¹ã表示ããããã¨ãããã¨ã«ãªãã¾ãã ãµã³ãã«ã¯ä»¥ä¸ã #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <kvm.h> #include <paths.h> #include <sys/param.h> #include <sys/sysctl.h> #include <sys/user.h> int main(void){ kvm_t *kd; struct kinfo_proc *kp;
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}