[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Detecting unused CPUs on Linux

From: Chip Seraphine
Subject: Detecting unused CPUs on Linux
Date: Tue, 12 Oct 2004 17:18:04 -0500
User-agent: KMail/1.5.4

I'm working on some lilo-management stuff and I would like to be able to 
detect SMP machines under Linux (Mandrake).  No problem at all if the machine 
is already running an SMP kernel-- I can just count the CPUs in /proc/
cpuinfo, among other ways.  

Unfortunately, it's a bit tougher if the box is running a uniprocessor kernel.  
On some systems, I can search the dmesg for the string NR_CPUs (which appears 
only in an "unused processsors" warning) to know that I have some unused 
CPUs, but that isn't always present in the dmesg (seems to appear on my 
PowerEdges but not my Dimensions, not sure why...).  

Anybody else know of any automated way of telling if I am dragging a CPU?


Chip Seraphine
Unix Administrator
TradeLink, LLC

reply via email to

[Prev in Thread] Current Thread [Next in Thread]