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