A typical hack with strace command which traces a ping command

ABOUT strace

strace is a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state. The operation of strace is made possible by the kernel feature known as ptrace.

TYPICAL strace COMMAND RELATED
[bash]
$sudo strace -c -p `pidof ping`
strace: Process 4792 attached
% time seconds usecs/call calls errors syscall
—— ———– ———– ——— ——— —————-
43.34 0.001631 203 8 sendto
24.79 0.000933 116 8 1 recvmsg
16.40 0.000617 56 11 write
13.13 0.000494 70 7 poll
1.44 0.000054 54 1 restart_syscall
0.90 0.000034 34 1 1 rt_sigreturn
—— ———– ———– ——— ——— —————-
100.00 0.003763 36 2 total
$

[/bash]
LINK
https://en.wikipedia.org/wiki/Strace
https://www.tecmint.com/strace-commands-for-troubleshooting-and-debugging-linux/