osx - Using dtrace in objective C -


i use dtrace parameters below calculate specific process network traffic usage :

sudo dtrace -n 'syscall::recvfrom:return { @[pid] = sum(arg0); }' 

how use dtrace in objective c?

i used nstask launch dtrace above parameters results of dtrace command shows after terminating dtrace, couldn't see results unless terminating dtrace. dtrace stays in loop calculating traffic of given process , because of using of nspipe could't able use [task terminate] command. main question is:

how use dtrace in objective c nstask or without (via method) , terminating , seeing results?

the default behaviour not print out anything, can put in profile kicker print output @ interval. adding clause like:

profile:::tick-1sec {   printa(@); } 

should achieve desired effect.

or, using sudo call:

sudo dtrace -n 'syscall::recvfrom:return { @[pid] = sum(arg0); } profile:::tick-1sec { printa(@); }' 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -