DevOps
Linux
System & Networking

System & Networking

When a server is slow or a service is unreachable, these are the tools you'll use to diagnose and fix the issue.

System Monitoring

  • top: Displays an interactive, real-time view of running processes.
  • htop: A modern, colorful, and more user-friendly version of top.
  • ps aux: List all running processes in detail.
  • kill -9 <PID>: Forcefully terminate a process by its ID.
  • uptime: See how long the system has been running and the current load average.
  • free -h: Check available memory (RAM) in a human-readable format.
  • df -h: Check disk free space.

Networking Tools

  • ping <host>: Check connectivity to a server (e.g., ping google.com).
  • nslookup <domain>: Query DNS to find the IP address of a domain.
  • curl -v <url>: Fetch the content of a URL (use -v for verbose headers).
  • ifconfig / ip addr: Display or configure network interfaces and see your IP address.
  • netstat -tulnp: List all tcp/udp ports the system is listening on.
  • telnet <host> <port>: Test if a specific port is open on a remote host.

Summary Table

ToolCategoryPrimary Use
htopProcessReal-time CPU/RAM monitoring
df -hStorageChecking disk usage
nslookupNetworkTroubleshooting DNS issues
curlNetworkTesting API endpoints
netstatNetworkChecking for port conflicts

[!NOTE] Load average (seen in top or uptime) represents the average number of processes waiting for CPU time. If it's higher than your CPU core count, the system might be overloaded.