Linux Administrator

How to Check Number of Processor (vCPU) on Linux VPC

Question: I have a virtual private server and want to check the number of processor on that vps so how can I check the number of processor on my vps.

Answer : To check the number of virtual processor (cpu) on Linux vps, you have to run any of these below commands.

Check Number of Processor on Linux VPS

Follow the below command to check the number of processor on Linux VPS.

1. Run the below command to to check exact number of virtual cpu (vCPU).

# cat /proc/cpuinfo | grep processor | wc -l
2

2. This command will grep any available vCPU. First cpu will start with 0.

Example:

# cat /proc/cpuinfo | grep processor
processor       : 0

Above CentOS server is with 1 vCPU.

# cat /proc/cpuinfo | grep processor
processor       : 0
processor       : 1

Above CentOS server is with 2 vCPU.

This command will also return the same result as steps (2).

# grep processor /proc/cpuinfo
processor       : 0

For additional information, you can display the number of cores on each CPU. Either Duo/Quad?

# cat /proc/cpuinfo |grep cpu\ cores |uniq
cpu cores       : 4
Thank you! for visiting LookLinux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at LookLinux Submit Article. Stay connected to Facebook.

About the author

mm

Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Leave a Comment