Date: Mon, 04 Aug 2014 20:23:08 -0400 From: Richard Yao <ryao@gentoo.org> To: Stefan Parvu <sparvu@systemdatarecorder.org> Cc: freebsd-hackers@freebsd.org Subject: Re: sysctl hw add nphyscpu variable Message-ID: <53E023EC.7010001@gentoo.org> In-Reply-To: <20140804145342.2306d7681f0b852908dd4865@systemdatarecorder.org> References: <20140804145342.2306d7681f0b852908dd4865@systemdatarecorder.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --0ex8UDXPAht3R2wKhPqQFTg0F2kMcaOVu Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon 04 Aug 2014 07:53:42 AM EDT, Stefan Parvu wrote: > Hi, > > Would be possible to have under sysctl interface a new variable which w= ill track the > number of physical CPU sockets a system has ? Would be useful for hardw= are > and data inventory. It should be. > Something like: > > hw.machine: amd64 > hw.model: Intel(R) Xeon(R) CPU E5-2640 v2 @ 2.00GHz > hw.ncpu: 32 > hw.nphyscpu: 2 > ^^^^^^^^^^^^ I think hw.nsocket would make more sense. Whoever does this should=20 check to see if any other UNIX platforms have picked a suitable name. > This is an example from my system with two 2 physical CPUs installed. N= o system > virtualization in place, like Xen, etc ... > > Or is it possible currently to get easily this information ? I havent f= ound one > except dmesg information. > > FreeBSD/SMP: Multiprocessor System Detected: 32 CPUs > FreeBSD/SMP: 2 package(s) x 8 core(s) x 2 SMT threads > cpu0 (BSP): APIC ID: 0 > cpu1 (AP): APIC ID: 1 > cpu2 (AP): APIC ID: 2 > cpu3 (AP): APIC ID: 3 > cpu4 (AP): APIC ID: 4 > cpu5 (AP): APIC ID: 5 > cpu6 (AP): APIC ID: 6 > cpu7 (AP): APIC ID: 7 > cpu8 (AP): APIC ID: 8 > cpu9 (AP): APIC ID: 9 > cpu10 (AP): APIC ID: 10 > cpu11 (AP): APIC ID: 11 > cpu12 (AP): APIC ID: 12 > cpu13 (AP): APIC ID: 13 > cpu14 (AP): APIC ID: 14 > cpu15 (AP): APIC ID: 15 > cpu16 (AP): APIC ID: 32 > cpu17 (AP): APIC ID: 33 > cpu18 (AP): APIC ID: 34 > cpu19 (AP): APIC ID: 35 > cpu20 (AP): APIC ID: 36 > cpu21 (AP): APIC ID: 37 > cpu22 (AP): APIC ID: 38 > cpu23 (AP): APIC ID: 39 > cpu24 (AP): APIC ID: 40 > cpu25 (AP): APIC ID: 41 > cpu26 (AP): APIC ID: 42 > cpu27 (AP): APIC ID: 43 > cpu28 (AP): APIC ID: 44 > cpu29 (AP): APIC ID: 45 > cpu30 (AP): APIC ID: 46 > cpu31 (AP): APIC ID: 47 Whoever implements this would want to find the code that prints this=20 and use the information to initialize the sysctl variable. > Probable things will get complicated a bit if the system is a guest und= er Xen or other > hypervisor. But probable there the nphyscpu should be NA ? The hypervisor is able to pass through a geometry, so this would still=20 make sense there. --0ex8UDXPAht3R2wKhPqQFTg0F2kMcaOVu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJT4CPyAAoJECDuEZm+6ExkQKUP/0jK/02jOFBk0Ax3qF5ObuNF 3gd2LcWXB0TAXc2pthPthTrN8L3NunWXbJ1CzZhrFvsb0OMRAthh4t818T+7E4Ik n/jhvMf+GMT7YOueRTriCOojRiP88MWizT17ugdMxibQuqdl0uicsCCyBE8pcYPe sekdQjJFc33xjIvkMEGe8oVTP+vK461Xv64HUq8Gy2kQEEwlTZSVBNx+xVx84Cus JkpGlP56HCltWZcA83IttHQL09ylsK9z6e9AHBl/aGHttmkwyBv4kSwQ8MJc+ock 8xzQN8jQoDPgaHEo+QwvbmH2XvJyC6TAYDmohue1qca00yu8/nfXypcHBdFMsZk0 ad3FrN3URV8uLBTD9aC+0SNUs04dHBPALU+qCXv2ZXzTJMTea/T/yx+RK6s9zUXW reI1nwrJVLWpiz7R3DD9BBQ/Vunz/BNRRHmSgpxVu5En6Qx97bjsRh1CEnBh+TcP 0VDTqN/owFOAIktFnKveJur3srjTXjkrCokNwGVFX1PWYJ3v85mXmj0PtCpCY6Sr EKsqJ8TMyG65wA0X6dXkT3kdUXp0zn0YwMmP5J8gS1XtPdLCHL+brrXjeX/GSpjZ Ta3ta0gr1MZ6byfAvW/XwtbLGNr3AwOsNB96XRbZ09DxGV+O0ayk9r4/3TZeSL/Y 6JrK1AEns92g3BvbvQwf =J9jx -----END PGP SIGNATURE----- --0ex8UDXPAht3R2wKhPqQFTg0F2kMcaOVu--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53E023EC.7010001>