码迷,mamicode.com
首页 > 其他好文 > 详细

strace 使用

时间:2018-03-18 16:22:11      阅读:203      评论:0      收藏:0      [点我收藏+]

标签:tac   flags   f_getfl   start   hand   rac   pos   not   oca   

[root@db01 init.d]# strace -o output.txt -T -tt -e trace=all -p 5465
Process 5465 attached
^CProcess 5465 detached
[root@db01 init.d]# cat output.txt
14:25:27.133521 restart_syscall(<... resuming interrupted call ...>) = 1 <17.912696>
14:25:45.046559 fcntl(16, F_GETFL)      = 0x2 (flags O_RDWR) <0.000007>
14:25:45.046609 fcntl(16, F_SETFL, O_RDWR|O_NONBLOCK) = 0 <0.000006>
14:25:45.046640 accept(16, {sa_family=AF_LOCAL, NULL}, [2]) = 37 <0.000012>
14:25:45.046685 fcntl(16, F_SETFL, O_RDWR) = 0 <0.000006>
14:25:45.046814 setsockopt(37, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported) <0.000007>
14:25:45.046868 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f761948d000 <0.000010>
14:25:45.046909 mprotect(0x7f761948d000, 4096, PROT_NONE) = 0 <0.000008>
14:25:45.046937 clone(child_stack=0x7f76194ccfd0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f76194cd9d0, tls=0x7f76194cd700, child_tidptr=0x7f76194cd9d0) = 5502 <0.000056>
14:25:45.047054 poll([{fd=14, events=POLLIN}, {fd=16, events=POLLIN}], 2, -1 <detached ...>

strace 使用

标签:tac   flags   f_getfl   start   hand   rac   pos   not   oca   

原文地址:https://www.cnblogs.com/gaoyuechen/p/8595378.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!