From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.187]) by sourceware.org (Postfix) with ESMTPS id 1B9C73858D32 for ; Mon, 16 Jan 2023 18:47:11 +0000 (GMT) Authentication-Results: sourceware.org; dmarc=permerror header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=cygwin.com Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MVv4X-1p7QIp0Kw9-00RrTX; Mon, 16 Jan 2023 19:47:06 +0100 Received: by calimero.vinschen.de (Postfix, from userid 500) id 75359A81B75; Mon, 16 Jan 2023 19:47:05 +0100 (CET) Date: Mon, 16 Jan 2023 19:47:05 +0100 From: Corinna Vinschen To: cygwin@cygwin.com Cc: Achim Gratz , System Administrator Subject: Re: vmstat yields error 'Unable to create system stat structure' on W11x64 Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com, Achim Gratz , System Administrator References: <38D69F25-39D2-4A62-B2BD-94055EB2994B@prs.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Provags-ID: V03:K1:q7x+zgyEz+J+npI1QdbjXynaj4/hW9seBqmacDMZpWal3vYjfnd 088YgyEcriemhy/AHRL4iSxIP9ZUjn6SovELAAg0C9/jw2Xa0AbtJ5PIZdEFuS3ptFSuDgP Fc8pDwR7aZhFOMVEvPYTUpy/l3b4x/JQCSaTzCRgfgt/6lqF1I+H+TSHaEHD7boYgLgbrJD dwh8K23p60e+0SYD2z8lw== UI-OutboundReport: notjunk:1;M01:P0:TtSil3is2Es=;7JqGvphzZa09HEJZUoFfvjzhCG2 0VkZ39oNM236aWPeYDo8qChMyqB77mVWaI/MIMUCftVt1NzYW+4Z16CL3V0CDrlbhlQdxuNSz ezicDWHtrPPwQbQDcNqFOSWhIZFPSAm1pXYMdysj8oPtBKlwpxQ6Zp31mV5NkCRHrcraePoSi qq0aVPlQbB/NXh1U91XB/ZnxvIjQ99XAGj2NsGIv3Gcy3uo5U/7e/fTOtpQodYPE/O+qjLYmv 6jGe+mD9P71jXjLa95o7SNobILkXdvGrTvSPAISHfLh8/1zk3qQMCkC3gj9n2uBOpE0IgQ/bZ xLqtStvYtm4Zq9b1Qj/K/x8LTtrg91H/g2+i3Su6a2RqtTJqb/cBBevwHI92DNxnGNrXJZicr dDCZTMQyhJZMXj8U4cO1zoDxYW+i1LhRoAzYb+K1OJAwTqfNDTxTm2Pd22eHl438JBYOuJokA rsQ+3U4bRVi/J8+sbzfmLCVzDDhyUSev6Uv8HmhqshK/JewwRi5S9bF7HHMMMCXdJPRo9vbCd TBDZG791/n3U+NS4ow7oxt013Mgoue20vgfxMD5GSXzgfkbm7tT59mdbfqh6QDR7n6Y8lj8J5 5OnkkU5JzmQFYypUnYjE80oYxxDmcm8Cd7PtHJAT7dEmiPhKTN1CLD+nkssHnwsge/bAvlDME AI3SPxOUFTX9PTLV7E7QcaSfGUZNl/C9Ky9vXEYpFQ== X-Spam-Status: No, score=-96.6 required=5.0 tests=BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_DMARC_STATUS,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_FAIL,SPF_HELO_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Jan 16 14:08, Corinna Vinschen via Cygwin wrote: > On Jan 16 11:19, Corinna Vinschen via Cygwin wrote: > > On Jan 15 22:04, System Administrator via Cygwin wrote: > > > Hello, > > > > > > I am trying to migrate my framework to Windows 11 running Cygwin. > > > When executing vmstat it returns the following error: > > > > > > "Unable to create system stat structureā€¯ > > > [...] > While that's obviously wrong, it's not the problem. It turns out that > vmstat from procps-ng 4.0.2 stumbles over the fact, that /proc/cpuinfo > only prints the following fields if the CPU is a multi core CPU: ...in short, the topology info. > On Linux the output of those fields only depends on the configuration > of the kernel. If it has been built with CONFIG_SMP, these fields are > part of the /proc/cpuinfo output. > > On Cygwin, the output of these fields actually depends on the fact if > the HTT CPU flag is set or not. If not, it's not a multi core CPU and > the aforementioned fields are omitted. > > I could reproduce this issue by changing the CPU topology in my QEMU/KVM > Windows 10 machine. The default topology was 4 CPUs with 1 core and 1 > thread each. I changed that to 2 CPUs with 2 cores and 1 thread each. > After restarting the W10 machine, vmstat from procps-ng 4.0.2 started > working as desired. > > So we can fix this issue by tweaking Cygwin instead. I guess this will > be fodder for the upcoming 3.4.4 release. > > I'll also provide a test release in a bit, stay tuned. For testing, please check out the Cygwin test release 3.5.0-0.110.g75c375e86df3 via the setup tool and report back. Thanks, Corinna