[PATCH v5 2/3] Make relevant changes in NEWS and man page

Sahil Siddiq icegambit91 at gmail.com
Mon Mar 20 05:40:57 UTC 2023

Document the changes in the man page and NEWS.

* doc/strace.1.in: Add -l/--syscall-limit option. Improve description.
* NEWS: Mention this change.

Signed-off-by: Sahil Siddiq <icegambit91 at gmail.com>
Changes since v4:
 - doc/strace.1.in: Improve description and formatting

 NEWS            |  2 ++
 doc/strace.1.in | 15 +++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/NEWS b/NEWS
index fa56409ba..8c2c9e217 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,8 @@ Noteworthy changes in release 6.2 (2023-02-26)
   * Updated lists of ALG_*, BPF_*, IFLA_*, KEY_*, KVM_*, LANDLOCK_*,
     MEMBARRIER_*, NFT_*, NTF_*, and V4L2_* constants.
   * Updated lists of ioctl commands from Linux 6.2.
+  * Implemented feature to automatically detach strace after capturing
+    a specified number of syscalls.
 * Bug fixes
   * Fixed build on alpha architecture.
diff --git a/doc/strace.1.in b/doc/strace.1.in
index 71661bd2e..75f4ef0cb 100644
--- a/doc/strace.1.in
+++ b/doc/strace.1.in
@@ -52,6 +52,7 @@ strace \- trace system calls and signals
 .OP \-X format
 .OM \-P path
 .OM \-p pid
+.OP \-l limit
 .OP \-\-seccomp\-bpf
 .if '@ENABLE_SECONTEXT_FALSE@'#' .OP \-\-secontext\fR[=\fIformat\fR]
 .BR "" {
@@ -74,6 +75,7 @@ strace \- trace system calls and signals
 .OP \-U columns
 .OM \-P path
 .OM \-p pid
+.OP \-l limit
 .OP \-\-seccomp\-bpf
 .BR "" {
 .OR \-p pid
@@ -1332,6 +1334,19 @@ field is not supplied explicitly, it is added as the last column.
 .B \-\-summary\-wall\-clock
 Summarise the time difference between the beginning and end of
 each system call.  The default is to summarise the system time.
+.SS Stop condition
+.TP 12
+.BI "\-l " limit
+.BR "\-\-syscall\-limit" = \fIlimit\fR
+Detach all tracees when
+.I limit
+number of syscalls have been captured. Syscalls filtered out via
+.BR \-\-trace ,
+.B \-\-trace\-path
+.B \-\-status
+options are not considered when keeping track of the number of syscalls that are captured.
 .SS Tampering
 .ad l
 .TP 12

More information about the Strace-devel mailing list