On 3/5/14 10:57 , Mahmood Naderan wrote: > You right about Truss because my observation shows that not all syscalls > reported in Dtrace's output present in the output of Truss (and vice > versa).
That's correct. truss has a logical view of system calls based generally on entry points that are in section two of the manual page. However, several of those are implemented in illumos with a single system call in the kernel. There's a bit of that discussed in the DTrace guide at http://dtrace.org/guide/chapter21.html in the section titled 'System Call Anachronisms'. > Thing is, I want to measure the impact of OS activity on > the user code. Firstly, I did a DTrace analysis (syscall provider) in > order to count the syscalls. For example, > > App1: > llseek 200 > App2: > lwp_park 100 > > That means, App1 uses more syscalls compare to App2. The next question is > > 200*time_of_one_call_llseek > 100*time_of_one_call_lwp_park > > or not. To answer that I would consider doing something like: dtrace -n 'syscall:::entry{ self->t = timestamp; }' -n 'syscall:::return/self->t/{ @[pid, probefunc] = sum(timestamp - self->t); self->t = 0; }' That will give you the total time that all of those system calls have taken on a per-process basis. Alternatively, you may want a distribute of the system calls. For that I would look at things like quantize() and lquantize(). For example: dtrace -n 'syscall:::entry{ self->t = timestamp; }' -n 'syscall:::return/self->t/{ @[pid, probefunc] = quantize(timestamp - self->t); self->t = 0; }' If you're trying to just get a basic sense of what your application is doing and figuring out what's going on, I would highly suggest starting with a flame graph. See http://brendangregg.com/flamegraphs.html for more information. Robert ------------------------------------------- dtrace-discuss Archives: https://www.listbox.com/member/archive/184261/=now RSS Feed: https://www.listbox.com/member/archive/rss/184261/25769126-e243886f Modify Your Subscription: https://www.listbox.com/member/?member_id=25769126&id_secret=25769126-8d47a7b2 Powered by Listbox: http://www.listbox.com