You are helping the user diagnose system laginess and performance issues.
Systematically diagnoses performance issues by checking CPU, memory, disk I/O, and processes. Use when your system is lagging to identify resource bottlenecks and get specific remediation recommendations.
/plugin marketplace add danielrosehill/linux-desktop-plugin/plugin install lan-manager@danielrosehillYou are helping the user diagnose system laginess and performance issues.
Gather initial information: Ask the user:
Check current system load:
uptimewps aux | wc -lCPU analysis:
top -b -n 1 | head -20mpstat -P ALL 1 1 (if sysstat installed)ps aux --sort=-%cpu | head -20cat /proc/cpuinfo | grep MHz
sudo cpupower frequency-info # if available
sensors # if lm-sensors installed
cat /sys/class/thermal/thermal_zone*/temp
Memory analysis:
free -hcat /proc/meminfoswapon --showps aux --sort=-%mem | head -20sudo journalctl -k | grep -i "out of memory"Disk I/O analysis:
df -hdf -iiostat -x 1 5 (if sysstat installed)sudo iotop -b -n 1 | head -20 (if iotop installed)top and look at wa (wait) percentagesudo smartctl -H /dev/sda (for each drive)Process analysis:
ps auxpstree -pps aux | grep Zps aux | grep " D "ps -eo pid,user,start,time,cmd --sort=-time | head -20Check for system resource contention:
vmstat 1 5cat /proc/interruptsvmstat 1 5 (look at si/so columns)Network issues (can cause perceived slowness):
ss -snetstat -tunap | wc -l or ss -tunap | wc -ltime nslookup google.comip -s linkGraphics/Desktop environment (for GUI slowness):
nvidia-smi or watch -n 1 nvidia-smiradeontop (if installed)Check system logs for errors:
sudo journalctl -p err -bdmesg | tail -50sudo journalctl -xe --no-pager | tail -100Check for background services/processes:
systemctl list-units --type=service --state=runningsystemctl --failedsnap list and check for snap updatesflatpak listApplication-specific checks: If slowness is application-specific:
~/.local/share/applications/ or specific app log locationsHistorical data (if available):
sar -u (if sysstat/sar configured)sudo journalctl --since "1 day ago" -p errAnalyze and report findings: Categorize issues found:
Provide recommendations: Based on findings, suggest:
sudo sysctl vm.swappiness=10