Created
March 14, 2025 15:24
-
-
Save depsimon/a83ec5f87ccd9957fcc81bcae9f4127e to your computer and use it in GitHub Desktop.
Linux Monitoring commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original: https://x.com/bjsonnen/status/1900000307804795098/photo/1 | |
# Thanks @bjsonnen | |
# Real-time system performance overview | |
top | |
# Interactive process viewer with color and sorting | |
htop | |
# show system uptime, load average, and running processes | |
uotime | |
# Display memory usage statistics | |
free -h | |
# Show real-time CPU, disk, and swap stats | |
vmstat 1 | |
# Show I/O statistics for CPU, disk, and network | |
iostat 1 | |
# Display CPU load by core | |
mpstat -P ALL 1 | |
# DispLay block device I/O usage | |
iotop | |
# Monitor system-wide disk I/O activity | |
iostat -dx 1 | |
# Display system-wide network statistics | |
netstat -tulnp | |
# Monitor network bandwidth usage | |
iftop | |
# Show per-process CPU and memony usade | |
ps aux --sort=-%cpu | head | |
# Find top memory-consuming processes | |
ps aux --sort=-%mem | head -6 | |
# Show real-time CPU usage by process | |
pidstat 1 | |
# Kill a process by PID | |
kill -9 <PID> | |
# Show running processes as a tree | |
pstree | |
# Show disk space usage of mounted filesystems | |
df -h | |
# Show disk usage of a directory | |
du -sh /var/log | |
# Monitor real-time disk read/write activity | |
iotop | |
# Display inode usage on a filesystem | |
df -i | |
# Show memony usage and swap statistics | |
free -m | |
# Show memory usage breakdown per process | |
smem -t | |
# Monitor memory and swap usage dynamically | |
watch -n 1 cat /proc/meminfo | |
# Show active network connections | |
SS -tulnp | |
# Display bandwidth usage per intenface | |
bmon | |
# Measure network latency and packet loss | |
ping -c 5 google.com | |
# Trace the path packets take to a destination | |
traceroute google.com | |
# Show onen network ports | |
netstat -tulnp | |
# Show real-time network connections | |
watch -n 1 ss -tulnp | |
# View system loas in real-time | |
journalctl -f | |
# Show logs for a specific service | |
journalctl -u nginx --since "10 min ago" | |
# Show kernel messages | |
dmesg | tail -20 | |
# Monitor power consumotion and battery status | |
powertop | |
# Show hardware information | |
lscpu && lsblk | |
# Monitor temperature and fan speeds | |
sensors | |
# Check if the system if under high load | |
uptime | |
# Show current system limits | |
ulimit -a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment