DevOps Troubleshooting Study Guide Cheat Sheet
DevOps Troubleshooting Study Guide Cheat Sheet
DevOps Troubleshooting Study Guide Cheat Sheet
uptime 5; 10; 15 minute CPU load average ifconfig gather information about network
top -b -n 1 (b)atch mode; (n)times to update before adapters
closing ethtool eth0 tool to analyze Ethernet connection.
systat pkg /etc/default/sysstat 'ENABLED="true"' sudo route -n check routing table, (n)o dns resolution
iotop top, but for disk usage sudo service networking restart networking service
iostat shows I/O stats for blk devices. restart
sar view sysstat logs for the day nslookup query dns for URL/IP
sar (-r) (-b) -r View ram statistic ; -b view I/O statistics traceroute traces route to host
sar -s 00:00:00 -e view stats within range date (s)tart to nmap -p $port $ipaddr check (p)ort range with $ipaddr
00:00:00 (e)nd sudo netstat -lnp show only (l)istening sockets (n)umeric
sar -f /var/log/syssta‐ from full path (p)program, shows PID and name of
t/sa** program
iptables -L Show all firewall rules
Disk Management iftop top for open network connections
e2label /dev/sd* / Change the label on a ext* filesystem tcpdump -n packet dump
blkid locate/print block device attributes tcpdump (not) host/port filter options for tcpdump
/etc/fstab file systems mounted at boot. sudo tcpdump -C 10 -n -l run tcpdump and output to file, -C sets
du -ckx | sort -n Disk Usage (c)Total (k)1k Blk Size (x) one host website | tee max size of output file
file system. sort by number outputfile
/etc/logrotate.conf edit logrotate settings dig website like nslookup, more informative.
df -i report disk space usage, (i) inodes dig target @dns check dns record of target against
specific dns
fsck -y -C /dev/sda* file system check (y) yes (C) progress bar
dig target +trace traces DNS route
mke2fs -n /dev/sda* list superblocks on a file system.
fsck -b (superblock) - run fsck and repair superblock with backup
y -C /dev/sda*