This topic contains 1 reply, has 2 voices, and was last updated by wangari wangari 3 years, 1 month ago.

  • Author
  • #295
     Griffin Loche 

    I have a HP x86_64 Linux server running on RHEL / Debian Linux 6.x, how can I find out the number of CPU cores available?

  • #296
    wangari wangari 

    Hi Griffin,

    Start by using the Iscpu or nproc command to show the number of processing units. These are those available to the current process. They may be less than the number of online processors. It is worth noting that not all servers support hotplug a CPU on a running linux system.

    Proc file system is a pseudo-file system used as an interface to kernel data structures. Generally it is mounted at /proc. The /proc/cpuinfo file is a collection of CPU and system architecture dependent items. A different list for each supported architecture. One of the common entries is processor, this gives CPU number. Bogomips; a system constant that is calculated during kernel initialization is the second. The SMP machines have information for each CPU.

    nproc Instance

    The nproc command shows the number of processing units available:
    # nproc

    Sample outputs:

    lscpu Command

    lscpu collects CPU architecture information form /proc/cpuinfon in human-read-able format:
    # lscpu

    Sample outputs:

    Architecture: x86_64
    CPU op-mode(s): 32-bit, 64-bit
    Byte Order: Little Endian
    CPU(s): 8
    On-line CPU(s) list: 0-7
    Thread(s) per core: 1
    Core(s) per socket: 4
    CPU socket(s): 2
    NUMA node(s): 1
    Vendor ID: GenuineIntel
    CPU family: 6
    Model: 15
    Stepping: 7
    CPU MHz: 1866.669
    BogoMIPS: 3732.83
    Virtualization: VT-x
    L1d cache: 32K
    L1i cache: 32K
    L2 cache: 4096K
    NUMA node0 CPU(s): 0-7


    The /proc/cpuinfo and sysfs stores your CPU architecture info e.g number of threads, CPUs, sockets, cores, NUMA nodes, info on CPU caches, CPU family, model, bogoMIPS, yte order and much more:

    # less /proc/cpuin

You must be logged in to reply to this topic.


We're not around right now. But you can send us an email and we'll get back to you, asap.

TD Web Services



Log in with your credentials


Forgot your details?


Create Account