Skip to content

Instantly share code, notes, and snippets.

@brendangregg
Created March 18, 2013 18:12
Show Gist options
  • Save brendangregg/5189418 to your computer and use it in GitHub Desktop.
Save brendangregg/5189418 to your computer and use it in GitHub Desktop.
dtruss cat
dtruss cat /etc/networks
##
# Networks Database
##
loopback 127 loopback-net
SYSCALL(args) = return
__sysctl(0x7FFF5FAB9074, 0x2, 0x7FFF5FAB9060) = 0 0
bsdthread_register(0x7FFF8F249174, 0x7FFF8F249164, 0x2000) = 0 0
thread_selfid(0x7FFF8F249174, 0x7FFF8F249164, 0x0) = 12380231 0
mmap(0x0, 0x2000, 0x3, 0x1002, 0x1000000, 0x0) = 0x14C000 0
mprotect(0x10014C000, 0x88, 0x1) = 0 0
mmap(0x0, 0x17000, 0x3, 0x1002, 0x1000000, 0x0) = 0x156000 0
mprotect(0x100156000, 0x1000, 0x0) = 0 0
mprotect(0x10016C000, 0x1000, 0x0) = 0 0
mmap(0x0, 0x17000, 0x3, 0x1002, 0x1000000, 0x0) = 0x16D000 0
mprotect(0x10016D000, 0x1000, 0x0) = 0 0
mprotect(0x100183000, 0x1000, 0x0) = 0 0
mmap(0x0, 0x1000, 0x3, 0x1002, 0x1000000, 0x0) = 0x14E000 0
mprotect(0x10014E000, 0x1000, 0x1) = 0 0
mprotect(0x10014C000, 0x88, 0x3) = 0 0
mmap(0x7FB202C00000, 0x200000, 0x3, 0x1002, 0x7000000, 0x0) = 0x2C00000 0
munmap(0x7FB202D00000, 0x100000) = 0 0
mprotect(0x10014C000, 0x88, 0x1) = 0 0
issetugid(0x7FFF8B67C075, 0x7FFF5FAB9074, 0x7FFF5FAB9C68) = 0 0
mmap(0x7FB202C00000, 0x1000000, 0x3, 0x1002, 0x2000000, 0x0) = 0x2D00000 0
munmap(0x7FB202D00000, 0x300000) = 0 0
munmap(0x7FB203800000, 0x500000) = 0 0
getpid(0x7FFF5FAB8ED4, 0x3, 0x3) = 83877 0
__mac_syscall(0x7FFF8E3AE8CC, 0x2, 0x7FFF5FAB8F08) = 0 0
stat64("/AppleInternal\0", 0x7FFF5FAB8F78, 0x0) = -1 Err#2
audit_session_self(0x7FFF5FAB8E60, 0x7FFF5FAB8C98, 0x4) = 4611 0
geteuid(0x7FFF5FAB8E60, 0x7FFF5FAB8C98, 0x0) = 0 0
getegid(0x7FFF5FAB8E60, 0x7FFF5FAB8C98, 0x0) = 0 0
getaudit_addr(0x7FFF5FAB8F10, 0x30, 0x0) = 0 0
csops(0x147A5, 0x7, 0x7FFF5FAB8AF0) = 0 0
issetugid(0x100146000, 0x2, 0x7FFF5FAB9C00) = 0 0
geteuid(0x100146000, 0x2, 0x0) = 0 0
csops(0x0, 0x0, 0x7FFF5FAB96E4) = 0 0
shared_region_check_np(0x7FFF5FAB7638, 0x2, 0x7FFF5FAB7638) = 0 0
stat64("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x7FFF5FAB8780, 0x7FFF5FAB9750) = 0 0
open("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x0, 0x0) = 3 0
pread(0x3, "\312\376\272\276\0", 0x1000, 0x0) = 4096 0
pread(0x3, "\317\372\355\376\a\0", 0x1000, 0x6000) = 4096 0
mmap(0x100151000, 0x2000, 0x5, 0x12, 0x3, 0x6000) = 0x151000 0
mmap(0x100153000, 0x1000, 0x3, 0x12, 0x3, 0x8000) = 0x153000 0
mmap(0x100154000, 0x1FF0, 0x1, 0x12, 0x3, 0x9000) = 0x154000 0
close(0x3) = 0 0
stat64("/usr/lib/libSystem.B.dylib\0", 0x7FFF5FAB8560, 0x7FFF5FAB9460) = 0 0
stat64("/usr/lib/system/libcache.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libcommonCrypto.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libcompiler_rt.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libcopyfile.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libdispatch.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libdnsinfo.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libdyld.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libkeymgr.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/liblaunch.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libmacho.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libquarantine.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libremovefile.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libsystem_blocks.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libsystem_c.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libsystem_dnssd.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libsystem_info.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libsystem_kernel.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libsystem_m.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libsystem_network.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libsystem_notify.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libsystem_sandbox.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libunc.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libunwind.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libxpc.dylib\0", 0x7FFF5FAB8250, 0x7FFF5FAB9150) = 0 0
stat64("/usr/lib/system/libcorecrypto.dylib\0", 0x7FFF5FAB8150, 0x7FFF5FAB9050) = 0 0
stat64("/usr/lib/libobjc.A.dylib\0", 0x7FFF5FAB8130, 0x7FFF5FAB9030) = 0 0
stat64("/usr/lib/libauto.dylib\0", 0x7FFF5FAB8130, 0x7FFF5FAB9030) = 0 0
stat64("/usr/lib/libc++abi.dylib\0", 0x7FFF5FAB8000, 0x7FFF5FAB8F00) = 0 0
stat64("/usr/lib/libc++.1.dylib\0", 0x7FFF5FAB8000, 0x7FFF5FAB8F00) = 0 0
getpid(0x7FFF5FAB94B8, 0x10014B004, 0xEA60) = 83877 0
open("/dev/dtracehelper\0", 0x2, 0x7FFF5FAB95B0) = 3 0
ioctl(0x3, 0x80086804, 0x7FFF5FAB9510) = 0 0
close(0x3) = 0 0
stat64("/usr/lib/libstdc++.6.dylib\0", 0x7FFF5FAB8550, 0x7FFF5FAB9450) = 0 0
getrlimit(0x1008, 0x7FFF5FAB96A8, 0x7FFF8F2B2470) = 0 0
open_nocancel("/usr/share/locale/en_US.UTF-8/LC_CTYPE\0", 0x0, 0x1B6) = 3 0
fstat64(0x3, 0x7FFF5FAB9688, 0x0) = 0 0
fstat64(0x3, 0x7FFF5FAB9478, 0x7FFF5FAB953C) = 0 0
lseek(0x3, 0x0, 0x1) = 0 0
lseek(0x3, 0x0, 0x0) = 0 0
read_nocancel(0x3, "RuneMagAUTF-8\0", 0x1000) = 4096 0
read_nocancel(0x3, "\0", 0x1000) = 4096 0
read_nocancel(0x3, "\0", 0x1000) = 4096 0
read_nocancel(0x3, "\0", 0x1000) = 4096 0
read_nocancel(0x3, "\0", 0x1000) = 4096 0
read_nocancel(0x3, "\0", 0x1000) = 4096 0
read_nocancel(0x3, "@\004\211\0", 0xDB70) = 56176 0
close_nocancel(0x3) = 0 0
open("/etc/networks\0", 0x0, 0x0) = 3 0
fstat64(0x1, 0x7FFF5FAB9B38, 0x0) = 0 0
mmap(0x0, 0x20000, 0x3, 0x1002, 0x3000000, 0x0) = 0x184000 0
mmap(0x0, 0x1000, 0x3, 0x1002, 0x3000000, 0x0) = 0x14F000 0
read(0x3, "##\n# Networks Database\n##\nloopback\t127\t\tloopback-net\n$\b\0", 0x20000) = 53 0
write(0x1, "##\n# Networks Database\n##\nloopback\t127\t\tloopback-net\n$\b\0", 0x35) = 53 0
read(0x3, "@$\b\0", 0x20000) = 0 0
close(0x3) = 0 0
close_nocancel(0x1) = 0 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment