Ravindra BagaleCourses & study guides

Chapter 4: Linux Ops Refresh for DevOps

4.5 Disk, process, ports — the triage trio

Disk — df -h

df -h

What you see: size, used, available, use% per mount. If / is 100%, new deploys, logs and Docker layers fail in confusing ways. Clear old logs or unused images (carefully) — do not delete random system folders.

Process — ps

ps aux | head
ps aux | grep -i nginx

What you see: process list with user and command. Confirm the app you expect is alive.

Ports — ss (logical counters)

ss -tlnp

What you see: TCP ports in listen mode, and often the process name. Remember: one building (IP), many published ports (ports). Port 22 is SSH. Port 80 is HTTP. Your app might use 3000 or 8080 on the host during labs — still a logical counter, not hardware.

Ravindra Bagale's Tip

Khup students localhost var kaam karta aani Security Group madhe port open nahi karta — "AWS down" mhanun blame. Aadhi server-local curl, mag SG / firewall. Farak lakshat theva!

Steps — five-minute triage

  1. df -h — any mount ≥ 90%?
  2. systemctl status <service> — active?
  3. ss -tlnp — expected port listening?
  4. curl -I http://localhost:<port> — what status?
  5. journalctl -u <service> -n 50 — last error line?