dotnet中的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 握手总数

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值