Skip to content

Commit a9828b9

Browse files
Update docs for dotnet-counters
Add documentation for `--dsrouter` switch introduced in dotnet/diagnostics#5543
1 parent 4d3c945 commit a9828b9

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

docs/core/diagnostics/dotnet-counters.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: dotnet-counters diagnostic tool - .NET CLI
33
description: Learn how to install and use the dotnet-counter CLI tool for ad-hoc health monitoring and first-level performance investigation.
4-
ms.date: 11/17/2020
4+
ms.date: 08/06/2025
55
ms.topic: reference
66
---
77
# Investigate performance counters (dotnet-counters)
88

9-
**This article applies to:** ✔️ `dotnet-counters` version 3.0.47001 and later versions.
9+
**This article applies to:** ✔️ `dotnet-counters` version 10.0 and later versions.
1010

1111
Counters can be read from applications running .NET 5 or later.
1212

@@ -70,7 +70,7 @@ Periodically collect selected counter values and export them into a specified fi
7070
### Synopsis
7171

7272
```dotnetcli
73-
dotnet-counters collect [-h|--help] [-p|--process-id] [-n|--name] [--diagnostic-port] [--refresh-interval] [--counters <COUNTERS>] [--format] [-o|--output] [-- <command>]
73+
dotnet-counters collect [-h|--help] [-p|--process-id] [-n|--name] [--diagnostic-port] [--refresh-interval] [--counters <COUNTERS>] [--format] [-o|--output] [--dsrouter <ios|ios-sim|android|android-emu>] [-- <command>]
7474
```
7575

7676
### Options
@@ -230,6 +230,10 @@ dotnet-counters monitor [-h|--help] [-p|--process-id] [-n|--name] [--diagnostic-
230230

231231
A comma-separated list of counters. Counters can be specified `provider_name[:counter_name]`. If the `provider_name` is used without a qualifying list of counters, then all counters from the provider are shown. To discover provider and counter names, use the [dotnet-counters list](#dotnet-counters-list) command. For [EventCounters](event-counters.md), `provider_name` is the name of the EventSource and for [Meters](metrics.md), `provider_name` is the name of the Meter.
232232

233+
- **`--dsrouter {ios|ios-sim|android|android-emu}`**
234+
235+
Starts [dotnet-dsrouter](dotnet-dsrouter.md) and connects to it. Requires [dotnet-dsrouter](dotnet-dsrouter.md) to be installed. Run `dotnet-dsrouter -h` for more information.
236+
233237
**`-- <command>`**
234238

235239
After the collection configuration parameters, the user can append `--` followed by a command to start a .NET application. `dotnet-counters` will launch a process with the provided command and monitor the requested metrics. This is often useful to collect metrics for the application's startup path and can be used to diagnose or monitor issues that happen early before or shortly after the main entrypoint.

docs/core/diagnostics/dotnet-gcdump.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ dotnet-gcdump collect [-h|--help] [-p|--process-id <pid>] [-o|--output <gcdump-f
127127

128128
By default, dotnet-gcdump listens at the specified address. You can request dotnet-gcdump to connect instead by appending `,connect` after the address. For example, `--diagnostic-port /foo/tool1.socket,connect` will connect to a .NET runtime process that's listening to the `/foo/tool1.socket` Unix domain socket.
129129

130-
- **`--dsrouter {ios|ios-sim|android|android-emu}**
130+
- **`--dsrouter {ios|ios-sim|android|android-emu}`**
131131

132132
Starts [dotnet-dsrouter](dotnet-dsrouter.md) and connects to it. Requires [dotnet-dsrouter](dotnet-dsrouter.md) to be installed. Run `dotnet-dsrouter -h` for more information.
133133

0 commit comments

Comments
 (0)