Skip to content

Instantly share code, notes, and snippets.

@maciej-izak
Forked from chyld/unix-debugging-tools.txt
Created March 14, 2018 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maciej-izak/3e8fb9850fc672b29343d2ab18f0e129 to your computer and use it in GitHub Desktop.
Save maciej-izak/3e8fb9850fc672b29343d2ab18f0e129 to your computer and use it in GitHub Desktop.
http://jvns.ca/debugging-zine.pdf
http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html
http://www.brendangregg.com/linuxperf.html
http://www.brendangregg.com/Perf/linux_perf_tools_full.png
https://www.devopszen.com/network-monitoring-tools
***AWESOME***
https://github.com/iovisor/bcc
*** perf + process monitor
top
htop
perf - Performance analysis tools for Linux
http://www.brendangregg.com/flamegraphs.html
*** i/o + syscalls
dstat - versatile tool for generating system resource statistics
strace - trace system calls and signals
opensnoop - trace open() syscalls with file details. Uses Linux ftrace.
execsnoop - trace process exec() with arguments. Uses Linux ftrace.
lsof - list open files
fuser - identify processes using files or sockets
sysdig - the definitive system and process troubleshooting tool
*** networking
nc — arbitrary TCP and UDP connections and listens
ss - another utility to investigate sockets
netstat - Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships
sudo netstat -tunapl # shows process and port assignments
lsof -i -P # same, but OSX
ngrep - network grep # a spy tool for network i/o
tcpdump - dump traffic on a network
wireshark
curl
httpie
MORE *****
dstat
opensnoop
strace
ngrep
netstat
tcpdump
wireshark
eBPF
/proc ===> /proc/PID/stack # to view stack trace of live process
perf
ps
top, htop, perf top
flamegraph
#### SYSCALLS
socket
open
execve
sendto
read
recvfrom
write
Debugger — gdb, valgrind, ltrace, lsof, pmap
pmap - process map
lsof -p 1234 # show all files open by process num
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment