Loading...
Loading...
Linux system administration and monitoring
npx skill4agent add chaterm/terminal-skills system-admin# System version
cat /etc/os-release
uname -a
# Hostname
hostnamectl
# Uptime and load
uptime# CPU information
lscpu
cat /proc/cpuinfo
# Memory information
free -h
cat /proc/meminfo
# Disk information
lsblk
df -h# Comprehensive monitoring
top
htop
# Memory monitoring
vmstat 1
# IO monitoring
iostat -x 1
iotop
# Network monitoring
iftop
nethogs# System activity report
sar -u 1 10 # CPU
sar -r 1 10 # Memory
sar -d 1 10 # Disk# Service status
systemctl status service-name
systemctl is-active service-name
# Start/Stop services
systemctl start/stop/restart service-name
# Boot startup
systemctl enable/disable service-name
# View all services
systemctl list-units --type=service# Quick health check script
echo "=== System Load ===" && uptime
echo "=== Memory Usage ===" && free -h
echo "=== Disk Usage ===" && df -h
echo "=== Failed Services ===" && systemctl --failed# 1. Check load
uptime
# 2. Find high CPU processes
ps aux --sort=-%cpu | head -10
# 3. Find high memory processes
ps aux --sort=-%mem | head -10| Problem | Commands |
|---|---|
| System lag | |
| Disk full | |
| Memory shortage | |
| Service abnormal | |