This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: the system call number


Hi,

I think all syscalls in tapset have "name" variable defined to the correct name.

Attached an example to compute syscalls per process and call duration, to finally get this kind of output (get_32k() is TI custom, can use do_gettimeofday):
           System Call         execname:pid         Count    Total 32K      Avg 32K      Min 32K      Max 32K
             setitimer             init:1               2            0            0            0            0
                select             init:1               1       164091       164091       164091       164091
                  stat             init:1               4            2            0            0            1
                 fstat             init:1               2            1            0            0            1
          gettimeofday             init:1               2            0            0            0            0
                 ioctl     avahi-daemon:1105            2            0            0            0            0
                 write     avahi-daemon:1105           18            3            0            0            1
                  poll     avahi-daemon:1105            5        16790         3358            0        13309
               recvmsg     avahi-daemon:1105            2            2            1            1            1
          gettimeofday     avahi-daemon:1105           34            4            0            0            1
                  read     avahi-daemon:1105            6            1            0            0            1
          gettimeofday         dropbear:1147           14            1            0            0            1
                 write         dropbear:1147            6            9            1            1            2
                select         dropbear:1147           13       286941        22072            0       278520
                  read         dropbear:1147           12            3            0            0            1


Regards
FRed

Frederic Turgis
OMAP Platform Business Unit - OMAP System Engineering - Platform Enablement



>
Texas Instruments France SA, 821 Avenue Jack Kilby, 06270 Villeneuve Loubet. 036 420 040 R.C.S Antibes. Capital de EUR 753.920

-----Original Message-----

> From: systemtap-owner@sourceware.org
> [mailto:systemtap-owner@sourceware.org] On Behalf Of Zheng Da
> Sent: Saturday, July 23, 2011 6:24 AM
> To: systemtap@sourceware.org
> Subject: the system call number
>
> Hello,
>
> I try to trace all system calls in a period of time, and then
> print out all system calls and the invokers.
> How do I get the system call number, or better the names of
> the system calls?
> I tried $syscall, but it doesn't work.
>
> probe syscall.* {
>         if ($syscall != 4) {
>                 curr_time = gettimeofday_us()
>                         if (curr_time > start_time + 1000000 * 3)
>                                 printf ("%s calls %d\n",
> execname(), $syscall)
>         }
> }
>
> Thanks,
> Da
>

Attachment: syscall_times.stp
Description: syscall_times.stp


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]