Re: smp kernel bash script

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

 



On Wed, 2005-01-12 at 17:19 +0200, Chadley Wilson wrote:
> How can check if the cpu is an smp and add some test to my script. This way 
> even if the Fedora gets it wrong my script will fix it when applying all my 
> atches and upgrading the kernels.
> I don't have an smp CPU around right now either to find out myself. And since 
> I have a celeron and a DOTHAN CPU I can't see what the differences are 
> between the chips outputs and hence can't write the script.

Try this:

if grep --silent '^processor.*1' /proc/cpuinfo; then
        echo "Do SMP things"
else
        echo "Do uniprocessor things"
fi

I'm not sure if it'll identify an SMP box if that box is booted into a
uniprocessor kernel though.

Paul.
-- 
Paul Howarth <paul@xxxxxxxxxxxx>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux