Linux Survival Basics
Read-onlyRead Load Average Before You React
You need a fast snapshot of system load and how long the machine has been running.
Command
uptime
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not assume high load always means CPU saturation; blocked I/O can raise load too.
Expected output
A single line showing current time, uptime, user count, and 1, 5, and 15 minute load averages.
System impact
Read-only. Nothing changes. The command prints uptime, users, and load averages.
Recovery / rollback: no state is changed.
When to use it
Use at the start of performance triage to see whether pressure is rising or falling.
When not to use it
Do not assume high load always means CPU saturation; blocked I/O can raise load too.
Watch this command run
Command transcript
This sanitized transcript shows the commands and output shape without exposing host details.
$ uptime
12:32:44 up 18 days, 3:11, 2 users, load average: 3.91, 2.44, 1.08
$ ps -eo pid,ppid,stat,pcpu,pmem,comm,args --sort=-pcpu | head -n 10
PID PPID STAT %CPU %MEM COMMAND COMMAND
1842 1 R 86.4 4.2 app-worker /srv/app/worker --jobs
1907 1 S 12.8 1.1 nginx nginx: worker process
2011 1 S 4.5 7.9 postgres postgres: checkpointer
View commands shown
These are the commands shown in the sanitized transcript.
Commands shown
uptimeps -eo pid,ppid,stat,pcpu,pmem,comm,args --sort=-pcpu | head -n 10
next steps
Related commands
Compare Kernel and Distro Versions
The distro version and kernel version answer different questions.
printf 'kernel=%s arch=%s distro=%s\n' "$(uname -r)" "$(uname -m)" "$(lsb_release -ds)"
Show Recent Server Reboots
Confirm whether the server actually rebooted and when.
last -x reboot | head -5
See Which Packages Want Updates
Before you upgrade anything, list what would move.
apt list --upgradable
Check Memory Pressure with free
Linux memory numbers look scary until you know which column matters.
free -h
Count Failures by Test File
Turn noisy test logs into a ranked failure list.
grep -RhoE '[A-Za-z0-9_./-]+\.(test|spec)\.(js|ts|py|rb)' logs/ | sort | uniq -c | sort -nr | head
Study mapping
Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.
Useful for
- LPIC-1 style command-line practice
- LFCS style performance tasks
- Linux+ style troubleshooting review
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.