Reading packet loss in mtr and traceroute
Distinguish lost probe replies at one hop from loss that continues to the destination.
Working notes on Linux, web services, backups and networking. Each task includes commands and a way to check the result.
Distinguish lost probe replies at one hop from loss that continues to the destination.
Keep management reachable while enabling VLAN filtering.
Check absent neighbors and adjacencies stuck in INIT, 2-WAY, EXSTART or EXCHANGE.
Check each provider using a reachable address beyond its own gateway.
Use separate routing tables so replies leave through the intended provider.
Find the root bridge and work out why a port does not forward.
Diagnose a path MTU black hole even when ping and DNS respond.
Share a virtual gateway address between two routers and track upstream health.
A starting point for filtering IPv4 and IPv6 traffic on a server.
Limit DHCP replies to trusted ports and validate ARP against address bindings.
A short routine to avoid taking a live site down because of a typo.
Useful after edits in sites-enabled: the full dump shows the effective configuration instead of guesses.
When /var/log/journal slowly eats the disk, set a limit instead of deleting files by hand.
When a request is routed to the wrong place, inspect exact, prefix, and regex locations in the effective config first.
For assets, set Cache-Control explicitly and keep HTML uncached separately.
A separate log is often faster than dashboards when tracing one host's request flow.
A minimal path for small databases when you need an obvious file before changing schema.
Before reload, it is useful to see how Caddy adapts the Caddyfile.
If rotation happened but nginx still writes to the old inode, send USR1 to the master process.
Most failures come from DNS, port 80, or rate limits; Caddy logs are usually specific.
Configure an 802.3ad bond and verify that both links join the same aggregator.
Access/error logs usually show whether upstream timed out or the app returned a real 5xx.
Do not edit packaged units; overrides survive package updates and are easier to inspect.
A small template for an app that writes plain files under /var/log.
When the wrong vhost responds, apachectl -S is faster than opening many files.
For timers, inspect Last/Next and the service unit it triggers.
When a service cannot see a variable, inspect the drop-in and effective unit first.
Custom format is useful because it can be listed and restored selectively.
The command to run before the real copy, especially when --delete is involved.
Restart policy can hide the actual crash reason and create a tight loop.
Plain pg_dump does not save global roles and tablespaces.
After reboot, separate old errors from the current boot.
With a custom dump, edit the list file and restore only selected objects.
Do not delete files by hand; vacuum is the supported path.
When a database is busy, inspect state, wait_event, and query age first.
Collect configurations automatically and keep a Git history of changes.
After import, the planner may make poor choices until statistics are refreshed.
When data is not where expected, docker inspect is faster than guessing.
A compose file with overrides is easier to verify through the merged config.
During incidents, all-container noise hurts; select one service and a tail.
Normal pull/up should not touch named volumes; the dangerous command is usually down -v.
Before restart, understand whether RDB/AOF is enabled and where files live.
When Redis slows down or evicts keys, inspect memory and policy.
For small databases, do not forget routines, triggers, and events.
Examples for host, port, VLAN and connection filters.
After reinstalling a server, remove the specific key, not the whole known_hosts file.
For diagnosis, do not edit config first; inspect current variables.
Deleting firewall rules is safer after numbered status.
A bad sshd_config is painful, so sshd -t is mandatory.
A rule may work now but disappear after reboot if it is not permanent.
Before manual firewall edits, keep a copy of the current ruleset.
Run a VLAN trunk over a bond and assign each VM network its own bridge.
The browser does not always show the full chain conveniently; openssl is faster in a runbook.
When a site works only for some users, check A/AAAA beyond the local resolver.
You can send a request to a new IP with the correct Host/SNI without changing DNS.
Before complex debugging, inspect status, cache, redirects, and server headers.
If secondary did not receive updates, check the SOA serial first.
Any rsync with --delete gets a dry run first, with deleting lines reviewed.
A repeated backup is easier to maintain with a separate exclude file.
Advertise your prefix and accept a default route from a single upstream.
A script in cron.daily may not run because of a dot in its filename.
After backup, inspect snapshots and repository stats, not only exit code.
What works in a shell may fail in cron because of environment differences.
A full check can be long; a subset is useful for routine checks.
When moving between systems, user names may differ; UID/GID can matter more.
This is a routine operations check, not a replacement for auth.log review.
Held packages often explain why a version does not change.
When disk growth is sudden, size plus mtime is useful.
After unexpected behavior changes, inspect unattended-upgrades logs first.
Exhausted inodes look like strange disk-full errors.
On RPM systems, history is often faster than manual package lookup.
A process can keep a deleted file open until restart or reopen.
The -x flag avoids walking into mounted backup/storage directories.
Swap usage itself is not always a problem; active paging matters.
SMART is not perfect, but pending/reallocated often give an early signal.
Run read-only commands across network devices and save the results for review.
When degraded, capture state before trying to reassemble anything.
Before restart, inspect the effective config and warnings.
On a multi-homed server, this is faster than guessing from route tables.
If Prometheus cannot see a target, check the endpoint on the host first.
Dry-run catches broken webroot/DNS challenge before real expiry.
After sysctl edits, distinguish runtime from persistent config.
When log time looks wrong, check timezone and RTC first.
With old client complaints, inspect negotiated protocol and cipher.
A clear hostname helps logs, backups, and monitoring.
For monitoring, status code, response time, and a short error body matter.
For temporary directories, tmpfiles is often better than a custom cron rm.
If an API health endpoint returns JSON, jq catches broken structure before the app does.
When a process cannot open a file, the problem is often a parent directory.
dig bypasses NSS, while getent shows what an application will see.
For internal tokens, use the system CSPRNG instead of inventing a string.