[TriLUG] Dual core question

Charles Fischer fischer at 4pi.com
Mon May 23 15:08:00 EDT 2005


In the past I parsed /proc/cpuinfo looking for bogomips.  This works for 
Alpha systems and Intel.  This is what I am still doing, but would like to 
change.

-Charles Fischer

At 03:00 PM 5/23/2005, you wrote:
>Lee Fickenscher wrote:
>>I don't have any dual core boxes, but on linux couldn't you do something
>>like:
>>cat /proc/cpuinfo | grep -c processor
>>to get a core count? -Lee
>>Charles Fischer wrote:
>>>I would like to get a CPU core count from a Linux box.
>
>You need to modify that:
>
>cat /proc/cpuinfo | cut -f1 -d: | grep -c processor
>
>The reason is that my machine is a single processor, and here is the output:
>
>$ cat /proc/cpuinfo | grep -c processor
>2
>
>$ cat /proc/cpuinfo
>processor       : 0
>vendor_id       : AuthenticAMD
>cpu family      : 6
>model           : 7
>model name      : AMD Duron(tm) processor
>stepping        : 1
>cpu MHz         : 1300.040
>cache size      : 64 KB
>fdiv_bug        : no
>hlt_bug         : no
>f00f_bug        : no
>coma_bug        : no
>fpu             : yes
>fpu_exception   : yes
>cpuid level     : 1
>wp              : yes
>flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca 
>cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
>bogomips        : 2595.22
>
>$ cat /proc/cpuinfo | cut -f1 -d: | grep -c processor
>1
>
>--
>Scott G. Hall
>Raleigh, NC, USA
>ScottGHall at BellSouth.Net
>--
>TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
>TriLUG Organizational FAQ  : http://trilug.org/faq/
>TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc




More information about the TriLUG mailing list