Re: system call for finding the number of cpus??

From: David Ford (david+cert@blue-labs.org)
Date: Mon Apr 08 2002 - 17:59:04 EST


# grep -c "^processor" /proc/cpuinfo
2

-d

Robert Love wrote:

>
>Linux does not implement such a syscall. Note
>
> cat /proc/cpuinfo | grep processor | wc -l
>
>works and is simple; you do not have to do it via script - execute it in
>your C program, save the one-line output, and atoi() it.
>
> Robert Love
>

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



This archive was generated by hypermail 2b29 : Mon Apr 15 2002 - 22:00:11 EST