smp kernel bash script
Paul Howarth
paul at city-fan.org
Wed Jan 12 15:46:59 UTC 2005
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 at city-fan.org>
More information about the fedora-list
mailing list