Skip to content

Instantly share code, notes, and snippets.

@kmille
Created March 19, 2024 21:47
Show Gist options
  • Save kmille/739028c3fd8dc08d0eca9ac4d8902255 to your computer and use it in GitHub Desktop.
Save kmille/739028c3fd8dc08d0eca9ac4d8902255 to your computer and use it in GitHub Desktop.
Analyzing a slow PC
#!/bin/bash
echo "Analysiere System..."
echo "Schreibe Logdatei nach /tmp/analyse.log"
exec > /tmp/analyse.log 2>&1
set -x
ITERATIONS=4
date
journalctl -b -p 4
systemctl --failed
systemctl list-unit-files --state enabled
ps faux
uptime
free -h
mpstat -P ALL 1 "$ITERATIONS"
pidstat 1 "$ITERATIONS"
iostat -xz 1 "$ITERATIONS"
sar -n DEV 1 "$ITERATIONS"
sar -n TCP,ETCP 1 "$ITERATIONS"
ss -tpn
ss -tpnl
echo "done"
@kmille
Copy link
Author

kmille commented Mar 19, 2024

Deployment

curl -s "https://gist.githubusercontent.com/kmille/739028c3fd8dc08d0eca9ac4d8902255/raw/3a169de5b257b45579a46eee61cfd9845ce169e9/slowpc.sh" > ~/slowpc.sh
chmod +x ~/slowpc.sh
~/slowpc.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment