From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id DCFBD1FF146 for ; Tue, 09 Jun 2026 08:47:02 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B5A745DE4; Tue, 9 Jun 2026 08:47:02 +0200 (CEST) Message-ID: <43450ded-1138-4c77-bbb0-3cc9e9a432a9@proxmox.com> Date: Tue, 9 Jun 2026 08:46:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH pmg-api v2] fix #7187: report: add ethtool output for physical interfaces To: pmg-devel@lists.proxmox.com References: <20260513082252.6825-1-e.fastermann@proxmox.com> Content-Language: en-US From: Erik Fastermann In-Reply-To: <20260513082252.6825-1-e.fastermann@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1780987544112 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.828 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: LOKKXZYTMMMSYEGDPKST2FVZAZYFDHMW X-Message-ID-Hash: LOKKXZYTMMMSYEGDPKST2FVZAZYFDHMW X-MailFrom: e.fastermann@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Gentle ping. This patch still cleanly applies on the current master On 5/13/26 10:21 AM, Erik Fastermann wrote: > Adding ethtool output to pmg-system-report provides visibility into > actual and supported NIC link speeds, making it much easier to diagnose > network performance issues, negotiation failures, and configuration > mismatches. It also reduces support back-and-forth. > > The implementation mirrors the change in pve-manager, as the report > functionality is similar in both projects. > > Signed-off-by: Erik Fastermann > --- > > NOTE: A similar patch was applied to all products: > pmg, pve, pbs, pdm. > > changes since v1: > * add a more detailed commit message explaining the rational > * wrap in eval to prevent errors crashing the report > * use PVE::Tools::shellquote to prevent injection errors > > src/PMG/Report.pm | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/src/PMG/Report.pm b/src/PMG/Report.pm > index 84d1b88..d5761e0 100644 > --- a/src/PMG/Report.pm > +++ b/src/PMG/Report.pm > @@ -4,6 +4,7 @@ use strict; > use warnings; > use Mail::SpamAssassin::DnsResolver; > > +use PVE::IPRoute2; > use PVE::Tools; > use PMG::Utils; > > @@ -58,6 +59,20 @@ my $report_def = { > ], > }; > > +eval { > + my $interfaces = PVE::IPRoute2::ip_link_details(); > + > + for my $iface (sort keys %{$interfaces}) { > + if (PVE::IPRoute2::ip_link_is_physical($interfaces->{$iface})) { > + push @{ $report_def->{network} }, "ethtool " . PVE::Tools::shellquote($iface); > + } > + } > +}; > + > +if ($@) { > + print STDERR "building ethtool commands failed: $@"; > +} > + > my @report_order = ('general', 'storage', 'network', 'firewall', 'cluster', 'pmg'); > > my $report = '';