You run systemctl status nginx and get a wall of text. Most of it looks like noise. But it’s all signal if you know how to read it.
Let’s decode every field in systemctl status output.
A Sample Output
$ systemctl status nginx● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/etc/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2025-04-16 10:23:45 UTC; 2 days ago Docs: man:nginx(8) Process: 1234 ExecStart=/usr/sbin/nginx -g daemon off; (code=exited, status=0/SUCCESS) Main PID: 1235 (nginx) Tasks: 5 Memory: 12.5M CPU: 2h 14m 23.120s CGroup: /system.slice/nginx.service ├─1235 nginx: master process /usr/sbin/nginx -g daemon off; ├─1236 nginx: worker process └─1237 nginx: worker process
Apr 16 10:23:45 server nginx[1235]: 2025/04/16 10:23:45 [notice] 1235#1235: Apr 16 10:23:46 server nginx[1236]: Connection establishedLet’s break this down line by line.
The Header
● nginx.service - A high performance web server and a reverse proxy serverThe ● bullet shows the status visually:
●(filled) = running○(empty) = stopped⊘(crossed) = failed
The service name is nginx.service. The description comes from the Description= field in the unit file.
Loaded
Loaded: loaded (/etc/systemd/system/nginx.service; enabled; vendor preset: enabled)Loaded state:
loaded— Unit file found and parsednot-found— Unit file doesn’t existbad-setting— Unit file has syntax errorserror— Other parsing error
Enabled/Disabled:
enabled— Service starts at bootdisabled— Service doesn’t start at bootstatic— Service is dependency of another unit, can’t be directly enabled/disabledmasked— Service can’t be started (intentionally disabled)
Vendor preset:
- The default state from the distribution (
enabledordisabled)
In this example: The service is loaded and enabled, meaning it starts automatically on boot.
Active
Active: active (running) since Wed 2025-04-16 10:23:45 UTC; 2 days agoActive state:
active (running)— Service is runningactive (exited)— Service ran successfully and exited (one-shot service)active (waiting)— Service is waiting for somethinginactive (dead)— Service is stoppedinactive (waiting)— Service is waiting to be startedfailed— Service crashed or reached an error state
The timestamp shows when the state changed.
Failed service example:
Active: failed (Result: exit-code) since Wed 2025-04-16 10:23:45 UTC; 2 days agoIf it’s failed, check:
exit-code— Process exited with nonzero statussignal— Process was killed by a signal (SIGTERM, SIGKILL, etc.)core-dump— Process dumped core (crashed hard)timeout— Service took too long to start or stop
Process and Main PID
Process: 1234 ExecStart=/usr/sbin/nginx -g daemon off; (code=exited, status=0/SUCCESS)Main PID: 1235 (nginx)Process line: Shows the result of the last ExecStart command (how the service started).
code=exited, status=0— Process exited with status 0 (success)code=exited, status=1— Exited with status 1 (error)code=killed, signal=15— Killed with SIGTERM
Main PID: The process ID of the main process. If this PID dies, systemd restarts the service (if configured).
Mismatch? If Main PID is gone but the service says “running”, something’s wrong. The service might have crashed but systemd hasn’t noticed yet.
Tasks, Memory, CPU
Tasks: 5Memory: 12.5MCPU: 2h 14m 23.120s- Tasks — Number of processes in this service’s cgroup
- Memory — RSS memory usage (excluding page cache)
- CPU — Total CPU time consumed (user + system)
High CPU and low memory? Infinite loop or busy-waiting. High memory? Memory leak.
CGroup
CGroup: /system.slice/nginx.service ├─1235 nginx: master process /usr/sbin/nginx -g daemon off; ├─1236 nginx: worker process └─1237 nginx: worker processThis is the process tree. Shows all processes belonging to the service.
Each line shows:
- PID
- Process name and arguments
If you see processes here that shouldn’t be, something spawned child processes that didn’t die.
If you see no processes but the service says “running”, the main process just died.
Recent Logs
Apr 16 10:23:45 server nginx[1235]: 2025/04/16 10:23:45 [notice] 1235#1235:Apr 16 10:23:46 server nginx[1236]: Connection establishedThe last few lines from the journal. Useful for spotting recent errors.
If logs are missing, check:
- Did journald start after the service?
- Is the service outputting to syslog vs its own handler?
See full logs with:
journalctl -u nginxPutting It Together: Troubleshooting Examples
Service is failed
Active: failed (Result: exit-code) since Wed 2025-04-16 10:23:45 UTC; 5 minutes agoAction: Check the log section and recent journal entries.
journalctl -u nginx -n 50Service is running but Main PID is gone
Active: active (running) since Wed 2025-04-16 10:23:45 UTC; 2 days agoMain PID: 1235 (nginx) [WRONG, PID doesn't exist]The service crashed but systemd hasn’t reloaded the status yet, or the service doesn’t restart on failure.
Action:
systemctl restart nginxjournalctl -u nginx -f # Follow liveMemory usage is climbing
Memory: 512M # Or whatever is hugeAction: Check if there’s a memory leak.
journalctl -u nginx -p warning # Check for warningssystemctl restart nginx # Restart and monitorCPU is pegged at 100%
CPU: 500h 20m (abnormally high)The service has been running 500 hours and used 500 hours of CPU? That’s 100% utilization since it started.
Action:
top -p <PID> # See what's eating CPUService is disabled but running
Loaded: loaded (...; disabled; ...)Active: active (running) since ...This means the service was manually started, but won’t restart on reboot.
Action: Decide if it should be enabled:
systemctl enable nginx # Enable at bootsystemctl disable nginx # Don't start at bootService takes forever to stop
Active: failed (Result: timeout) since Wed 2025-04-16 10:23:45 UTC; 1 minute agoThe service didn’t stop within TimeoutStopSec (default 30s).
Either:
- The service is hanging on shutdown
- The timeout is too short
- A child process isn’t shutting down cleanly
Action:
systemctl kill nginx # Force killsystemctl status nginx # Check statusjournalctl -u nginx -n 20 # See what happenedThe Full Context Command
To get complete information:
systemctl status nginx -l --no-pager# -l = full output (don't truncate)# --no-pager = all at onceThen follow the live journal:
journalctl -u nginx -fReading a One-Shot Service
One-shot services run once and exit:
Active: active (exited) since Wed 2025-04-16 10:23:45 UTC; 2 days agoThis is normal. “Exited” doesn’t mean failed, it means the service did its job and stopped.
If it has RemainAfterExit=yes in the unit file, it stays “active” even after exiting. Otherwise, it goes to “inactive (dead)” after a few seconds.
The Quick Diagnosis
When something’s broken, run these in order:
# 1. What's the status?systemctl status service-name
# 2. See the recent logsjournalctl -u service-name -n 50 --no-pager
# 3. Follow livejournalctl -u service-name -fMost problems are visible in the status and logs. You’ll find your answer there.
Systemctl status is one of the most powerful diagnostic tools in Linux. Learn to read it and you’ll debug services in seconds instead of minutes.