Messages in this thread | | | Date | Mon, 16 Sep 1996 16:11:46 +0200 (MET DST) | From | Hans Lermen <> | Subject | Re: Module Versioning Problems: How to "probe" for SMP |
| |
On Mon, 16 Sep 1996, Jacques Gelinas wrote: > On Mon, 16 Sep 1996, Hans Lermen wrote: > > On Mon, 16 Sep 1996, Jacques Gelinas wrote: > > > I was looking for some simple way to probe the information available in > > > /proc maybe. It there any ? Should we add one ? This would reduce the > > > confusion. > > A simple one is > > cat /proc/cpuinfo | grep 'processor.:.1' > Except that if you boot on a non-SMP (or a SMP machine with only one > processor active), this test won't work.
On SMP kernel you have _one_ cpuinfo entry per CPU, hence
cat /proc/cpuinfo | grep processor
on 2 dual CPU board gives you
processor : 0 processor : 1
So, if the the search for 'processor.:.1' fails you are on a uniprocressor kernel else on a SMP kernel.
However, a SMP kernel where all but one CPU is disabled will also report 'uniprocessor'.
> > cat /proc/ksyms | grep cpu_data > This works I guess, but this is a ack. We really need something like > /proc/smp > or a special line at the begining of cpuinfo > or the word SMP written in plain in /proc/version.
Agreed, that would be much clearer.
So long, Hans <lermen@fgan.de>
| |