Top syscalls

Hien Nguyen hien@us.ibm.com
Mon Sep 12 23:27:00 GMT 2005


This script will list the top 20 system calls during the interval of 
2000 jiffies contineuosly. Run this script  with the latest systemtap 
from CVS. To run the script
stap -g topsys.stp

It takes a while for the system compiling the module, so be patient. The 
output would look like this

SYSCALL                                                 COUNT
sys_gettimeofday                                        191
sys_ioctl                                               67
sys_poll                                                67
sys_read                                                54
sys_select                                              50
sys_setitimer                                           43
sys_write                                               27
sys_sigreturn                                           21
sys_stat64                                              7
sys_lstat64                                             5
sys_rt_sigprocmask                                      4
sys_time                                                2
sys_rt_sigaction                                        1
sys_wait4                                               1
sys_exit_group                                          1
sys_exit                                                1
sys_waitpid                                             1
sys_fstat64                                             1
sys_writev                                              1
sys_open                                                1
----------------------------------------------------------------


Note: In order fro this script to run contineuosly I have to reset 
CONTEXT->actioncount every time I print the list, which breaks Frank's 
safety measure, otherwise I would get this error

ERROR: MAXACTION exceeded near identifier 'sys_cnt' at topsys.stp:33:3

I guess if you are running a script in guru mode such action is allowed.

Hien.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: topsys.stp
URL: <http://sourceware.org/pipermail/systemtap/attachments/20050912/3b380898/attachment.ksh>


More information about the Systemtap mailing list