Interview Prep/Linux/Rapid-Fire Commands

Gather a quick system snapshot to attach to an incident ticket.

IntermediateProductionRapid-Fire Commands
Answer
{
  date -u; hostnamectl; uptime
  free -m; df -hT; df -i
  vmstat 1 5; iostat -xz 1 3
  ps -eo pid,ppid,user,stat,%cpu,%mem,etime,args --sort=-%cpu | head -25
  ss -s; systemctl --failed
  journalctl -p err -b --since "-1h" --no-pager | tail -100
  dmesg -T | tail -50
} > /var/tmp/snapshot-$(hostname)-$(date +%s).txt 2>&1

For deeper collection use sos report (RHEL) or sosreport on Ubuntu.

All Linux questions Roadmap: Linux

More on Rapid-Fire Commands