The /proc/PID/syscall file on procfs-enabled systems contains information about the last system call executed by the specified process (PID).
% sudo cat /proc/self/syscall 0 0x3 0x7f02d8550000 0x20000 0x7f02d8583b60 0xffffffff 0x0 0x7ffe76c52318 0x7f02d866c21d
The first field in the output refers to the syscall, and may be “-1” if the program is blocked, or “running” in some cases. The additional fields refer to arguments 1-6 of the syscall. The last two fields refer to the stack pointer and instruction pointer addresses.
https://man7.org/linux/man-pages/man5/proc_pid_syscall.5.html