Versions Compared

Key

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

...

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.
    uptime # Shows how long the system has been running and load averages.Load average reflects the average number of processes waiting to run or use CPU resources over different time intervals, typically 1, 5, and 15 minutes.



Div
classtitle-box

CPU and Memory Diagnostics

Monitoring CPU and memory usage helps in identifying performance bottlenecks.

...

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.

Installation: on Ubuntu or Debian-based systems via command apt install htop or sudo yum install htop on CentOS

Code Block
languagebash
themeMidnight
    htop 

...

Code Block
languagebash
themeMidnight
titleСommands
systemctl restart service_name # Restarts a service. If a service is not behaving correctly, stopped responding, restarting it can often resolve the issue without needing a full system reboot.
When Also, when you modify a service config file, using systemctl restart applies the changes immediately. 

systemctl enable service_name # Enables a service to start at boot.
 
kill -9 process_id(PID) # Forces termination of a process.
#(No output unless there is an error, the process is terminated forcefully)

...

Code Block
languagebash
themeMidnight
tail /var/log/syslog # Shows the last part of the logs, where problems usually liejournalctl -f # will show you the latest system logs and keep updating the display with new log entries as they are created, which is useful for monitoring live system activity.


Essential Linux Log Files:

...