You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
libbpf-tools: sigsnoop: display target process's comm (#5272)
Directly print the comm of the target process to display information more
intuitively, without having to use commands such as 'ps' to query the comm
information of the pid process again.
$ sudo ./sigsnoop -n
TIME PID COMM SIG TPID TCOMM RESULT
11:29:06 1128124 vte-urlencode-c SIGCHLD 1127674 bash 0
11:29:08 1128126 ls SIGCHLD 1127674 bash 0
11:29:08 1128127 vte-urlencode-c SIGCHLD 1127674 bash 0
11:29:08 1881 Xorg SIGALRM 1881 Xorg 0
11:29:11 0 swapper/3 SIGNAL-34 2545 sssd_kcm 0
11:29:21 1127194 kworker/u48:6 SIGINT 1127674 bash 0
11:29:21 1127674 bash SIGINT 1127674 bash 0
11:29:21 1128130 vte-urlencode-c SIGCHLD 1127674 bash 0
11:29:21 1881 Xorg SIGALRM 1881 Xorg 0
11:29:21 0 swapper/1 SIGNAL-34 2545 sssd_kcm 0
^^^^^^^^^^^^^^^^
If current kernel is unsupport bpf_task_from_pid(), linux < v6.1 [1], the TCOMM
field displays 'N/A':
$ sudo ./sigsnoop -n
WARNING: Current kernel not support bpf_task_from_pid(), ignore TCOMM field
TIME PID COMM SIG TPID TCOMM RESULT
15:01:24 289689 pmsleep SIGCHLD 289348 N/A 0
15:01:24 289691 expr SIGCHLD 289348 N/A 0
15:01:25 289693 pmprobe SIGCHLD 289692 N/A 0
15:01:25 289694 gawk SIGCHLD 289692 N/A 0
15:01:25 289692 pmlogger_check SIGCHLD 289348 N/A 0
15:01:25 289695 pmsleep SIGCHLD 289348 N/A 0
15:01:25 289696 expr SIGCHLD 289348 N/A 0
^^^^^^^^^^^^^^^^
Link: torvalds/linux@3f0e6f2b41d3 [1]
Signed-off-by: Rong Tao <[email protected]>
0 commit comments