aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/truss/truss.1
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2016-02-23 19:56:29 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2016-02-23 19:56:29 +0000
commitd70876fd7e2fe46f9d1fb2212a2687f9684ccb7a (patch)
tree49834446e23d2ff28b0b80a241668fc54ebb1bdc /usr.bin/truss/truss.1
parent9a59fb36b2a735ff2870555037af8b7744248e0d (diff)
downloadsrc-d70876fd7e2fe46f9d1fb2212a2687f9684ccb7a.tar.gz
src-d70876fd7e2fe46f9d1fb2212a2687f9684ccb7a.zip
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
Notes
Notes: svn path=/head/; revision=295930
Diffstat (limited to 'usr.bin/truss/truss.1')
-rw-r--r--usr.bin/truss/truss.112
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/truss/truss.1 b/usr.bin/truss/truss.1
index fb02cb4e75ab..0246fa933928 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,