strace |
strace
The strace command will trace system calls and signals.
strace df
Here we are using strace to follow the command df. mike@ub:~$ strace df execve("/bin/df", ["df"], [/* 30 vars */]) = 0 uname({sys="Linux", node="ub", ...}) = 0 brk(0) = 0x8051000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) old_mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fe9000 open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=37030, ...}) = 0 old_mmap(NULL, 37030, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fdf000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\215Y\1"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0644, st_size=1222116, ...}) = 0 old_mmap(NULL, 1232428, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb7eb2000 old_mmap(0xb7fd4000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x121000) = 0xb7fd4000 old_mmap(0xb7fdd000, 7724, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7fdd000 close(3) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7eb1000 set_thread_area({entry_number:-1 -> 6, base_addr:0xb7eb1080, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 ---cut--- |
BeginLinux.com
(407)-620-4092
mike@beginlinux.com