?
Solved

Detect 2nd processor

Posted on 2002-06-05
7
Medium Priority
?
187 Views
Last Modified: 2010-04-20
Hi,
 I am writing a script to install a custom kernel; however I'm not sure how to determine if there is physically a second processor installed. It's a piece of cake if the current booted kernel is SMP, but if it isnt the system seems to have no trace of it (hwconf, proc/cpuinfo,etc)
0
Comment
Question by:medent
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 1

Expert Comment

by:jsnorman
ID: 7059985
A couple of options I can think of.

First, and easiest, is to compile all of the target kernels to include SMP support.  This adds very little to the size of the kernel, and adding SMP support does no harm to a uniprocessor system.

Second, is to enable ACPI.  ACPI should detect and report (in kernel messages -- dmesg|grep CPU -- the presence of multiple CPUs).
0
 

Author Comment

by:medent
ID: 7060057

1. According to the help for CONFIG_SMP, the kernel will run faster if SMP is not selected (on a uniprocessor), so that is not a desirable option.
2. I think you meant APIC- dmsg doesnt report both processors, possible my ibm5100 (pIII 933mhz)server doesnt support APIC....
Thank You.
0
 
LVL 1

Accepted Solution

by:
jsnorman earned 600 total points
ID: 7060077
It is true that the kernel will run faster (not by much though) if you deselect CONFIG_SMP.  However, you are writing a script to build a custom kernel, right?  So there is no harm  I think in using a vanilla kernel (that includes SMP and all drivers) as a bootstrap kernel in which to run your script.  This makes it much easier to detect hardware more precisely (not just processors).  Once your script has built the appropriate makefiles, and the new kernel is compiled with only the appropriate options/drivers, the new kernel would presumably be the production kernel.  This is how most every hardware detection scheme I have seen works (vanilla kernel, all drivers are attempted to load, then custom config is built).

I actually did mean ACPI -- not APIC.  I too have never gotten APIC to work.  Must be broken.  But ACPI reports processors, at least in the 2.5 kernels (documented) and I think also in the 2.4 kernels (not documented).
0
WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

 

Author Comment

by:medent
ID: 7060127
The vanilla kernel doesnt cover all my situations. Appears to be a dead end for me until apic is resolved. Thanks, in any case that was very helpful info.
0
 
LVL 1

Expert Comment

by:jsnorman
ID: 7060140
Thanks.  Sorry I couldn't help more; I am curious, though, as to where/why the vanilla kernel approach fails?
0
 

Author Comment

by:medent
ID: 7060161
1) If we sent out a tech on site to upgrade a server to a smp, and he pops the cpu in, and forgets the procedure to manually upgrade the kernel- I have no way to tool up a way to detect his error.
2) Our production servers starts out from redhat cd's which boot up a kernel with 2 choices (default is ok)- if for some reason the tech selects the wrong one, my script will follow suite.
0
 
LVL 1

Expert Comment

by:jsnorman
ID: 7060169
Thanks.  Sorry I couldn't help more; I am curious, though, as to where/why the vanilla kernel approach fails?
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month13 days, 2 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question