This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux:debug [2021/03/11 02:08] tkilla created |
linux:debug [2021/05/03 13:18] (current) tkilla [High Load] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Debug ====== | ====== Debug ====== | ||
- | Generic Tools to find root causes of problems | + | Check the logs |
dmesg -Hw # Human readable, follow | dmesg -Hw # Human readable, follow | ||
tail -f / | tail -f / | ||
tail -f / | tail -f / | ||
+ | |||
+ | |||
+ | ===== Out of Memory Problems ===== | ||
Check RAM usage. Yes, it's always full, but space in " | Check RAM usage. Yes, it's always full, but space in " | ||
free -m | free -m | ||
- | | + | Show all Processes, sorted by virtual sizes (incl. shared libraries) |
+ | ps awwlx --sort=vsz | ||
Line 27: | Line 31: | ||
- | ==== Tools to debug High Load ==== | ||
=== Check load === | === Check load === | ||
Line 35: | Line 38: | ||
top | top | ||
| | ||
- | Cpu(s): 11.4%us, 29.6%sy, 0.0%ni, 58.3%id, .7%wa, 0.0%hi, 0.0%si, 0.0%st | + | |
+ | |||
+ | |||
+ | Results: | ||
IF " | IF " | ||
+ | |||
+ | IF " | ||
Line 52: | Line 60: | ||
ps -e v | ps -e v | ||
- | This outputs the state of each process. Specially D is intereting (but also R): | ||
- | D Marks a process in disk (or other short term, uninterruptible) wait. | + | Check which processes are in R or D state: |
- | R Marks a runnable process | + | |
- | ... | + | ps -eo s,user,cmd | grep ^[RD] | sort | uniq -c | sort -nbr | head -20 |
+ | |||
+ | |||
+ | This outputs the state of each process. Specially D is interesting (but also R): | ||
+ | |||
+ | * D Marks a process in disk (or other short term, uninterruptible) wait. | ||
+ | | ||
+ | |||
+ | |||
+ | PSN - Linux Process Snapper is another nice tool: | ||
+ | |||
+ | Install from: https:// | ||
=== Links === | === Links === | ||
* https:// | * https:// | ||
- | * | + | * https:// |
+ | * https:// | ||