[olug] Determining cores and sockets on Linux...
Will Langford
unfies at gmail.com
Thu Nov 20 22:36:04 UTC 2008
netstat for sockets, grep the output to your heart's content.
as far as cpu stuffies... i'd still suggest looking at cpuinfo. there's
some other information in it for each processor such as:
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
On a HT system, both entries in cpuinfo showed this same information. I
lack newer hardware to test with, so your mileage may get better.
-Will
On Thu, Nov 20, 2008 at 4:31 PM, Dan Linder <dan at linder.org> wrote:
> I've been tasked with coming up with a way to count the number of sockets
> and cores we have running our Linux environment (mostly SuSE ES9, but some
> older RedHat).
>
> My first check of /proc/cpuinfo just reports 0..4 if it's a single
> socket/quad-core CPU, or a dual socket motherboard with populated with two
> dual-core Xeon CPUs.
>
> I had hoped that there would be something usable in the /proc/acpi/ tree,
> but that isn't proving consistent either.
>
> Aside from making a huge table of CPUs and keeping track of their
> single/dual/quad/{more} core status, and then dividing by the total number
> of "processors" as reported in /proc/cpuinfo, does anyone have a more
> reliable way?
>
> Dan
>
> --
> "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the
> Satires of Juvenal
> "I do not fear computers, I fear the lack of them." -- Isaac Asimov
> (Author)
> ** *** ***** ******* *********** *************
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> https://lists.olug.org/mailman/listinfo/olug
>
More information about the OLUG
mailing list