Find the answer to your Linux question:
Results 1 to 5 of 5
I know I can get info from /proc/cpuinfo, but it gives me two cpu id, as it is dual core, even from yast2-> hardware information, it still shows 2 cpus. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2007
    Posts
    26

    What/Where to locate the number of CPU?


    I know I can get info from /proc/cpuinfo, but it gives me two cpu id, as it is dual core, even from yast2-> hardware information, it still shows 2 cpus. how to find out the physical cpu number? What command can do that?

    or how to understand the information from /proc/cpuinfo?

    Thanks.

  2. #2
    Linux Engineer rong's Avatar
    Join Date
    Feb 2005
    Location
    California
    Posts
    803
    Interesting question. I run a single core p4 here and /proc/cpuinfo also shows two cpu entries, 0 and 1. I checked /proc/cpuinfo on a slackware box here which runs the same p4 and only one entry there.

    I have no idea why.

    If you really want more info about /proc/cpuinfo you can get some hairy details by googling!
    registered Linux user #388382

    Have you checked here first?

  3. #3
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,104
    Quote Originally Posted by rong
    Interesting question. I run a single core p4 here and /proc/cpuinfo also shows two cpu entries, 0 and 1. I checked /proc/cpuinfo on a slackware box here which runs the same p4 and only one entry there.

    I have no idea why.

    If you really want more info about /proc/cpuinfo you can get some hairy details by googling!

    Hyperthreading can look like a second CPU to some process.

    AFAIK there is no difference between 2 physical CPUs and a mult CPU chip. There is a difference between Hyperthreading and multiple CPUs. I wonder why steeles even need to know this. Two CPUs are two CPUs wheither on single chip or on seperate ones. In fact at least till recently Intel's where two seperate pieces of silicon mounted in one carrier.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jan 2007
    Posts
    26
    Reason I am asking is because I am going to purchase some software license, and that license is based on physical CPU number.

    That is why I ask.

  6. #5
    Just Joined!
    Join Date
    Jul 2010
    Posts
    2

    Check "physical id" in /proc/cpuinfo output

    "physical id" in cpuinfo will tell you the IDs for each physical processor. Counting them will give you the result you need. Solution at theunixtips.com slash how-to-find-number-of-cpus-on-unix-system

    grep “^physical id” /proc/cpuinfo | awk ‘{print $NF}’ | sort -u | wc -l

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •