Click the virtual machine below to start practicing
>_ Tekhnikum | Lab
Setting up virtual machine…
Preparing lab files…
Starting terminal services…
This lab machine has stopped
Your progress through the guide is saved. Start a fresh machine to keep practicing.
Quick recall
From the last lab. Answer in your head, then open to check.
1. How does a script avoid building the same session twice?tmux has-session -t name succeeds if it exists: tmux has-session -t name 2>/dev/null || build-it.2. Without attaching, how do you print everything a pane has shown?tmux capture-pane -p -S - -t name (-S - means from the start of its history).
Introduction
No step-by-step this time. Something is crashing on the server, and two logs in ~/project/logs are being written right now.
The Incident Room
~/project/logs/api.log and ~/project/logs/worker.log are growing every second. Somewhere in worker.log a job crashed.
Tasks
Create a tmux session called incident whose window logs shows both logs side by side, each followed live with tail -f.
Find the job number of the job that crashed, and save just the number in ~/project/answer.txt.
Leave the session running in the background.
Requirements
Both logs must stay visible and live in the logs window.
Detach from tmux when you're done; don't close the session.
Ctrl-b [, then ?ERROR and Enter finds ERROR job 8812 crashed. Press q, then Ctrl-b d to detach, and:
echo 8812 > answer.txt
Summary
You built a live two-log view, dug a crash out of the scrollback, and left it all running for later. That's a typical first ten minutes of an incident.