Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Aug 2024 09:02:33 +0800
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        Alan Somers <asomers@freebsd.org>
Cc:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Re: Monitoring packet loss
Message-ID:  <FAB4E19F-F0A2-408A-A927-10D98960D829@FreeBSD.org>
In-Reply-To: <CAOtMX2hLaYEhVpoPG5HtJ7Qj030PvGOBFeo78fqmRxPMJAfxmQ@mail.gmail.com>
References:  <CAOtMX2hLaYEhVpoPG5HtJ7Qj030PvGOBFeo78fqmRxPMJAfxmQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


> On Aug 7, 2024, at 10:06 PM, Alan Somers <asomers@freebsd.org> wrote:
>=20
> I'd like to track the rate of packet loss for outbound packets from
> some production servers.  Obviously, that's impossible. =20

Can `netstat -di` fulfill ?

The column `Oerrs` and `Drop` ( this is the out dropped packets ) may be =
what you want.

The drivers also expose some internal stats via sysctl. But different =
drivers vary.

For example cxgbe(4)
```
# sysctl dev.cxl.0.stats.tx_drop

```

Best regards,
Zhenlei

> But I think
> that the rate of TCP retransmissions should be a close proxy for
> packet loss.  Currently I can only observe TCP retransmissions by
> using wireshark, a slow and laborious process.  But it seems to me
> that the network stack should already have that information.  Would it
> be possible to add a sysctl to expose the total number of
> retransmissions since boot?  This information would be very useful.
> It could reveal for example problems with a model of NIC, or
> congestion on one network segment but not another, or a regression in
> the OS.
>=20
> -Alan
>=20






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FAB4E19F-F0A2-408A-A927-10D98960D829>