linux memory exhaustion analysis
Others
2019-11-17 17:54:01
views: null
The operating system level
- View the overall health equipment
loadAverage
: 1 minute, the CPU core number 5 minutes, 15 minutes cpu load, full load 1 *
%us
: Cpu utilization of user-space program
%ss
: Cpu utilization of system processes
%id
: Idle cpu
H/shit+h
: Display thread information
- Memory Analysis
free -g
: View the overall memory usage, observe the following several indicators
- A total of how much memory the operating system
- How much memory has been used
buffer
, cached
There are how much memory is being used
-/+ buffers/cache
: -
Represents the system from an application point of view how much memory is used up, +
it represents a system from an application point of view how much memory is available
- How much memory the application uses / applications as well as how much memory can be used
- System monitoring tools:
sysstat
- Installation:
zypper in sysstat
(including iostat
, mpstat
, sar
, sa
)
- High IO load judgment basis:
svctm > 15s
: The average service time each IO operation
%util
close 100%
: how much time there is one second for IO operations
Process analysis
- Ordering process
ps -aux | sort -k4,4nr | awk '{sum += $1} END {print "sum=", sum}'
sort参数解释:k后面根的数字表示第几列,n表示数字,r表示逆序排列
- pidstat
pidstat -d -p {pid}
: The sampling process io
pidstat -u -p {pid}
: The sampling process cpu usage
pidstat -r -p {pid}
: Process memory usage for sampling
jstack -l {pid}
: View all the threads of a process, -l express check-locking
jstat
, jmap
Etc.
Performance Testing
chaosblade
: Ali Chaos Tools
memtester
: Memory testing tools
cpuburn
: Cpu test tools
reference
- linux process under which consumes our cache
- The reason grep use "\ d" matches the digital unsuccessful
- linux command --lsof command everything is a file
- Summary xargs command use parameter substitution
- xargs command tutorial Ruan Yifeng
Origin www.cnblogs.com/harry1989/p/11877074.html