Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | Github | OSChina 博客 | 雲社區 | 雲棲社區 | Facebook | Linkedin | 知乎專欄 | 視頻教程 | About

第 29 章 調試工具

目錄

29.1. ftop - Tool to show progress of open files and file systems
29.2. strace - trace system calls and signals
29.2.1. -o file -- send trace output to FILE instead of stderr
29.3. ltrace - A library call tracer
29.4. ldd - print shared library dependencies
29.5. Valgrind
29.6. nm - list symbols from object files
29.7. objdump - display information from object files.
29.8. readelf - Displays information about ELF files.

29.1. ftop - Tool to show progress of open files and file systems

ftop 是一個顯示進程打開檔案的工具

Tue Jan 20 16:25:50 2015                                                                                 ftop 1.0
Processes:  47 total, 0 unreadable                                                Press h for help, o for options
Open Files: 57 regular, 0 dir, 149 chr, 0 blk, 12 pipe, 59 sock, 15 misc

_  PID    #FD  USER      COMMAND                                                                                  
-- 413    10   root      /sbin/udevd -d
|  +- 3    -rw  --	935/935      /dev/.udev/queue.bin
-- 982    7    root      auditd
|  +- 5    --W  --     3.1M/3.1M     /var/log/audit/audit.log
-- 1002   5    root      /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
|  +- out  --W  --     8059/8059     /var/log/messages
|  +- err  --W  --    16443/16443    /var/log/cron
|  +- 3    -r-  --        0/0        /proc/kmsg
|  +- 4    --W  --    14976/14976    /var/log/secure
-- 1106   17   www       nginx: worker process                   
|  +- err  --W  --   538920/538920   /var/log/nginx/error.log (fd 11 for PID 1106)