lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 14 Sep 2012 20:30:15 +0800
From:	Cong Wang <xiyou.wangcong@...il.com>
To:	JA Magallón <jamagallonn@...il.com>
CC:	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: Question on /proc/cpuinfo

On 09/14/2012 07:18 AM, JA Magallón wrote:
> Hi...
>
> Probably it is a stupid question, but... I wan to count the number of
> processors, cores and threads on a linux system. I do it by reading
> /proc/cpuinfo.
>
...
>
> Since when is it safe to read things the modern way (kernel version ?).
> Is there a better procedure to get this info ?
>

Probably lscpu(1) is better for you, on my laptop it outputs:

% lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    1
Core(s) per socket:    2
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 23
Stepping:              10
CPU MHz:               2401.000
BogoMIPS:              4788.03
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              3072K
NUMA node0 CPU(s):     0,1

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ