命令用法
strace用法
ps aux|grep agent_udp.py # 查出主进程号
strace -p 15757 -f
strace: Process 15757 attached with 3 threads # 提示主进程里面有3个线程
[pid 15763] select(0, NULL, NULL, NULL, {217, 929573} <unfinished ...>
[pid 15762] select(0, NULL, NULL, NULL, {223, 169004} <unfinished ...>
[pid 15757] recvfrom(5, <unfinished ...>
[pid 15763] <... select resumed> ) = 0 (Timeout)
[pid 15763] stat("/home/opvis/opvis_agent/agent_service/agent.lock", {st_mode=S_IFREG|0664, st_size=18, ...}) = 0
[pid 15763] open("/home/opvis/opvis_agent/agent_service/agent.lock", O_RDONLY) = 6
.........