Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs_watcher增加-p参数,用于监控指定pid的写操作 #943

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

wxmzy88
Copy link
Contributor

@wxmzy88 wxmzy88 commented Nov 29, 2024

描述:
fs_watcher -w跟踪所有进程的写,系统中写太多信息刷屏,因此加一个pid参数,用于指定进程号,只打印指定进程的写信息

测试方式:
1.编写一个测试程序write.c,用于往一个测试文件中写一段内容,持续时间50s,该程序的pid用于测试fs_watcher -w -p 进程号。write.c的内容如下:
cafbd3ce89ef8944ada9f5d375db104
对write.c进行编译后,执行该程序即可:./write
2.查看write程序的进程号,本次测试中进程号为73741,然后执行:./fs_watcher -w -p 73741:
933a858f0ee3f4db8fe2a53df247741
3.查看监控结果,只有指定的进程73741的写信息显示:
1d3827a1569f59cdb6b2ca74370d9da

@wxmzy88
Copy link
Contributor Author

wxmzy88 commented Dec 4, 2024

@ziyangfu @LinkinPF @chenamy2017 麻烦几位有时间审核一下pr,谢谢

@chenamy2017 chenamy2017 merged commit 5a3655f into linuxkerneltravel:develop Dec 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants