Dtrace-counting the number of read access to a file

view full story

http://www.unix.com – Hi, I want to write a script with dtrace to count the number of read and write from and to a file. I use this for reading: Code: dtrace -n 'syscall::read:entry { @["myFilePath"] = count(); }' but it doesn'f give me a single answer. The result is always increasing. :wall: Moderator's Comments: Please use next time code tags for your code and data (HowTos)