From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lennart Poettering Date: Mon, 19 Apr 2010 14:43:21 +0000 Subject: Re: Expanded CPU details report... Message-Id: <20100419144320.GA1048@tango.0pointer.de> List-Id: References: <20100419142622.GI3410@mcpierce-desktop.usersys.redhat.com> In-Reply-To: <20100419142622.GI3410@mcpierce-desktop.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Mon, 19.04.10 10:26, Darryl L. Pierce (dpierce@redhat.com) wrote: > In HAL it was possible to extract several pieces of information about > the processors on a machine, such as product name ("Intel(R) Xeon(R) > CPU E5430 @ 2.66GHz"), number of cores, the core number when peering a > specific core, throttling capability and the like. > > With udev we can only detect the number of cores by counting the > instances of devices that report a driver of "processor". > > Can we get expanded CPU details in udev, such as the processor product > name, core count and core number (on a specific core), the processor > flags (as seen in /proc/cpuinfo), cache size, speed, and other details? HAL just parsed /proc/cpuinfo to get that information, and so should you probably, too. The best way to query the number of processers is sysconf(_SC_NPROCESSORS_CONF). Lennart -- Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net http://0pointer.net/lennart/ GnuPG 0x1A015CC4