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

How to get uftrace data before the process terminates? #1941

Open
qiuxinyun2010 opened this issue Jul 4, 2024 · 3 comments
Open

How to get uftrace data before the process terminates? #1941

qiuxinyun2010 opened this issue Jul 4, 2024 · 3 comments

Comments

@qiuxinyun2010
Copy link

I run an agent for a daemon process. I want to use the uftrace.data for report or generate graph before killing the daemon process。

@namhyung
Copy link
Owner

namhyung commented Jul 5, 2024

Try uftrace -p $PID --trigger .@finish.

@qiuxinyun2010
Copy link
Author

Try uftrace -p $PID --trigger .@finish.

termnial1:
uftrace record -P main -l -g app
If pid is 26709
termnial2:
uftrace -p 26709 --trigger .@finish
uftrace replay
show
WARN: cannot open record data: uftrace.data: No such file or directory

When I
kill 26709
uftrace replay works and show result.

@namhyung
Copy link
Owner

namhyung commented Jul 8, 2024

Ok, I think you need to terminate uftrace record process after hitting the finish trigger.

Try this again in terminal2:

$ uftrace -p $PID -T .@finish
$ kill -S INT `pidof uftrace`
$ uftrace replay

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

No branches or pull requests

2 participants