Excuse me. I see that sc.d script shows different syscalls than the standard syscall provider example.
1) syscall example from oracle website dtrace -n syscall:::entry'/pid == 31337/{ @syscalls[probefunc] = count(); }' 2) part of the sc.d which count syscalls syscall:::entry /pid == $target/ { @count[probefunc] = count(); self->st[probefunc] = timestamp; } The only difference I see (timestamp is not related to the question) is the aggregations @syscalls @count But these are variables and shouldn't produce different outputs. Regards, Mahmood On Thursday, March 6, 2014 2:26 AM, Mahmood Naderan <nt_mahm...@yahoo.com> 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). 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. Regards, Mahmood On Wednesday, March 5, 2014 9:27 PM, Robert Mustacchi <r...@joyent.com> wrote: On 3/5/14 9:53 , Mahmood Naderan wrote: > Ok I found 'truss' command to be useful for my problem. > Just one question, hope that somebody knows the answer. I know that this list > is not directly related to DTrace list. > > I used 'truss -c -p 1010' and the output is > > syscall seconds calls errors > write .005 77 > close .000 1 > brk .000 8 > lwp_park .407 6631 > lwp_unpark .246 5832 > sysconfig .000 1 > yield .012 212 > llseek .000 1 > lwp_mutex_timedlock .000 1 > open64 .000 2 > -------- ------ ---- > sys totals: .672 12766 0 > usr time: 310.172 > elapsed: 33.990 truss should not be used for getting performance measurements, it's overhead is really quite high. What exactly is it you want? Do you want the sum of the amount of time that each system call is taking on a per system-call basis, do you want the distribution on a per-system call basis, something else? Robert > On Sunday, March 2, 2014 12:08 PM, Mahmood Naderan <nt_mahm...@yahoo.com> > wrote: > > Hi, > How can I find the execution time of each syscall using DTrace (or any other > developers related tool)? > For example, I can see > > fstat 100 > sendto 400 > brk 50 > > I want to know which one has the largest overhead in the run time. > > 100 * (execution of one fstat) > or > 400 * (execution of one sendto) > or > 50 * (execution of one brk) > > Any feedback is appreciated. > > > Regards, > Mahmood > dtrace-discuss | Archives | Modify Your Subscription > > > ------------------------------------------- > dtrace-discuss > Archives: https://www.listbox.com/member/archive/184261/=now > RSS Feed: https://www.listbox.com/member/archive/rss/184261/21484240-a380ec99 > Modify Your Subscription: https://www.listbox.com/member/?& > Powered by Listbox: http://www.listbox.com > dtrace-discuss | Archives | Modify Your Subscription ------------------------------------------- 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