Troubleshooting Linux Scenarios Part 01
Troubleshooting Linux Scenarios Part 01
Introduction:
In this post we are talking about the ability to troubleshoot and resolve issues is paramount
for software developers, DevOps engineers, and architects alike. Understanding the
intricacies of the system and having a structured approach is key to efficiently address
challenges that may arise. This compilation of Linux troubleshooting scenarios provides a
step-by-step guide to tackle common issues, ensuring that servers, applications, and services
remain robust and accessible.
Approach / Solution:
Approach / Solution:
├── Identify the process causing high CPU usage using top or htop
├── Check if the issue is intermittent or continuous
├── Review logs for any error messages or known issues
├── Inspect running processes and their resource consumption
├── Investigate potential malware or unauthorized processes
├── Consider optimizing or scaling the application
├── Monitor system metrics over time to identify patterns
├── Apply performance tuning based on the specific application
└── ...
Approach / Solution:
Approach / Solution:
Approach / Solution:
├── One of the error that causes the system unable to BOOT UP
├── Check /var/log/messages, dmesg, and other log files
├── If we have bad sector logs, we have to run fsck
Issue 6: Can’t cd to the directory even if the user has sudo privileges
Approach / Solution:
Approach / Solution:
├── Types
│ ├── Cache (L1, L2, L3)
│ ├── RAM
│ │ ├── Usage
│ │ │ ├── #free -h
│ │ │ │ ├── Total (Total assigned memory)
│ │ │ │ ├── Used (Total actual used memory)
│ │ │ │ ├── Free (Actual free memory)
│ │ │ │ ├── Shared (Shared Memory)
│ │ │ │ ├── Buff/Cache (Pages cache memory)
Approach / Solution:
├── Due to running out of memory, we would need to add more swap space
│ ├── Create a file with #dd, as it will reserve the blocks of disk for the
swap file
│ ├── Set permission 600 and give root ownership
│ ├── #mkswap
│ ├── Now Turned swap on #swapon
│ ├── fstab entry for persistence
└── ...
Approach / Solution:
Approach / Solution: