The blocks marked Run on this page can run in your browser: the first one downloads and starts a small machine, with no network. That needs JavaScript. Without it you read the output saved with the document.
No networkInspect a machine#
A runbook for answering "what is this box?" with only the tools in a minimal Alpine Linux image (BusyBox). The machine here is the page's own virtual machine, so the numbers describe it, not your computer.
Who and where#
echo "user: $(id -un) (uid $(id -u))"
echo "host: $(hostname)"
uname -srm
cat /etc/alpine-releaseCPU#
The machine has one virtual CPU.
grep -c '^processor' /proc/cpuinfo
head -n 12 /proc/cpuinfoMemory#
head -n 5 /proc/meminfo
echo
free -mMemAvailable is the number to watch. MemFree ignores memory the kernel can take back from caches.
Disks and mounts#
df -hmount | head -n 20Look for the root file system and for tmpfs mounts such as /tmp and /dev/shm. The kernel's own view is in /proc/mounts.
Processes#
ps
echo
uptimeLoad and uptime in the raw#
cat /proc/loadavg
cat /proc/uptimeThe three load numbers are the 1, 5 and 15 minute averages, then running and total tasks, then the last process id. The two uptime numbers are seconds up and seconds idle.
Checklist#
- Identify the system (
uname,/etc/*-release). - Count CPUs and read
MemAvailable. - Check free space with
df -hbefore you write anything big. - Read
mountfor read-only or unexpected mounts. - List processes and the load average.