Why different CPU count from nproc and nproc --all in OpenVZ container?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












I'm trying nproc and nproc --all in an OpenVZ container to count the number of CPU threads assigned to the vps by upstream provider. While nproc resulting 1, nproc --all resulting 24 CPU threads. May anyone please help me in explaining this?



The upstream provider is supposed to assign only one CPU and cat /proc/cpuinfo is also saying that. Then from where and how this 24 is coming?



Please find a screenshot here https://prnt.sc/hfzeuw. I'm using CentOS 7 inside the vps.







share|improve this question


























    up vote
    3
    down vote

    favorite












    I'm trying nproc and nproc --all in an OpenVZ container to count the number of CPU threads assigned to the vps by upstream provider. While nproc resulting 1, nproc --all resulting 24 CPU threads. May anyone please help me in explaining this?



    The upstream provider is supposed to assign only one CPU and cat /proc/cpuinfo is also saying that. Then from where and how this 24 is coming?



    Please find a screenshot here https://prnt.sc/hfzeuw. I'm using CentOS 7 inside the vps.







    share|improve this question
























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      I'm trying nproc and nproc --all in an OpenVZ container to count the number of CPU threads assigned to the vps by upstream provider. While nproc resulting 1, nproc --all resulting 24 CPU threads. May anyone please help me in explaining this?



      The upstream provider is supposed to assign only one CPU and cat /proc/cpuinfo is also saying that. Then from where and how this 24 is coming?



      Please find a screenshot here https://prnt.sc/hfzeuw. I'm using CentOS 7 inside the vps.







      share|improve this question














      I'm trying nproc and nproc --all in an OpenVZ container to count the number of CPU threads assigned to the vps by upstream provider. While nproc resulting 1, nproc --all resulting 24 CPU threads. May anyone please help me in explaining this?



      The upstream provider is supposed to assign only one CPU and cat /proc/cpuinfo is also saying that. Then from where and how this 24 is coming?



      Please find a screenshot here https://prnt.sc/hfzeuw. I'm using CentOS 7 inside the vps.









      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 27 '17 at 18:17

























      asked Nov 27 '17 at 18:02









      Abhik Bose

      1,5341217




      1,5341217




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          They are using a 12 core proc with hyperthreading, most likely. They have assigned one of these threads to your container.



          From the man page:



           nproc - print the number of processing units available

          nproc [OPTION]...

          --all print the number of installed processors`


          Hope this helps!



          EDIT:



          What happens when you type the following:



          [user@host]$ getconf _NPROCESSORS_ONLN



          ?






          share|improve this answer
















          • 1




            getconf _NPROCESSORS_ONLN returning to 1
            – Abhik Bose
            Nov 27 '17 at 19:38










          • As anticipated it is showing the one (1) you have avail. Are you familiar with containers? If you'd like to learn more, I suggest reading: en.wikipedia.org/wiki/OpenVZ
            – kilrainebc
            Nov 27 '17 at 19:53











          • More than happy! :) Good luck!
            – kilrainebc
            Nov 27 '17 at 20:27










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f407340%2fwhy-different-cpu-count-from-nproc-and-nproc-all-in-openvz-container%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          They are using a 12 core proc with hyperthreading, most likely. They have assigned one of these threads to your container.



          From the man page:



           nproc - print the number of processing units available

          nproc [OPTION]...

          --all print the number of installed processors`


          Hope this helps!



          EDIT:



          What happens when you type the following:



          [user@host]$ getconf _NPROCESSORS_ONLN



          ?






          share|improve this answer
















          • 1




            getconf _NPROCESSORS_ONLN returning to 1
            – Abhik Bose
            Nov 27 '17 at 19:38










          • As anticipated it is showing the one (1) you have avail. Are you familiar with containers? If you'd like to learn more, I suggest reading: en.wikipedia.org/wiki/OpenVZ
            – kilrainebc
            Nov 27 '17 at 19:53











          • More than happy! :) Good luck!
            – kilrainebc
            Nov 27 '17 at 20:27














          up vote
          2
          down vote



          accepted










          They are using a 12 core proc with hyperthreading, most likely. They have assigned one of these threads to your container.



          From the man page:



           nproc - print the number of processing units available

          nproc [OPTION]...

          --all print the number of installed processors`


          Hope this helps!



          EDIT:



          What happens when you type the following:



          [user@host]$ getconf _NPROCESSORS_ONLN



          ?






          share|improve this answer
















          • 1




            getconf _NPROCESSORS_ONLN returning to 1
            – Abhik Bose
            Nov 27 '17 at 19:38










          • As anticipated it is showing the one (1) you have avail. Are you familiar with containers? If you'd like to learn more, I suggest reading: en.wikipedia.org/wiki/OpenVZ
            – kilrainebc
            Nov 27 '17 at 19:53











          • More than happy! :) Good luck!
            – kilrainebc
            Nov 27 '17 at 20:27












          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          They are using a 12 core proc with hyperthreading, most likely. They have assigned one of these threads to your container.



          From the man page:



           nproc - print the number of processing units available

          nproc [OPTION]...

          --all print the number of installed processors`


          Hope this helps!



          EDIT:



          What happens when you type the following:



          [user@host]$ getconf _NPROCESSORS_ONLN



          ?






          share|improve this answer












          They are using a 12 core proc with hyperthreading, most likely. They have assigned one of these threads to your container.



          From the man page:



           nproc - print the number of processing units available

          nproc [OPTION]...

          --all print the number of installed processors`


          Hope this helps!



          EDIT:



          What happens when you type the following:



          [user@host]$ getconf _NPROCESSORS_ONLN



          ?







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 27 '17 at 19:26









          kilrainebc

          363




          363







          • 1




            getconf _NPROCESSORS_ONLN returning to 1
            – Abhik Bose
            Nov 27 '17 at 19:38










          • As anticipated it is showing the one (1) you have avail. Are you familiar with containers? If you'd like to learn more, I suggest reading: en.wikipedia.org/wiki/OpenVZ
            – kilrainebc
            Nov 27 '17 at 19:53











          • More than happy! :) Good luck!
            – kilrainebc
            Nov 27 '17 at 20:27












          • 1




            getconf _NPROCESSORS_ONLN returning to 1
            – Abhik Bose
            Nov 27 '17 at 19:38










          • As anticipated it is showing the one (1) you have avail. Are you familiar with containers? If you'd like to learn more, I suggest reading: en.wikipedia.org/wiki/OpenVZ
            – kilrainebc
            Nov 27 '17 at 19:53











          • More than happy! :) Good luck!
            – kilrainebc
            Nov 27 '17 at 20:27







          1




          1




          getconf _NPROCESSORS_ONLN returning to 1
          – Abhik Bose
          Nov 27 '17 at 19:38




          getconf _NPROCESSORS_ONLN returning to 1
          – Abhik Bose
          Nov 27 '17 at 19:38












          As anticipated it is showing the one (1) you have avail. Are you familiar with containers? If you'd like to learn more, I suggest reading: en.wikipedia.org/wiki/OpenVZ
          – kilrainebc
          Nov 27 '17 at 19:53





          As anticipated it is showing the one (1) you have avail. Are you familiar with containers? If you'd like to learn more, I suggest reading: en.wikipedia.org/wiki/OpenVZ
          – kilrainebc
          Nov 27 '17 at 19:53













          More than happy! :) Good luck!
          – kilrainebc
          Nov 27 '17 at 20:27




          More than happy! :) Good luck!
          – kilrainebc
          Nov 27 '17 at 20:27

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f407340%2fwhy-different-cpu-count-from-nproc-and-nproc-all-in-openvz-container%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?