Linux: How to check CPU Count & Memory

// memory Utilization
[root@host ~]# free -m
             total       used       free     shared    buffers     cached
Mem:        258294       2802     255492          0        187        735
-/+ buffers/cache:       1879     256414
Swap:        16499          0      16499

// CPU Processor Count
[root@ahost ~]# nproc
32
(if the above didn't work, try the below 2 cmds for CPU Count & no of Cores)
[root@host ~]# grep -c processor /proc/cpuinfo
8
[root@host ~]# grep "cpu cores" /proc/cpuinfo |sort -u |cut -d":" -f2 | awk '{s+=$1} END {print s}'
4
// the below cmd give detail CPU info
>>less /proc/cpuinfo

No comments:

Post a Comment