Home | History | Annotate | Line # | Download | only in Examples
      1  1.1  christos The following is a demonstration of the topsyscall command,
      2  1.1  christos 
      3  1.1  christos 
      4  1.1  christos Here topsyscall is run with no arguments,
      5  1.1  christos 
      6  1.1  christos    # topsyscall
      7  1.1  christos    2005 Jun 13 22:13:21, load average: 1.24, 1.24, 1.22   syscalls: 1287
      8  1.1  christos    
      9  1.1  christos       SYSCALL                          COUNT
     10  1.1  christos       getgid                               4
     11  1.1  christos       getuid                               5
     12  1.1  christos       waitsys                              5
     13  1.1  christos       xstat                                7
     14  1.1  christos       munmap                               7
     15  1.1  christos       sysconfig                            8
     16  1.1  christos       brk                                  8
     17  1.1  christos       setcontext                           8
     18  1.1  christos       open                                 8
     19  1.1  christos       getpid                               9
     20  1.1  christos       close                                9
     21  1.1  christos       resolvepath                         10
     22  1.1  christos       lwp_sigmask                         22
     23  1.1  christos       mmap                                26
     24  1.1  christos       lwp_park                            43
     25  1.1  christos       read                                59
     26  1.1  christos       write                               72
     27  1.1  christos       sigaction                          113
     28  1.1  christos       pollsys                            294
     29  1.1  christos       ioctl                              520
     30  1.1  christos 
     31  1.1  christos The screen updates every second, and continues until Ctrl-C is hit to 
     32  1.1  christos end the program.
     33  1.1  christos 
     34  1.1  christos In the above output we can see that the ioctl() system call occured 520 times,
     35  1.1  christos pollsys() 294 times and sigaction() 113 times.
     36  1.1  christos 
     37  1.1  christos 
     38  1.1  christos 
     39  1.1  christos Here the command is run with a 10 second interval,
     40  1.1  christos 
     41  1.1  christos    # topsyscall 10
     42  1.1  christos    2005 Jun 13 22:15:35, load average: 1.21, 1.22, 1.22   syscalls: 10189
     43  1.1  christos    
     44  1.1  christos       SYSCALL                          COUNT
     45  1.1  christos       writev                               6
     46  1.1  christos       close                                7
     47  1.1  christos       lseek                                7
     48  1.1  christos       open                                 7
     49  1.1  christos       brk                                  8
     50  1.1  christos       nanosleep                            9
     51  1.1  christos       portfs                              10
     52  1.1  christos       llseek                              14
     53  1.1  christos       lwp_cond_wait                       21
     54  1.1  christos       p_online                            21
     55  1.1  christos       gtime                               27
     56  1.1  christos       rusagesys                           71
     57  1.1  christos       setcontext                          92
     58  1.1  christos       lwp_sigmask                         98
     59  1.1  christos       setitimer                          183
     60  1.1  christos       lwp_park                           375
     61  1.1  christos       write                              438
     62  1.1  christos       read                               551
     63  1.1  christos       pollsys                           3071
     64  1.1  christos       ioctl                             5144
     65  1.1  christos 
     66