Troubleshooting Flashcards
Where would you go to start looking at config data with regards to performance issues with CPU, memory and other hardware?
/proc
Holds data on kernel, configs and processes
What information can you get with dmidecode
Just about every system spec like bios, sys, baseboard, chassis, processor, memory, cache etc
Use -t to specify a section
Where would you find kernal modules?
/lib/modules some distros also use /usr/lib/modules and hard link it.
Where might you find module config files?
/etc/modules.conf on older machines
Otherwise try:
/etc/modprobe.d
/etc/modules-load.d
/usr/lib/modprobe.d
/run/modprobe.d
Where would you look for potential kernal module errors
dmesg or /var/log/dmesg
Why use modprobe over insmod
Modprobe only needs the module name (not the absolute path) and it references the ‘modules.dep’ file for dependencies
What does depmod do?
Scans the system and determines and required modules and dependencies then updates them.
Tools to find issues with network adapters
ethtool -S ADAPTER
ip -s link show ADAPT
netstat -i ADAPT
Commands to check for latency and saturation issues
iperf, iperf3
mtr
nc
ss -s
tracepath
How would you use tshark to analyse an interface for 10 packets
sudo tshark -i INTERFACE -c 10
How to setup an iperf server to listen for 120 seconds
Allow port 5001 on firewall
Then
iperf -s -t 120
Setup iperf as a client for a throughput test
iperf -c IP -b kb -d -P 5 -e -i 10
How to check your routing table?
ip route show
How to view ARP and NDisc tables
ip neigh
What does iostat do?
Gives performance statistics showing CPU > disk wait times.
useful iostat switches
-y do not include “since booted “
-N display device mapper names
-z ignore devices with no activity
-p DEV only show for this DEV
Use iostat with appropriate trouble shooting options to show just two sets statistics 5 seconds apart
iostat -yNz 5 2
What tool to use to check CPU usage
uptime
How might you check for a missing storage device?
lsblk
Or lspci -M
How would you check for a missing volume?
Try a pvscan
Part of a logical volume group has failed and displayed a message as such in pvscan. What tools might you need to use next
Replace with ‘pvcreate’
Restore group metadata with ‘vgcfgrestore’
Recover the group with ‘vgscan’
Then activate with ‘vgchange’
What utility might you use to find data on your systems memory, processor, NIC, USB controller, disks etc
lshw
—short for nice formatted table
—businfo for associated data with SCSI,USB,IDE and PCI
What device files represent Com (serial) ports
/dev/ttyS#