Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unix system call monitor

how to monitor system calls for a process?

like image 481
William Wong Avatar asked Dec 22 '22 10:12

William Wong


1 Answers

Check strace

In the simplest case strace runs the specified command until it exits. It intercepts and records the system calls which are called by a process and the signals which are received by a process. The name of each system call, its arguments and its return value are printed on standard error or to the file specified with the -o option.

Each line in the trace contains the system call name, followed by its arguments in parentheses and its return value.

like image 75
nik Avatar answered Dec 27 '22 06:12

nik