Skip to content

Commit 07225ff

Browse files
committed
Revert "[DotnetTrace][CollectLinux] Cut target process options"
This reverts commit 72027e3.
1 parent a317510 commit 07225ff

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

docs/core/diagnostics/dotnet-trace.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,9 @@ When `--providers`, `--profile`, `--clrevents`, and `--perf-events` aren’t spe
296296
- `dotnet-common` — lightweight .NET runtime diagnostics.
297297
- `cpu-sampling` — kernel CPU sampling (perf-based) via `Universal.Events/cpu`.
298298

299-
A machine-wide trace will be collected. .NET Processes are discovered through their diagnostics ports, which are located under the `TMPDIR` environment variable when set and otherwise under `/tmp`.
299+
By default, a machine-wide trace will be collected. .NET Processes are discovered through their diagnostics ports, which are located under the `TMPDIR` environment variable when set and otherwise under `/tmp`.
300+
301+
If collecting events from all .NET Processes is undesired, `-n, --name <name>` or `-p|--process-id <PID>` can be used to specify a particular process.
300302

301303
### Prerequisites
302304

@@ -320,6 +322,10 @@ dotnet-trace collect-linux
320322
# Trace Collection
321323
[-o|--output <trace-file-path>]
322324
[--duration dd:hh:mm:ss]
325+
326+
# .NET Process Target (Optional)
327+
[-n, --name <name>]
328+
[-p|--process-id <pid>]
323329
```
324330

325331
### Options
@@ -433,6 +439,18 @@ dotnet-trace collect-linux
433439

434440
The time for the trace to run. Use the `dd:hh:mm:ss` format. For example `00:00:00:05` will run it for 5 seconds.
435441

442+
#### .NET Process Target Options
443+
444+
See [Default collection behavior](#default-collection-behavior)
445+
446+
- **`-n, --name <name>`**
447+
448+
The name of the process to collect the trace from.
449+
450+
- **`-p|--process-id <PID>`**
451+
452+
The process ID to collect the trace from.
453+
436454
> [!NOTE]
437455
438456
> - To collect a trace using `dotnet-trace collect-linux`, it needs to be run with root permissions (`CAP_PERFMON`/`CAP_SYS_ADMIN`). Otherwise, the tool will fail to collect events.

0 commit comments

Comments
 (0)