Junior — Middle
What tools are used for diagnosing and troubleshooting in Linux systems?
sobes.tech AI
Answer from AI
Tools commonly used for diagnosing and troubleshooting issues in Linux include:
- top, htop — monitoring processes and system load in real-time.
- ps — viewing running processes.
- dmesg — viewing kernel system messages, useful for hardware problem diagnosis.
- journalctl — viewing systemd logs.
- strace — tracing system calls of a process, helps understand what the program is doing.
- lsof — shows open files and ports.
- netstat, ss — diagnosing network connections.
- vmstat, iostat — monitoring CPU, memory, and disk resources.
- tcpdump — capturing and analyzing network traffic.
- gdb — debugger for programs.
Example of using strace for diagnosis:
strace -p <pid>
This allows you to see the system calls of the process with the specified pid.