---------------------------------------- links ----------------------------- https://en.wikipedia.org/wiki/Everything_is_a_file https://en.wikipedia.org/wiki/Inode https://yarchive.net/comp/linux/everything_is_file.html ---------------------------------------- docker demo ----------------------------- docker run -it busybox:latest ps aux | grep busy cd /proc/$PROCID ls -l fd cat stat cat limits ---------------------------------------- PS states ----------------------------- states D uninterruptible sleep (usually IO) I Idle kernel thread R running or runnable (on run queue) S interruptible sleep (waiting for an event to complete) T stopped by job control signal t stopped by debugger during the tracing W paging (not valid since the 2.6.xx kernel) X dead (should never be seen) Z defunct ("zombie") process, terminated but not reaped by its parent < high-priority (not nice to other users) N low-priority (nice to other users) L has pages locked into memory (for real-time and custom IO) s is a session leader l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do) + is in the foreground process group ---------------------------------------- compile & trace ----------------------------- go build helloGo.go odin build helloOdin.odin -file -out:hello ldd ./hello ldd ./helloGo ltrace -S ./helloGo ltrace -e ./helloGo readelf -s ./hello | less readelf -s ./helloGo | less