From nobody Wed Aug 7 14:06:46 2024 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WfBnL0pxnz5SCDy for ; Wed, 07 Aug 2024 14:07:02 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBnJ1mcxz4rPR for ; Wed, 7 Aug 2024 14:07:00 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.210.48 as permitted sender) smtp.mailfrom=asomers@gmail.com Received: by mail-ot1-f48.google.com with SMTP id 46e09a7af769-7093472356dso1063188a34.0 for ; Wed, 07 Aug 2024 07:07:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723039618; x=1723644418; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=QufjrVG0mH209hPvyY4+5mnSQzWzze6FGXGrYbUFK04=; b=EuYCC2gfQpyYyXp6tld8tCGzN/rJencFcu9P5vlPwmS8XjdJIyV6HJrZ0wWhGkgVrC elt0X+1PHj0Q9ImUmi1lJe3oy1TlicZGMa/1elYcwpNnBGW0PAfNBz+aSQYk/Y9QivaW hy43K6CB5oCixMWlKjLRzf5/9RgWRSJjDyzpGGYA/suCHFzxtFWKP5E0py5DEcVARvs/ ErZHTM+waiycqRqfCZ0YtBUIPyl/SEKEg6TU5FEBV0+nehki3XWFrFEpw1zAsWcmMm0g Hot3j87nZNmSAUH0VdPsrfuTKpmptcBQ6FRcqF2n8jNJnjBP8itYl4WX3dInwNL75Cdx 2drQ== X-Gm-Message-State: AOJu0YzQuYc71Osn9yvN1HrUcuK6vY0gIq/OYElOAebNuZMe48oA21My iYP3Zom5nbMCrVmxSfEygyNt8VJ9Ys7Gt0GiUpGPdsUhWPEjiYjehhy8H71oh04VcSiC5Jzrxj9 XLwKkauvt0m4BoAf5GM2R3cNMocOUdQ== X-Google-Smtp-Source: AGHT+IFbCGfZtBmkAQvPWVuVTR760l1Jrlilr/lRqpEkz5GUeOymlg/M5CfooA1jWn+l7vY1RwkDCDXMP05PRsQmD50= X-Received: by 2002:a05:6358:50c4:b0:1aa:c4ea:8e69 with SMTP id e5c5f4694b2df-1af3ba6f461mr2063856755d.13.1723039618239; Wed, 07 Aug 2024 07:06:58 -0700 (PDT) List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 From: Alan Somers Date: Wed, 7 Aug 2024 08:06:46 -0600 Message-ID: Subject: Monitoring packet loss To: FreeBSD Net Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: - X-Spamd-Result: default: False [-1.97 / 15.00]; NEURAL_HAM_LONG(-0.97)[-0.972]; NEURAL_HAM_MEDIUM(-0.55)[-0.549]; NEURAL_HAM_SHORT(-0.45)[-0.448]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; RWL_MAILSPIKE_GOOD(-0.10)[209.85.210.48:from]; MIME_GOOD(-0.10)[text/plain]; TO_DN_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; MISSING_XM_UA(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TO_DOM_EQ_FROM_DOM(0.00)[]; FREEFALL_USER(0.00)[asomers]; RCVD_IN_DNSWL_NONE(0.00)[209.85.210.48:from] X-Rspamd-Queue-Id: 4WfBnJ1mcxz4rPR I'd like to track the rate of packet loss for outbound packets from some production servers. Obviously, that's impossible. 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. -Alan