-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
execsnoop output out of order #5047
Comments
I suspect two pid's are running on two different cpus. You can try to tweak the script to add CPU info. The perf buffer is per cpu so reordering in user space is possible. If we really want ordering, ringbuf is the option. See an example in ttysnoop.py. |
It seems to be even worse than just out of order. Execsnoop seems to miss some processes. In this example execsnoop does not print the processes with PID 2057200, PID 2057246 and PID 2065777. |
The output of execsnoop can be out of order, which results in child processes being printed before their parent process.
For example:
TIME UID PCOMM PID PPID RET ARGS
18:28:39 0 cmp 2391921 2391920 0 /usr/bin/cmp -s apt.extended_states.0 /var/lib/apt/extended_states
18:28:39 0 apt-config 2391922 2391920 0 /usr/bin/apt-config shell AutoAptEnable APT::Periodic::Enable
18:28:39 0 apt-get 2391926 2391920 0 /usr/bin/apt-get check -qq
18:28:39 0 apt.systemd.dai 2391920 2391916 0 /usr/lib/apt/apt.systemd.daily lock_is_held update
18:28:39 0 apt-config 2391924 2391920 0 /usr/bin/apt-config shell VERBOSE APT::Periodic::Verbose
18:28:39 0 date 2391929 2391920 0 /usr/bin/date +%s
Here you can see, that apt.systemd.daily (PID 2391920) is the parent process of "/usr/bin/cmp -s apt.extended_states.0 /var/lib/apt/extended_states" (PID 2391921), which is printed before its parent.
The text was updated successfully, but these errors were encountered: