IBM REDP-4285-00 User Manual

Page of 170
4285ch02.fm
Draft Document for Review May 4, 2007 11:35 am
60
 
Linux Performance and Tuning Guidelines
Example 2-25   Output of strace counting for system time
[root@lnxsu4 ~]# strace -c find /etc -name httpd.conf
/etc/httpd/conf/httpd.conf
Process 3563 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 25.12    0.026714          12      2203           getdents64
 25.09    0.026689           8      3302           lstat64
 17.20    0.018296           8      2199           chdir
  9.05    0.009623           9      1109           open
  8.06    0.008577           8      1108           close
  7.50    0.007979           7      1108           fstat64
  7.36    0.007829           7      1100           fcntl64
  0.19    0.000205         205         1           execve
  0.13    0.000143          24         6           read
  0.08    0.000084          11         8           old_mmap
  0.05    0.000048          10         5           mmap2
  0.04    0.000040          13         3           munmap
  0.03    0.000035          35         1           write
  0.02    0.000024          12         2         1 access
  0.02    0.000020          10         2           mprotect
  0.02    0.000019           6         3           brk
  0.01    0.000014           7         2           fchdir
  0.01    0.000009           9         1           time
  0.01    0.000007           7         1           uname
  0.01    0.000007           7         1           set_thread_area
------ ----------- ----------- --------- --------- ----------------
100.00    0.106362                 12165         1 total
For the complete syntax of the strace command, issue:
strace -?
2.3.16  Proc file system
The proc file system is not a real file system, but nevertheless is extremely useful. It is not 
intended to store data; rather, it provides an interface to the running kernel. The proc file 
system enables an administrator to monitor and change the kernel on the fly. Figure 2-5 
depicts a sample proc file system. Most Linux tools for performance measurement rely on the 
information provided by /proc.