Actually /proc/cpuinfo should be easy to parse:

[root@mybox /tmp]# cat /proc/cpuinfo | grep processor
processor       : 0
processor       : 1
processor       : 2
processor       : 3

Or add another pipe:

[root@mybox /tmp]# cat /proc/cpuinfo  | grep processor | wc -l
      4

4 CPU's  :)

Regards,
Andy.

Andrew Rechenberg
Infrastructure Team, Sherman Financial Group
arechenberg @ shermanfinancialgroup.com





-----Original Message-----
From: Kent Borg [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, September 11, 2002 4:53 PM
To: [EMAIL PROTECTED]
Subject: Re: Odd Q: How to check CPU count on *Nix server? - PLZ HELP!!!


On Wed, Sep 11, 2002 at 01:36:28PM -0700, Andreas Freyvogel wrote:
> #top

to David Kramer's question:
> Odd question, Is it possible to check how many CPU's a *Nix Server
contains
> from command line??  Need to know in order set the Parallelism Degree
within
> Oracle.  Im using KSH shell if that matters.

And that looks like a groady answer.  I think top gets its info by
looking in /proc.  Casting about in my single-CPU /proc, however, I
don't see any obvious place where a second CPU would show up.  That
is, other than /proc/cpuinfo, but that looks annoying and unreliable
to parse.

Maybe look in the sources to top...?


-kb



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to