unix系统调用监视器 [英] unix system call monitor
本文介绍了unix系统调用监视器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何监视进程的系统调用?
how to monitor system calls for a process?
推荐答案
检查 strace
在最简单的情况下,strace运行指定命令,直到它退出。它拦截并记录由进程调用的系统调用和进程接收到的信号。每个系统调用的名称,其参数及其返回值都以标准错误或-o选项指定的文件打印。
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.
这篇关于unix系统调用监视器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文