Wednesday, February 15, 2017

Check CPU Details of any Linux server

Check CPU Details of any Linux server


 Use below command to check the CPU details of any linux server

show all cores (virtual)
grep -c processor /proc/cpuinfo
64

show physical cpu
grep 'physical id' /proc/cpuinfo | sort -u | wc -l
4

show physical core per cpu
grep 'cpu cores' /proc/cpuinfo | tail -1
cpu cores    : 8



so the final result is 
physical cpu: 4
physical core per physical cpu: 8
whole physical core: 32
whole virtual core: 64

Tuesday, February 7, 2017

Stop and Continue a Linux Process


Suppose you need to stop any process on Linux server due to high load or low Memory issue on server. Then execute below command

kill -STOP 10007 (10007 is the pid)

Once the load became normal simply continue the process with below command

kill -CONT 10007 (10007 is the pid)