ARTICLE

πŸš€ DevOps Engine Room: Processes, Networking, and Storage in Linux

πŸš€ DevOps Engine Room: Processes, Networking, and Storage in Linux

 


As a DevOps engineer, you don't just write automation scripts—you troubleshoot live production systems. When an application crashes, slows down, or runs out of space, these are the exact Linux tools you use to diagnose and fix the issue.

1. Process Management: Keeping Applications Alive

A "process" is a running instance of your application. Managing them effectively keeps your infrastructure stable.

  • ps: Displays a snapshot of active processes. Use ps aux to see every process running on the system, which user owns it, and its resource usage.

$ ps aux | grep nginx

  • top & htop: Real-time system monitors. While top is standard, htop provides a colorful, interactive view of CPU cores, memory utilization, and running processes.

$ htop

  • kill & pkill: Used to terminate misbehaving or frozen processes. kill [PID] stops a process by its specific Process ID, while pkill [name] kills it by name.

# Kill a process using its ID
$ kill 1234

# Kill all processes matching the name
$ pkill nginx

  • systemctl: The central tool for controlling background services (systemd). You will use it daily to start, stop, enable, or check the status of services.

$ sudo systemctl restart docker
$ sudo systemctl status nginx

journalctl: The master log explorer. When a service fails to start via systemctl, use this to read the exact error logs.

$ journalctl -u docker.service --no-pager | tail -n 20



2. Networking: Connecting and Troubleshooting Services

Microservices and cloud infrastructure rely entirely on solid networking. When containers or VMs can't talk to each other, use these tools to find out why.

  • IP Addressing & DNS: The foundation. IP addresses route traffic to machines, while DNS translates domain names to those IPs.
  • ssh: Secure Shell. The primary way to securely log into and manage a remote Linux server via the terminal.

$ ssh ubuntu@10.0.0.5

  • ping: Sends small packets to a destination to check if a remote server is reachable and responsive.

$ ping -c 4 google.com

  • curl & wget: Tools to interact with web servers via CLI. curl is excellent for testing HTTP API responses, while wget is built for downloading files directly.

# Test api header response
$ curl -I https://api.github.com

# Download a package file
$ wget https://releases.hashicorp.com/terraform/1.5.0/terraform_1.5.0_linux_amd64.zip

  • netstat / ss: Shows open network ports and active connections. ss -tulpn tells you exactly which applications are listening on which ports (crucial for debugging "port already in use" errors).

$ sudo ss -tulpn

  • traceroute: Tracks the exact path and network hops a packet takes to reach a destination, helping pinpoint where a network connection is dropping.

$ traceroute 8.8.8.8



3. Disk Management: Preventing Storage Crashes

"Disk space full" is one of the most common causes of production outages. You must know how to inspect storage.

  • df: Disk Free. Shows the available space on all mounted filesystems. Use df -h for human-readable formats (GB/MB).

$ df -h

  • du: Disk Usage. Tracks down exactly which files or folders are consuming the most space.

# Check current directory breakdown aggregated in human format
$ du -sh *

  • lsblk: Lists all available block storage devices (hard drives, NVMe drives, AWS EBS volumes) attached to the machine, showing their sizes and partition structures.

$ lsblk

  • fdisk: A powerful utility to create, delete, and manipulate partitions on your storage drives.

# View system partitions
$ sudo fdisk -l

  • mount: Attaches a physical or cloud storage drive to a specific directory in the Linux file tree so the system can read and write to it.

$ sudo mount /dev/sdb1 /mnt/data


Comments