Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Saturday, September 19, 2020

Performance monitoring in Linux

CPU

cd /proc/

cat cpuinfo

less cpuinfo

less cpuinfo | grep processor

uptime

The load average is the CPU usage load average over 1 min, 5 min, and 15 min. The calculation for load avg value is given below.

For a single processor system:

Load avg value 1.0 = 100% CPU capacity usage

Load avg value 0.5 = 50% CPU capacity usage


This means for a 4 processor system:

Load avg value 4.0 = 100% CPU capacity usage

Load avg value 2.0 = 50% CPU capacity usage

Load avg value 1.0 = 25% CPU capacity usage


top

To get details of a process: ps aux | grep <process ID>

To get logs of a process: journalctl _PID=<process ID>


Memory


cat /proc/meminfo
less /proc/meminfo


free -h


Average memory usage view by samples with regular intervals: 

vmstat <interval> <number of samples>

Hope it was useful. Cheers!