既存のプロセスが何をやっているかをトレースできる $ sudo strace -p 7938 strace: Process 7938 attached ppoll([{fd=4, events=POLLIN}, {fd=4, events=0}, {fd=11, events=POLLIN}, {fd=7, events=POLLIN}], 4, NULL, [], 8) = 1 ([{fd=11, revents=POLLIN}]) rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0 read(11, "strace: Process 7938 attached\r\np"..., 32768) = 228 getrandom("\x44\x68\x6c\xac\x9d\x90\xa5\x7d\x08\x88", 10, 0) = 10 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 ppoll([{fd=4, events=POLLIN}, {fd=4, events=POLLOUT}, {fd=11, events=POLLIN}, {fd=7, events=POLLIN}], 4, NULL, [], 8) = 2 ([{fd=4, revents=POLLOUT}, {fd=11, revents=POLLIN}]) rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0 read(11, "read(11, \"strace: Process 7938 a"..., 32768) = 405 write(4, ">O\300sT@\265[\24\274Q\336\225\232m\333j\376\222\2328:\343\251,\23`#\2523J\366"..., 268) = 268 getrandom("\xe5\x4f\xed\x03\xd0\x0a\x8f\xf5\xd1", 9, 0) = 9 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 ppoll([{fd=4, events=POLLIN}, {fd=4, events=POLLOUT}, {fd=11, events=POLLIN}, {fd=7, events=POLLIN}], 4, NULL, [], 8) = 2 ([{fd=4, revents=POLLOUT}, {fd=11, revents=POLLIN}]) rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0 read(11, "read(11, \"read(11, \\\"strace: Pro"..., 32768) = 504 write(4, "m\36\274\202\321\246c\243\330\305t\333\376u\311B&,Z#\220\216]\366i\332\3244q\37\315\34"..., 444) = 444 getrandom("\xaf\x3c\x36\x18\xf6\x38", 6, 0) = 6 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0