Observe the dependencies of a machine you thought you knew
Task
Documentation describes a system as designed; migration fails on the system as it grew. Observe the actual connections in and out of a machine you run, and compare what you find against what you expected.
Steps
- Before looking, write your EXPECTED inbound and outbound connections into
lab/expected.txt, from memory. - Capture actual listening sockets and established connections repeatedly over at least an hour:
ss -tulpenandss -tan state establishedon a short timer, appending tolab/observed.txt. - Extract the distinct remote endpoints and local listening ports, and resolve which process owns each.
- Diff the observed set against your expected set and record the surprises in
lab/surprises.md-- both the things you expected and did not see, and the things you did not expect. - For each surprise, write what would break if this machine moved to a different network with a different address, and whether the dependency is inbound (someone else's change) or outbound (yours).
Verify
grep -c '^' lab/expected.txt
awk '{print}' lab/observed.txt | wc -l
grep -Eci 'inbound' lab/surprises.md
grep -Eci 'outbound' lab/surprises.md
Both directions must appear in the surprises file. Inbound dependencies are the dangerous ones because fixing them requires somebody else to make a change.
This is an independent study companion for CompTIA Cloud+ CV0-004 and is not produced by or endorsed by CompTIA.