diff options
author | jhb <jhb@FreeBSD.org> | 2016-02-23 19:56:29 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2016-02-23 19:56:29 +0000 |
commit | dbabd325530e7767fe427e64ff9bdec867e18af9 (patch) | |
tree | 49834446e23d2ff28b0b80a241668fc54ebb1bdc /usr.bin/truss/truss.1 | |
parent | 63d9199ac684a4ec295d9512910bac7287ba2b1a (diff) | |
download | FreeBSD-src-dbabd325530e7767fe427e64ff9bdec867e18af9.zip FreeBSD-src-dbabd325530e7767fe427e64ff9bdec867e18af9.tar.gz |
Add support for displaying thread IDs to truss(1).
- Consolidate duplicate code for printing the metadata at the start of
each line into a shared function.
- Add an -H option which will log the thread ID of the relevant thread
for each event.
While here, remove some extraneous calls to clock_gettime() in
print_syscall() and print_syscall_ret(). The caller of print_syscall_ret()
always updates the current thread's "after" time before it is called.
Reviewed by: kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D5363
Diffstat (limited to 'usr.bin/truss/truss.1')
-rw-r--r-- | usr.bin/truss/truss.1 | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/truss/truss.1 b/usr.bin/truss/truss.1 index fb02cb4..0246fa9 100644 --- a/usr.bin/truss/truss.1 +++ b/usr.bin/truss/truss.1 @@ -1,6 +1,6 @@ .\" $FreeBSD$ .\" -.Dd October 9, 2015 +.Dd February 23, 2016 .Dt TRUSS 1 .Os .Sh NAME @@ -8,12 +8,12 @@ .Nd trace system calls .Sh SYNOPSIS .Nm -.Op Fl facedDS +.Op Fl facedDHS .Op Fl o Ar file .Op Fl s Ar strsize .Fl p Ar pid .Nm -.Op Fl facedDS +.Op Fl facedDHS .Op Fl o Ar file .Op Fl s Ar strsize .Ar command Op Ar args @@ -32,6 +32,10 @@ Trace descendants of the original traced process created by .Xr fork 2 , .Xr vfork 2 , etc. +To distinguish events between processes, +the process ID +.Pq PID +of the process is included in the output of each event. .It Fl a Show the argument strings that are passed in each .Xr execve 2 @@ -52,6 +56,8 @@ since the trace was started. .It Fl D Include timestamps in the output showing the time elapsed since the last recorded event. +.It Fl H +Include the thread ID of in the output of each event. .It Fl S Do not display information about signals received by the process. (Normally, |