Re: how to tell if my kernel is SMP enabled?

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

 



On Tue, Apr 1, 2008 at 1:49 PM, Michael Blizek
<michi1@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> On 12:15 Tue 01 Apr     , Robert P. J. Day wrote:
>  >
>  >   a simple one this time -- how can i tell if my currently-running
>  > kernel is SMP capable?
>
>  gunzip -c /proc/config.gz |grep SMP
>
>  --
>  programing a layer 3+4 network protocol for mesh networks
>  see http://michaelblizek.homelinux.net
>
>
>
>
>  --
>  To unsubscribe from this list: send an email with
>  "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
>  Please read the FAQ at http://kernelnewbies.org/FAQ
>
>

You could check on /proc/sys/kernel/version for 'SMP'.
Then, a SMP kernel might be running on a single processor machine, so
you could try to set the processor affinity of a dummy process to a
possible secondary CPU with sched_setaffinity(), and if it fails,
means that you have only one CPU.

-- 
What this world needs is a good five-dollar plasma weapon.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux