#!/usr/bin/env bash
# Read-only reference list, not an automatically executed diagnostic script.
# Pick commands manually only after verifying target, permissions, and data scope.
exit 0

top -b -n 3 -d 1 -p "$PID"
ps -p "$PID" -o pid,ppid,stat,pcpu,pmem,rss,vsz,comm
ps -L -p "$PID"
ss -ltn
ss -tan
ss -tin
ss -ltn "sport = :$PORT"
netstat -lnt
lsof -nP -a -p "$PID" -iTCP
lsof -a -p "$PID" +L1
strace -f -T -e trace=read,write,openat,connect -o trace.log ./your-test-program
tcpdump -i lo -nn -c 20 -s 96 "tcp port $PORT"
df -h "$TARGET_PATH"
df -i "$TARGET_PATH"
free -m
vmstat 1 5
iostat -xyz 1 5
systemctl status "$SERVICE"
journalctl -u "$SERVICE" --since '10 minutes ago'
# State-changing commands below were NOT executed for this article.
systemctl daemon-reload
systemctl start "$SERVICE"
systemctl enable "$SERVICE"
systemctl restart "$SERVICE"
