lkml.org 
[lkml]   [1999]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: number of CPUs
On Fri, 16 Apr 1999, Albert D. Cahalan wrote:

>
> I need a way for userspace to get the number of CPUs. It appears that
> /proc/interrupts doesn't have the nice header for every architecture,
> and /proc/cpuinfo is hopelessly non-portable.


This seems to work for me on both 2.2 and 2.0

grep -c processor /proc/cpuinfo




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.213 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site