.NET 中的counters说明(三)

内容纲要

上篇说了System.Runtime,它负责应用运行的环境资源的收集,这篇要继续说AspNetCore的Hosting,Http.Connections和Server.Kestrel三个计数器。

同时,下面指标各项()里的项目是--counters 参数[]里的项,用逗号分隔多项指标。


Microsoft.AspNetCore.Hosting计数器

本计数器是收集请求的数值,.net core 3.1使用

命令:

dotnet-counters monitor -n websample --refresh-interval 1 --counters Microsoft.AspNetCore.Hosting

视图:

指标:

Current Requests (current-requests)当前正在请求的总数

Failed Requests (failed-requests)失败请求总数

Request Rate (requests-per-second)每秒请求数

Total Requests (total-requests)请求总数

Microsoft.AspNetCore.Http.Connections计数器

websocket连接的指,.net core 3.1使用

命令:

dotnet-counters monitor -n BlazorAppDemo --refresh-interval 1 --counters Microsoft.AspNetCore.Http.Connections

视图:


指标:

Average Connection Duration (connections-duration)连接的平均持续时间(毫秒)

Current Connections (current-connections)当前活动连接数

Total Connections Started (connections-started)已启动的连接总数

Total Connections Stopped (connections-stopped)已停止的连接总数

Total Connections Timed Out (connections-timed-out)已超时的连接总数

Microsoft-AspNetCore-Server-Kestrel计数器

对,你没看错,这里不是“.”了,变成“-”了。本指标是关于Kestrel作为host时的收集指标,>=.NET5使用。

命令:

dotnet-counters monitor -n BlazorAppDemo --refresh-interval 1 --counters Microsoft-AspNetCore-Server-Kestrel

视图:


指标:

Connection Queue Length (connection-queue-length)当前连接队列的长度

Connection Rate (connections-per-second)每秒连接数

Current Connections (current-connections)当前活动连接数

Current TLS Handshakes (current-tls-handshakes)当前 TLS 握手数

Current Upgraded Requests (WebSockets) (current-upgraded-requests)当前升级请求数 (WebSockets)

Failed TLS Handshakes (failed-tls-handshakes)失败的 TLS 握手总数

Request Queue Length (request-queue-length)当前请求队列的长度

TLS Handshake Rate (tls-handshakes-per-second)每秒的 TLS 握手数

Total Connections (total-connections)连接总数

Total TLS Handshakes (total-tls-handshakes) TLS 握手总数

给TA打赏
共{{data.count}}人
人已打赏
.NET

记一次 .NET 某新能源系统 线程疯涨 分析

2022-7-22 9:42:56

.NET

.NET 中的counters说明(四)

2022-7-22 10:14:59

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
今日签到
有新私信 私信列表
搜索