| name | linux-triage |
| description | Use when diagnosing a failing or misbehaving Linux system to reconstruct what changed before the problem started โ subsystem state, package history, log timeline, and environmental deltas. |
| version | 1.0.0 |
| author | Hermes Agent |
| license | MIT |
| platforms | ["linux"] |
| metadata | {"hermes":{"tags":["linux","triage","diagnostics","troubleshooting","incident-response"],"related_skills":["linux-change-safety","ansible-fleet-change"],"related_skill_classifications":{"linux-change-safety":"bundled","ansible-fleet-change":"bundled"}}} |
Linux Triage
Trigger
An alert, user report, or dashboard shows a system in a degraded or failing state. Before any change, reconstruct what changed and when.
Workflow
-
Establish the incident timeline. When did the problem first appear? What was the last known-good state? Check alert timestamps, monitoring graphs, and user reports.
-
Detect OS family (never assume):
source /etc/os-release && echo "$ID $VERSION_ID"
Branch all subsequent commands accordingly.
-
Check for recent changes โ package level:
RHEL-family:
dnf history list | head -20
dnf history info <transaction-id>
rpm -qa --last | head -30
Debian-family:
grep -E 'install|upgrade|remove|purge|dist-upgrade' /var/log/apt/history.log | tail -50
zgrep ' install ' /var/log/dpkg.log* | tail -20
-
Check for disk, memory, and resource pressure:
df -h
df -i
free -h
dmesg | tail -30
-
Check service state and systemd journal:
systemctl list-units --state=failed
journalctl -u <suspected-service> --since "24 hours ago" --no-pager | tail -80
journalctl -p err --since "24 hours ago" --no-pager | tail -40
-
Check logs relevant to the symptom:
RHEL-family: /var/log/secure, /var/log/messages, /var/log/httpd/ etc.
Debian-family: /var/log/auth.log, /var/log/syslog, /var/log/apache2/ etc.
journalctl -xe --no-pager | tail -60
-
Check network and connectivity:
ss -tlnp
ss -ulnp
ping -c 3 <critical-dependency>
nc -zv <host> <port>
-
Check SELinux or AppArmor context:
getenforce
ausearch -m avc -ts recent | tail -20
sealert -l "*" | tail -40
aa-status
cat /sys/kernel/security/apparmor/profiles
-
Correlate. Map each finding to the incident timeline. What changed, when, and does it explain the symptom? If not, keep looking โ check cron jobs, user logins, config file timestamps, and external dependencies.
-
Document findings in a structured form:
- Timeline
- Trigger event
- What changed
- Current system state
- Root cause hypothesis + confidence level
- What was not checked and why
- Proposed next step (investigation deeper or solution plan)
Pitfalls
- Do not run
dnf update or apt upgrade as part of investigation โ that's a change, not a diagnosis.
df -h over SSH may show the agent's container filesystem, not the target. Verify with hostname and mount inspection.
- A single suspicious log line is not a root cause. Look for the event that preceded the symptom.
- Reboot time indicates a kernel update or power event that may have changed system behavior.
Verification