Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Div
classtitle-box
1.

System Information

Understanding your system's hardware and software configuration is the first step in diagnostics.

Code Block
languagebash
themeMidnight
titleCommands
    uname -a # Displays kernel version and system architecture.
    lscpu  # Provides detailed information about the CPU.
    lsblk # Lists all available block devices.
    lsusb # Shows USB devices connected to the system.
    lspci # Lists PCI devices.


Div
classtitle-box
2.

CPU and Memory Diagnostics

Monitoring CPU and memory usage helps in identifying performance bottlenecks.

  1. htop is an interactive system monitor process viewer and process manager. It is designed as an alternative to the Unix program top. It shows a frequently updated list of the processes running on a computer, normally ordered by the amount of CPU usage.
Code Block
languagebash
themeMidnight
    htop 

     2. vmstat Reports virtual memory statistics.

Code Block
languagebash
themeMidnight
    vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0  73236  21024 396016    0    0    16    32   23    9  2  1 95  0  2


Code Block
languagebash
themeMidnight
titleCommands
    vmstat # Reports virtual memory statistics.
    free -h # Displays memory usage.
    mpstat # Reports CPU usage.


Div
classtitle-box
3.

Disk Usage and Health

Keeping track of disk usage and health is crucial for preventing data loss and ensuring efficient storage management.

Code Block
languagebash
themeMidnight
titleCommands
    df -h # Shows disk space usage.
    du -sh /path/to/directory # Displays the size of a specific directory.
    fdisk -l # Lists all partitions.
    smartctl -a /dev/sda # Checks the health of a disk (requires smartmontools).
    iostat # Reports CPU and I/O statistics.


Div
classtitle-box
4.

Process and Service Management

Managing processes and services is essential for maintaining system stability.

Code Block
languagebash
themeMidnight
titleCommands
    ps aux # Lists all running processes.
    systemctl status service_name # Checks the status of a service.
    journalctl -u service_name # Views logs for a specific service.
    kill -9 process_id # Forces termination of a process.
    nice and renice # Adjusts process priority.


Div
classtitle-box
5.

Logs and Monitoring

Analyzing logs and monitoring system activities can help in identifying issues and tracking system performance.

...