Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see system call that executed in current time by process?

Tags:

linux

strace

Linux utility "strace" show the list of syscall that started after run of strace. How I can see syscall that run in current moment by process? before start of strace.

like image 396
Dmity P. Avatar asked Mar 08 '17 17:03

Dmity P.


1 Answers

proc offers some information about what the kernel is currently doing "for" a process
/proc/${pid}/syscall /proc/${pid}/stack

More information:

  • http://man7.org/linux/man-pages/man5/proc.5.html
  • http://blog.tanelpoder.com/2013/02/21/peeking-into-linux-kernel-land-using-proc-filesystem-for-quickndirty-troubleshooting/
like image 130
Catalin Avatar answered Nov 01 '22 15:11

Catalin